我只是将我们的nexus存储库迁移到新的服务器,并更新了build.gradle以指向此服务器。Grable uploadArchives在新的连接上失败
uploadArchives {
repositories.mavenDeployer {
setUniqueVersion(false)
repository(url: "http://<tomcat2:8080>/nexus-webapp-1.9.2/content/repositories/releases") {
authentication(userName: "username", password: "password")
}
snapshotRepository(url: "http://<tomcat2:8080>/nexus-webapp-1.9.2/content/repositories/snapshots"){
authentication(userName: "username", password: "password")
}
}
}
现在uploadArchives任务失败,出现错误:
Error deploying artifact: Error transferring file Error writing to server
我看到tomcat2日志,但证书401错误都不错。我可以使用这些凭据登录到nexus webapp。
用户权限也适用于nexus,因为它适用于我将nexus url指向旧服务器的情况。
我在/.m2/settings.xml中也验证了nexus用户名和密码。
所有的配置都是一样的。我的sonatype工作目录在安装目录中,所以我刚刚在另一个tomcat上启动了nexus web应用程序,方法是在catalina.sh中设置PLEXUS_NEXUS_WORK –