简体   繁体   English

从 Jenkins 部署到 Nexus 时,Maven-metadata.xml 不匹配

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

I'm using the Nexus plugin in Jenkins to publish an application to Nexus.我正在 Jenkins 中使用 Nexus 插件将应用程序发布到 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 .部署元数据失败:无法传输元数据组:artifact:1.0.0-SNAPSHOT/maven-metadata.xml from/to group:artifact-snapshot ( https://our-nexus-repo/group:artifact-snapshot ):传输文件失败: 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.返回码为:400,ReasonPhrase:Invalid maven-metadata.xml GAV group, artifact, 1.0.0-SNAPSHOT 不匹配请求路径 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.我查看了 Nexus 中的 .xml 并将其复制到之前没有此 .xml 文件的 repo 中,然后再次尝试。 Same error message.同样的错误信息。 I deleted the snapshot folder in Nexus and tried again, same error.我删除了 Nexus 中的快照文件夹并再次尝试,同样的错误。 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.我无法访问 Nexus 中的任何配置,这是我第一次接触 Jenkins。 The group, artifact and version info in the pom is correct. pom 中的组、工件和版本信息是正确的。 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我让 Nexus 管理员试试这个: 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.然而问题是我仍然不明白是什么导致了这个错误以及它是否会在以后搞砸。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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