【问题标题】:Release version wrong in maven-matadata.xml in Nexus在 Nexus 的 maven-matadata.xml 中发布版本错误
【发布时间】:2011-07-16 06:07:59
【问题描述】:

我的 maven-metadata.xml 在 Nexus 中没有正确的 RELEASE 版本。我正在使用 Nexus 1.8.0.1。我们使用 maven-release-plugin 部署到 Nexus,日志表明它更新了元数据。我们还看到正确的版本被添加到版本集中。只是<release>版本不正确。

<?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 重新创建文件,但没有任何乐趣。

干杯,

杰夫

【问题讨论】:

标签: maven nexus maven-release-plugin maven-metadata


【解决方案1】:

如果您想将版本指定为发布,则应将-DperformRelease=true 添加到构建中。这会启用来自Maven Super POMrelease-profile,而后者又会配置maven-deploy-plugin。此配置将告诉存储库更新发布元数据以将工件标记为发布。

因此,如果您现在正在部署 1.0.12,那么以下命令会将其设置为发布版本:

mvn deploy -DperformRelease=true

【讨论】:

    猜你喜欢
    • 2011-02-27
    • 1970-01-01
    • 1970-01-01
    • 2012-09-30
    • 2011-03-31
    • 2013-01-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多