在 jenkins 上成功构建后,我正在尝试将我的 maven 项目上传到 nexus。这是我的两种配置:
错误在这里
Failed to deploy artifacts:
Could not transfer artifact de.xxx:NettyCore:pom:1.0-20170508.212447-1 from/to cloud-repo (http://xxx:xxx/nexus/content/repositories/cloud-repo):
Failed to transfer file: http://xxx:xxx/nexus/content/repositories/cloud-repo/de/xxx/NettyCore/1.0-SNAPSHOT/NettyCore-1.0-20170508.212447-1.pom.
Return code is: 400, ReasonPhrase:Bad Request.
ERROR: Uploading file pom.xml failed.
Finished: FAILURE
最佳答案
如“400 BAD request HTTP error code meaning?”中所述,错误 400 表示请求格式错误。
在您的情况下,一个可能的原因是您要发送的 GAV:版本是 1.0-SNAPSHOT
... 发送到 release 存储库:那种版本将被 Nexus 拒绝。
为了接受 1.0-SNAPSHOT
,“存储库策略”应该是“快照”。
关于git - jenkins Nexus Artifact uploader 400,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43857607/