我使用gradle构建一个Java项目(ASCIIGenome)。
ASCIIGenome的依赖项之一是在github上的存储库(htsjdk,您可以看到它是一个带有我的一些更改的fork)。如果我在htsjdk中使用build.gradle的这个提交,则ASCIIGenome项目将构建良好:

dependencies {
    ...
    compile 'com.github.dariober:htsjdk:80e355c'
    ...
}
我对htsjdk进行了编辑,所以现在依赖项是
compile 'com.github.dariober:htsjdk:609ca91'
现在构建失败,并显示以下内容:
./gradlew build

FAILURE: Build failed with an exception.

* Where:
Build file '/home/dario/git_repos/ASCIIGenome/build.gradle' line: 77

* What went wrong:
Could not determine the dependencies of task ':jar'.
> Could not resolve all files for configuration ':compile'.
   > Could not find com.github.dariober:htsjdk:609ca91.
     Searched in the following locations:
       - https://jcenter.bintray.com/com/github/dariober/htsjdk/609ca91/htsjdk-609ca91.pom
       - https://jcenter.bintray.com/com/github/dariober/htsjdk/609ca91/htsjdk-609ca91.jar
       - https://jitpack.io/com/github/dariober/htsjdk/609ca91/htsjdk-609ca91.pom
       - https://jitpack.io/com/github/dariober/htsjdk/609ca91/htsjdk-609ca91.jar
     Required by:
         project :

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
我不明白为什么htsjdk:80e355c正常时htsjdk:609ca91正常。知道发生什么变化会破坏构建吗?请让我知道是否需要更多信息

最佳答案

事实证明,htsjdk的.gitignore存储库中有一个bug,导致某些文件被忽略,因此htsjdk依赖关系被破坏。修复.gitignore解决了我的问题。

10-08 00:47