Development IDE Configuration
Download and install the Eclipse package "Eclipse IDE for Eclipse Committers" or "Eclipse for RCP
and RAP Developers" from here, if you don't already have it:
[Link]
Tools
Note: You have to use at least Eclipse 4.3.2 (Kepler SR2), earlier versions had a bug where the
following did not work (see bug 409073).
To install all the necessary tools to work on EGit/JGit, there is a egit-developer-tools.p2f file which you
can use as follows:
• File > Import > Install > Install Software Items from File
• Browse...
o Go to the location of your egit repository, open the tools directory and select egit-
developer-tools.p2f
o Alternatively, if you only want to contribute to JGit, download the file from the above
link and select it
• All the items you don't already have should be selected automatically
• Finish the wizard
• Restart
Java Requirements
EGit and JGit have Java 7.0 and Eclipse Platform 3.8.2 (Juno) as minimum requirements, so
dependencies to newer Java and platform versions must be avoided.
We are using API Tools Environment Descriptions (see changes for JGit and EGit) to facilitate
detecting code which isn't working on Java 7. If you followed the instructions in the Tools section
above, the necessary descriptions should already be installed. Otherwise install API Tools
Environment Descriptions from the release train repository, see Installing Execution Environment
Descriptions.
Dependencies
After importing the EGit and JGit projects in Eclipse, they will not compile due to missing
dependencies. There are a few ways to install these.
Option 1 (recommended): Use a Target Platform
This is the easiest method to install dependencies:
• Open the [Link] project
• Choose the egit-<version>.target file matching the version of your Eclipse platform (e.g. 4.5
for Mars) and open it (this may take a while as it downloads the indexes of the p2 repositories
the target platform refers to)
• In the resulting editor, click on the Set as Target Platform link at the top right (this may also
take a while since it downloads the dependencies)
After that, the workspace should build cleanly. If not, try Project > Clean... > All. If this also doesn't
help open Preferences > Plug-In Development > Target Platform, select the checked target platform
and click "Reload..." this will flush PDE's bundle cache and re-download the artifacts listed in the
target platform.
There are different target definitions, one for each version of Eclipse that EGit supports. The one you
select will be the one that is started if you want to try out a feature or bug fix.
You can always switch between them to test on different Eclipse versions. E.g. when you are
developing some major UI functionality, you should try it with the oldest supported Eclipse release to
make sure it doesn't depend on API that is only available in later versions.
Option 2: Install from Orbit P2 Repository
Install the dependencies from the Orbit p2 repository by importing the p2f file described above.
If you want to try another Orbit p2 repository version on the Orbit Downloads page, click on the
newest recommended build (R-Build) and copy the update site link from "Orbit Build Repository" (it
should end with /repository). Add this update site in Eclipse using "Install New Software..." and
then find and select the following entries:
• Java Mocking and Stubbing Framework
• Args4j
• Protocol Buffers
• Apache Jakarta log4j Plug-in
• Apache Commons Compress
• XZ Data Compression
• Hamcrest Library of Matchers
• JavaEWAH
Running
Now that everything builds, the next step is to run an Eclipse instance with the EGit/JGit code of the
workspace:
• Right click on the [Link] project
• Debug As > Eclipse Application
This should create a new launch configuration and start a new nested Eclipse instance in debug
mode. The created launch configuration can be edited, e.g. to change where the workspace of the
nested Eclipse should be located.
The launch configuration can also be used in normal (non-debug) mode of course.
Also see the reference on eclipse application launchers.