Nexus 中的 maven-matadata.xml 发布版本错误
我的 maven-metadata.xml 在 Nexus 中没有正确的 RELEASE 版本。我正在使用 Nexus 1.8.0.1。我们使用maven-release-plugin部署到Nexus,日志表明它更新了元数据。我们还看到正确的版本被添加到版本集中。只是
版本不正确。
<?xml version="1.0" encoding="UTF-8" ?>
- <metadata>
<groupId>com.xxxx.yyyy</groupId>
<artifactId>my-jar</artifactId>
<version>1.0.6</version>
- <versioning>
<release>1.0.9.2</release>
- <versions>
<version>1.0.6</version>
<version>1.0.7</version>
<version>1.0.8</version>
<version>1.0.9</version>
<version>1.0.9.1</version>
<version>1.0.9.2</version>
<version>1.0.5.1</version>
<version>1.0.10</version>
<version>1.0.11</version>
</versions>
<lastUpdated>20110314051727</lastUpdated>
</versioning>
</metadata>
我尝试使用 Nexus UI 重新创建该文件,但效果不佳。
干杯,
杰夫
My maven-metadata.xml does not have the correct RELEASE version in Nexus. I am using Nexus 1.8.0.1. We use the maven-release-plugin to deploy to Nexus and the log indicates that it updates the metadata. We also see that the correct version gets added to the set of version. It is just the <release>
version that is incorrect.
<?xml version="1.0" encoding="UTF-8" ?>
- <metadata>
<groupId>com.xxxx.yyyy</groupId>
<artifactId>my-jar</artifactId>
<version>1.0.6</version>
- <versioning>
<release>1.0.9.2</release>
- <versions>
<version>1.0.6</version>
<version>1.0.7</version>
<version>1.0.8</version>
<version>1.0.9</version>
<version>1.0.9.1</version>
<version>1.0.9.2</version>
<version>1.0.5.1</version>
<version>1.0.10</version>
<version>1.0.11</version>
</versions>
<lastUpdated>20110314051727</lastUpdated>
</versioning>
</metadata>
I have tried recreating the file using the Nexus UI, but with no joy.
Cheers,
Geoff
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想将版本指定为发行版,则应将
-DperformRelease=true
添加到构建中。这将启用 中的release-profile
Maven Super POM,它依次配置 maven-部署插件。此配置将告诉存储库更新发布元数据以将工件标记为发布。因此,如果您现在部署 1.0.12,则以下命令会将其设置为发布版本:
If you want to specify a version as a release, then you should add
-DperformRelease=true
to the build. This enables therelease-profile
from the Maven Super POM, which in turn configures the maven-deploy-plugin. This configuration will tell the repository to update the release metadata to mark the artifact as the release.So if you were now deploying 1.0.12, then the following command would set that as the released version: