org.apache.maven deploy 400错误

本文介绍了解决Maven部署过程中遇到的400错误的方法,包括调整Nexus后台的DeploymentPolicy设置以及确保Maven配置文件中的repository ID与Nexus上的ID一致。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project xxx.3rd: Failed to deploy artifacts: Could not transfer artifact com.xxx.xxx-3rd:pom:1.0 from/to nexus-releases (http://xxx.xxx.xx.xx:8081/nexus/content/repositories/releases/): Failed to transfer file: http://xxx.xxx.xx.xx:8081/nexus/content/repositories/releases/com/xxx/xxx/1.0/xxx-3rd-1.0.pom. Return code is: 400, ReasonPhrase: Bad Request. -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

 

 最后发现,是因为不允许再次发布,到nexus后台把 Deployment Policy 改成  Allow Redeploy,

要注意还有可能是repository的id 和 maven setting中id 要对应,要不也会报400错误

ok备注哈 ,欢迎访问小站 利多乐

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值