Builds

The central EGit and JGit builds run on the JGit/EGit Hudson instance

Prerequisites for the Maven build are

Hudson

JGit

EGit

Mailing Lists

If you're interested in following builds, please check out the following mailing lists:

Maven Build

Complete build sequence for a clean build (assuming $M2_HOME/bin is on the path and local Maven repository at ~/.m2/repository):

[~/src/jgit] $ mvn clean install
[INFO] Scanning for projects...
...

[~/src/jgit] $ mvn -f org.eclipse.jgit.packaging/pom.xml clean install
[INFO] Scanning for projects...
...

[~/src/jgit] $ cd ../egit

[~/src/egit] $ mvn clean install
[INFO] Scanning for projects...
...

[~/src/jgit] $ cd ../egit-github

[~/src/egit-github] $ mvn clean install
[INFO] Scanning for projects...
...

The EGit build uses the JGit p2 repository to resolve jgit dependencies. For local builds the build assumes that egit and jgit source trees are located under a common parent folder. If this is not the case the path to the jgit p2 repository has to be injected via system property:

[~/src/egit] $ mvn clean install -Djgit-site=file:/path/to/jgit/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/target/repository

in the same way you can configure a custom path for the build of egit-github to the egit p2 repository

[~/src/egit-github] $ mvn clean install -Degit-site=file:/path/to/egit/org.eclipse.egit.repository/target/repository

The hudson build on build.eclipse.org uses (for SNAPSHOT builds):

[~/src/egit] $ mvn clean install -Djgit-site=https://repo.eclipse.org/content/unzip/snapshots.unzip/
                     org/eclipse/jgit/org.eclipse.jgit.repository/${JGIT_VERSION}/org.eclipse.jgit.repository-${JGIT_VERSION}.zip-unzip/

If you wan to build EGit for the specific Photon (4.8) platform, consider using the egit-4.8 target platform:

[~/src/egit] $ mvn -Dtarget-platform=egit-4.8 clean install

For EGit version 4.10, egit-4.5 (Mars, Eclipse 4.5), egit-4.6 (Neon, Eclipse 4.6), egit-4.7 (Oxygen, Eclipse 4.7), and egit-4.8 (Photon, Eclipse 4.8) are available. In addition egit-4.8-staging refers to the Photon staging repository.

Upon a successful build, a p2 update site should be generated inside egit/org.eclipse.egit.repository/target/repository. If not, make sure the target platform has been downloaded from within Eclipse (Windows>Preferences>Plug-in Development>Target Platform). The default target platform defined in the maven build is currently Eclipse 4.7. If you skip setting the system property target-platform the target platform for Eclipse 4.7 will be used.

JGit Bazel Build

Since Gerrit is built using Bazel a Bazel build was also implemented for JGit. This simplifies working on Gerrit features which also require changes in JGit.

bazel build :all
bazel test //...
bazel test --test_tag_filters=api,dfs,revplot,treewalk //...
bazel test //... --cache_test_results=NO 
bazel build --java_toolchain //tools:error_prone_warnings_toolchain :all

Note that the Bazel build does not yet support building JGit OSGi bundles, Eclipse features and the p2 repository which are required to install JGit in Eclipse.

FindBugs and PMD

As part of the build, JGit and EGit run FindBugs and PMD to find issues.

Checking for JGit API Changes using API Baseline

The JGit projects have API tooling enabled. In order to use PDE API tools to get assistance with maintaining API changes and additions you need to set an API baseline:

Signing and Publishing

EGit and JGit builds running on the JGit/EGit Hudson are automatically signed (using the CBI eclipse-jarsigner-plugin) and published to the folder

master branch:         /home/data/httpd/download.eclipse.org/egit/updates-nightly
latest stable branch:  /home/data/httpd/download.eclipse.org/egit/updates-stable-nightly

Contribution to Release Train

The release train contribution for JGit and EGit is maintained in the git repository

ssh://git.eclipse.org/gitroot/simrel/org.eclipse.simrel.build.git

in the file

egit.b3aggrcon

The release train build is coordinated on the cross-project-issues-dev mailing list