我尝试将 Artifactory(2.6.4 rev. 13153)配置为使用 Maven Central 作为远程存储库。为此,我配置了远程存储库(请参阅下面的屏幕截图)。在 gradle.build 我配置:
repositories {
maven {
url artifactoryBaseUrl + 'build-libs'
}
maven {
url artifactoryBaseUrl + 'mcentral'
}
}
使用 Artifactory 的简单浏览器,我可以使用远程仓库“mcentral”浏览 Maven Central,但是在运行 gradle 时出现错误:
D:\...\at.mic.all.hermes>gradle build
:compileJava
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Could not resolve org.apache.myfaces.trinidad:trinidad-impl:1.0.13.
Required by:
at.mic.all.hermes:at.mic.all.hermes:20150924104503
> Could not GET 'http://mic-build2.mic.co.at:8082/artifactory/mcentral/org/apache/myfaces/trinidad/trinidad-impl/1.0.13/trinidad-impl-1.0.13.pom'. Received status code 401 from server: Unauthorized
BUILD FAILED
有什么想法我做错了吗?我将非常感谢任何帮助。谢谢!
坦率
屏幕截图: