简体   繁体   中英

Maven-metadata.xml mismatch when deploying from Jenkins to Nexus

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM