我是 GIT 新手,想使用 JGit 创建存储库并将其从 Java maven 项目中的其他操作旁边删除。我想知道为此需要哪些依赖项。
以下链接是我读到的关于 JGit http://wiki.eclipse.org/JGit/User_Guide#Getting_Started
我是 GIT 新手,想使用 JGit 创建存储库并将其从 Java maven 项目中的其他操作旁边删除。我想知道为此需要哪些依赖项。
以下链接是我读到的关于 JGit http://wiki.eclipse.org/JGit/User_Guide#Getting_Started
您可以在 Maven中使用 JGit(参见http://www.eclipse.org/jgit/download/ ):
<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>
在 maven 项目中添加以下依赖项
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>4.8.0.201705170830-rc1</version>
</dependency>
或者您可以从以下 URL 中选择更高版本:https ://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit
它现在位于 Maven 中心,请参见此处
如果你在你的 Maven 项目中正确配置了 git,你可以用Maven做很多事情