JGit can be consumed in a Maven build. Multiple artifacts are available, depending on the application's requirements:
<repositories>
<repository>
<id>jgit-repository</id>
<url>https://repo.eclipse.org/content/groups/releases/</url>
</repository>
</repositories>
<!-- Core Library -->
<dependencies>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>4.3.0.201604071810-r</version>
</dependency>
</dependencies>
<!-- Smart HTTP Servlet -->
<dependencies>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.http.server</artifactId>
<version>4.3.0.201604071810-r</version>
</dependency>
</dependencies>
<!-- AWT UI Helpers -->
<dependencies>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ui</artifactId>
<version>4.3.0.201604071810-r</version>
</dependency>
</dependencies>
<!-- JUnit Test Support -->
<dependencies>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.junit</artifactId>
<version>4.3.0.201604071810-r</version>
</dependency>
</dependencies>
JGit is also available from Maven central: JGit on Maven central
For SNAPSHOT versions of the upcoming release, the following repository can be used:
<repository>
<id>jgit-snapshot-repository</id>
<url>https://repo.eclipse.org/content/groups/jgit/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
JGit can be installed from the EGit repository:
If you like to use the latest development version, you can install JGit from the EGit nightly repository:
You can also build JGit from scratch following our contributor guide.