Maven release deployment: Failed to transfer file: Return code is: 400 | Jian's Blog
Some times, when we tried to redeploy release to Maven repo with commandmvn clean install deploy
and we got the following error:
Maven release deployment: Failed to transfer file: myfile-url Return code is: 400
The reason is that the Maven nexus release repo does not allow redeployment by default. To enable that, you should logon nexus and select the release repo, then change the configuration to allow redeployment there.
But be aware that any projects use the release artifact will ONLY download the artifact once and thus the artifact you redeployed may not be able to be consumed by the projects, which may cause a lot of troubles. The solution is to manually remove the cached release artifact under .m2/repository so that Maven can download the new one.
Read full article from Maven release deployment: Failed to transfer file: Return code is: 400 | Jian's Blog
No comments:
Post a Comment