gradle 的多个 Maven 存储库
multiple maven repositories for gradle
如果我在 gradle 构建中指定了多个 Maven 存储库,我希望如果 gradle 在其中一个存储库中找不到依赖项,它应该尝试其他存储库。相反,它在第一个存储库(内部公司 nexus 存储库)上失败,因为那里不存在依赖项并且构建失败
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 确认)。
如果我在 gradle 构建中指定了多个 Maven 存储库,我希望如果 gradle 在其中一个存储库中找不到依赖项,它应该尝试其他存储库。相反,它在第一个存储库(内部公司 nexus 存储库)上失败,因为那里不存在依赖项并且构建失败
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 确认)。