如果我在gradle构建中指定了多个maven存储库,我希望如果gradle在其中一个存储库中找不到依赖项,则应尝试其他存储库。而是,它在第一个存储库(内部公司内联仓库)上因不存在的依赖项而失败,并且构建失败
repositories {
maven {
url = 'http://mavencentral.it.att.com:8084/nexus/content/groups/att-public-group'
}
mavenLocal()
mavenCentral()
maven { url 'http://maven.springframework.org/milestone/' }
}
FAILURE: Build failed with an exception.
* What went wrong: Could not resolve all dependencies for configuration ':metadata-security:compile'.
> Artifact 'spring-security-kerberos-core.jar (org.springframework.security.extensions:spring-security-kerberos-core:1.0.0.M2)' not found. Searched in the following locations:
http://mavencentral.it.att.com:8084/nexus/content/groups/att-public-group/ org/springframework/security/extensions/spring-security-kerberos-core/1.0.0.M2/spring-security-kerberos-core-1.0.0.M2.jar
最佳答案
正如@Mark Viera在评论中所说:
Try running the build with --debug. It likely means that Gradle found a descriptor (pom.xml) but not the artifact itself.
也就是说,它丢失了jar文件(由OP确认)。
关于maven - 用于gradle的多个Maven存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29037107/