gpt4 book ai didi

Gradle uploadArchives 在新的关系 URL 上失败

转载 作者:行者123 更新时间:2023-12-03 06:00:49 25 4
gpt4 key购买 nike

我只是将我们的 nexus 存储库迁移到新服务器并更新 build.gradle 以指向该服务器。

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 用户名和密码。

最佳答案

只有两个可能的答案(根据自己的经验):

  • 检查 repo 是否默认为 ReadOnly 部署策略
  • 检查您的版本控制(您的存储库是快照的版本吗?
    正确命名版本)
  • 关于Gradle uploadArchives 在新的关系 URL 上失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41849138/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com