开发者

How to use JGit with Maven

I'm new to GIT and want to use JGit to create repository a开发者_开发百科nd remove it beside other operations from a Java maven project. And I want to know what dependencies are needed for that.

The following link what I read a bout JGit http://wiki.eclipse.org/JGit/User_Guide#Getting_Started


You can consume JGit (see http://www.eclipse.org/jgit/download/ ) in Maven:

<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.0.0.201106090707-r</version>
    </dependency>
  </dependencies>


It's now in Maven Central, see here

https://mvnrepository.com/artifact/org.eclipse.jgit


Add the following dependency in your maven project

<dependency>
    <groupId>org.eclipse.jgit</groupId>
    <artifactId>org.eclipse.jgit</artifactId>
    <version>4.8.0.201705170830-rc1</version>
</dependency>

Or you can choose a later version from the URL below : https://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit


If you correctly configure git in your Maven Project you can do many things with Maven

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜