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>http://download.eclipse.org/jgit/maven</url>
</repository>
</repositories>
<!-- Core Library -->
<dependencies>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>1.2.0.201112221803-r</version>
</dependency>
</dependencies>
<!-- Smart HTTP Servlet -->
<dependencies>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.http.server</artifactId>
<version>1.2.0.201112221803-r</version>
</dependency>
</dependencies>
<!-- AWT UI Helpers -->
<dependencies>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ui</artifactId>
<version>1.2.0.201112221803-r</version>
</dependency>
</dependencies>
<!-- JUnit Test Support -->
<dependencies>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.junit</artifactId>
<version>1.2.0.201112221803-r</version>
</dependency>
</dependencies>
JGit can be installed from the EGit repository:
If you like to live on the bleeding edge, you can install JGit from the EGit nightly repository:
You can also build JGit from scratch following our contributor guide.