java - 依赖项更新后 gradle build 损坏
问题描述
我使用 gradle 构建一个 java 项目(ASCIIGenome)。
ASCIIGenome 的依赖项之一是 github 上的存储库(htsjdk,如您所见,它是我的一些更改的分支)。如果我使用以下提交,则 ASCIIGenome 项目构建htsjdk
良好build.gradle
:
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 存储库中存在一个错误,导致某些文件被忽略,因此 htsjdk 依赖关系被破坏。修复 .gitignore 解决了我的问题。
推荐阅读
- python - Flask Upload Image 仅适用于 Localhost,不适用于 Online Server
- linux - 如何使用 jmeter 的“OS Sampler”在 ubuntu 上运行终端的任何命令
- typo3 - TYPO3 域存储库临时更改设置
- asp.net - 如何将使用 MediaRecorder 录制的视频保存到 Asp.NET Core 中的文件中?
- hpc - Rattle 不以普通用户身份运行,而是在 HPC 集群中以 root 身份运行
- .net-core - 在 httpclient 中使用作用域服务
- java - Keycloak Java 管理员客户端在触发验证电子邮件时返回 400 错误
- udp - 我可以在 UDP 服务器上为 NAT 后面的客户端使用不同的接收/发送端口吗?
- javascript - 如何在 VueJS 单元测试中触发子组件的点击事件?
- python - Python数据类从父数据类继承部分属性