Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to redeploy artifact release to nexus without "400, ReasonPhrase: Bad Request." answer?

Ok, I have an artifact release in version x.y.z and I want to redeploy it automatically without changing it's version (I can't change the version!).

The artifact it's divided in three jars that are generated separately. So I have:

  • Artifact GUI
  • Artifact Core 32bits
  • Artifact Core 64bits

They all have the same version. When I'm deploying a SNAPSHOT version I have no problem. But when I deploy the release nexus throws this error inside jenkins console:

Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: 
http://myNexus/nexus/content/repositories/releases/my/package/project/x.y.z/jar-file-x.y.z.jar.
Return code is: 400, ReasonPhrase: Bad Request.

Of course the problem it's that I'm deploying more than one release artifact in a version that obviously need to be unique. But I really need to deploy it that way. Is there a way to force nexus to accept a release more than once?

like image 314
R. Karlus Avatar asked Oct 16 '25 05:10

R. Karlus


1 Answers

I think you have to update the Deployment Policy for the release repository. Instead of "Disable Redeploy" it should be set to "Allow Redeploy". More information on this topic can be found in the sonatype nexus book.

like image 190
Stefan Freitag Avatar answered Oct 18 '25 20:10

Stefan Freitag



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!