Reputation: 113
I'm using the Nexus plugin in Jenkins to publish an application to Nexus. I'm trying to make the pipeline publish the snapshot version.
The pipeline gives this error message:
Failed to deploy metadata: Could not transfer metadata group:artifact:1.0.0-SNAPSHOT/maven-metadata.xml from/to group:artifact-snapshot (https://our-nexus-repo/group:artifact-snapshot): Failed to transfer file: https://our-nexus-repo/group:artifact-snapshot/group/artifact/1.0.0-SNAPSHOT/maven-metadata.xml. Return code is: 400, ReasonPhrase:Invalid maven-metadata.xml GAV group, artifact, 1.0.0-SNAPSHOT does not match request path repository/group:artifact-snapshot/group/artifact/1.0.0-SNAPSHOT/maven-metadata.xml.
I took a look at the .xml in Nexus and copied it into the repo which didn't have this .xml file before, and tried again. Same error message. I deleted the snapshot folder in Nexus and tried again, same error. I tried updating the snapshot version number, same error. I don't have access to any configuration in Nexus, and this is my first time around Jenkins. The group, artifact and version info in the pom is correct. Searching in here didn't solve it so far. Any ideas please?
Upvotes: 1
Views: 2965
Reputation: 396
I faced similar problem, although how different this problem look, the solution is absolutely different. I change the version of the build from
0.0.11-snapshot
to
0.0.11-SNAPSHOT
Its all CAPS! True Story!
Upvotes: 0
Reputation: 113
I asked the Nexus admin to try this: https://issues.sonatype.org/browse/NEXUS-19943
Now I can deploy the snapshots, so it seems resolved. However the problem is I still don't understand what caused this error and whether it will mess up something later.
Upvotes: 0