詹金斯Nexus Artifact Uploader 400

时间:2017-05-08 21:33:00

标签: git maven jenkins nexus

在jenkins成功构建之后,我正在尝试将我的maven项目上传到nexus。以下是我的两种配置:

的Nexus Nexus

jenkins配置: Jenkins

这里的错误

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

1 个答案:

答案 0 :(得分:3)

如“400 BAD request HTTP error code meaning?”中所述,错误400表示请求格式错误。

在您的情况下,可能的原因是您要发送的GAV:版本为1.0-SNAPSHOT ...已发送到发布回购:此类版本将被拒绝的Nexus。
“存储库策略”应该是“快照”以接受1.0-SNAPSHOT