【问题标题】:Looking for decent Git libraries for Java [closed]为 Java 寻找体面的 Git 库 [关闭]
【发布时间】:2010-11-16 10:41:27
【问题描述】:

我正在为独立应用程序寻找适合 Java 的 Git 库。

有人可以推荐吗?

【问题讨论】:

    标签: java git


    【解决方案1】:

    我相信您可以在您的 Java 应用程序中使用 JGit

    主页包括:

    JGit 的依赖项非常少,因此适合嵌入到任何 Java 应用程序中,无论该应用程序是否利用了其他 Eclipse 或 OSGi 技术。

    download page 提到:

    JGit 可以在 Maven 构建中使用。
    多个工件可用,具体取决于应用程序的要求:

    jgit-cookbook/blob/master/pom.xml 中查看完整的 pom.xl:

    摘录:

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

    当前支持的 git 命令的确切列表并不总是最新的(如the bug 317482 illustrates):

    2013 年 9 月至 2014 年 7 月更新:以下所有命令现已可用

    【讨论】:

    • 完成拼写检查 :)
    • 如果我没记错的话,其中一些半检查非常脆弱 - 几个月前我试图用 EGit 设置一些依赖 IDE 的朋友,但由于缺乏非平凡的东西而被咬得很厉害合并能力...
    • @Jefromi:在合并方面,只有最近的 0.9.x 版本才有趣。
    • 啊哈。我一直在寻找一个好的变更日志/新闻/支持的功能文档 - 至少有 something on the wiki。不过,它是从谷歌找到的,而不是从 JGit 主页导航。看起来他们现在支持解析策略,但仍然不是正常的 git 的默认递归合并。
    • @Jefromi:但他们最近的 mege 测试用例不是另有说明吗? egit.eclipse.org/w/… 虽然他们的合并算法仍然不稳定:bugs.eclipse.org/bugs/show_bug.cgi?id=328551。不,你是对的:现在只解决策略:egit.eclipse.org/w/…
    猜你喜欢
    • 2013-01-31
    • 2010-11-15
    • 2010-12-22
    • 1970-01-01
    • 1970-01-01
    • 2010-10-21
    • 2010-10-08
    • 1970-01-01
    相关资源
    最近更新 更多