0

We have of some reason earlier had the overwrite release enabled on nexus. Which can make chaos.

Sonatype Nexus™ 2.3.1-01

executable-war /home/jenkins/jenkins-1.555.war

So now we disabled that, so a release cannot be overwritten. However it seems to fail somehow. I am not overwriting any file but I still get the following now. Same error as if I would be overwriting a file:

[INFO] [war:war {execution: default-war}]

[INFO] Packaging webapp

[INFO] Assembling webapp [PROJ] in [/var/lib/jenkins/workspace/PROJ/target/PROJ-1.1.0]

[INFO] Processing war project

[INFO] Copying webapp resources [/var/lib/jenkins/workspace/PROJ/src/main/webapp]

[INFO] Webapp assembled in [153 msecs]

[INFO] Building war: /var/lib/jenkins/workspace/PROJ/target/PROJ-1.1.0.war

[INFO] [install:install {execution: default-install}]

[INFO] Installing /var/lib/jenkins/workspace/PROJ/target/PROJ-1.1.0.war to /home/jenkins/.m2/repository/com/norsktipping/PROJ/1.1.0/PROJ-1.1.0.war

[INFO] [deploy:deploy {execution: default-deploy}] Uploading: http://url:8081/nexus/content/repositories/releases/com/norsktipping/PROJ/1.1.0/PROJ-1.1.0.war 25890K uploaded (PROJ-1.1.0.war)

[INFO] ------------------------------------------------------------------------

[ERROR] BUILD ERROR

[INFO] ------------------------------------------------------------------------

[INFO] Error deploying artifact: Failed to transfer file: http://url:8081/nexus/content/repositories/releases/com/company/PROJ/1.1.0/PROJ-1.1.0.war.md5. Return code is: 400

[INFO] ----------------------------------------------------------------------

[INFO] For more information, run Maven with the -e switch

[INFO] -----------------------------------------------------------------------

[INFO] Total time: 17 seconds

[INFO] Finished at: Wed Oct 28 16:39:44 CET 2015

[INFO] Final Memory: 48M/406M

[INFO] ------------------------------------------------------------------------

[JENKINS] Archiving /var/lib/jenkins/workspace/PROJ/pom.xml to com.company/PROJ/1.1.0/PROJ-1.1.0.pom

[JENKINS] Archiving /var/lib/jenkins/workspace/PROJ/target/PROJ-1.1.0.war to com.company/PROJ/1.1.0/PROJ-1.1.0.war

J2B
  • 1,703
  • 2
  • 16
  • 31
  • Have you seen [Error when deploying an artifact in Nexus](http://stackoverflow.com/questions/18649486/error-when-deploying-an-artifact-in-nexus)? – Gerold Broser Oct 29 '15 at 09:35
  • Had missed one comment which might work, but I do not have access hehe: If you then delete the artifact from Nexus (via the web interface) for the purpose of deploying it again, the deploy will still fail, since just removing the e.g. jar or pom does not clear other files still laying around in the directory. You need to log onto the box and delete the directory in its entirety – J2B Oct 29 '15 at 09:41

1 Answers1

1

See bosvos' answer to Error when deploying an artifact in Nexus:

In the rare event that you need to redeploy the SAME STABLE artifact to Nexus, it will fail by default. If you then delete the artifact from Nexus (via the web interface) for the purpose of deploying it again, the deploy will still fail, since just removing the e.g. jar or pom does not clear other files still laying around in the directory. You need to log onto the box and delete the directory in its entirety.

Community
  • 1
  • 1
Gerold Broser
  • 14,080
  • 5
  • 48
  • 107
  • That seems to be the probably cause. Since I can build the first version for another project without problem. However not able to verify it right now but will mark this as correct answer. – J2B Oct 29 '15 at 10:53