【问题标题】:"tagNameFormat" property is not applied in Maven Release plugin“tagNameFormat”属性未在 Maven 发布插件中应用
【发布时间】:2012-04-06 09:37:01
【问题描述】:

我在 Maven Release 插件上使用“tagNameFormat”配置属性只使用项目版本作为标签,但它似乎没有任何效果。当我运行 mvn release:prepare 时,建议的标签仍然是 {artifactId}-{version} 的形式。

我的配置如下:

<plugin>
  <artifactId>maven-release-plugin</artifactId>
  <configuration>
    <tagBase>https://as3-commons.googlecode.com/svn/tags/parent-pom</tagBase>
    <tagNameFormat>@{project.version}</tagNameFormat>
    <goals>deploy</goals>
  </configuration>
</plugin>

我错过了什么吗?

【问题讨论】:

    标签: maven maven-release-plugin


    【解决方案1】:

    适用于我在 mercurial 上使用最新的 maven (3.0.4) 和 2.2.2 的 maven 发布插件 存储库。

    Pom sn-p

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.2.2</version>
        <configuration>
          <tagNameFormat>@{project.version}</tagNameFormat>
        </configuration>
      </plugin>
    

    日志

    D:\work\cloneProject>mvn release:prepare
    [INFO] Scanning for projects...
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building my-app 1.1-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] --- maven-release-plugin:2.2.2:prepare (default-cli) @ my-app ---
    [INFO] Verifying that there are no local modifications...
    [INFO]   ignoring changes on: pom.xml.next, release.properties, pom.xml.releaseB
    ackup, pom.xml.backup, pom.xml.branch, pom.xml.tag
    [INFO] EXECUTING: cmd.exe /X /C "hg status"
    [INFO] [release.properties:unknown]
    [INFO] Checking dependencies and plugins for snapshots ...
    What is the release version for "my-app"? (com.mycompany.app:my-app) 1.1: :
    What is SCM release tag or label for "my-app"? (com.mycompany.app:my-app) 1.1: :
    

    【讨论】:

      猜你喜欢
      • 2021-07-19
      • 1970-01-01
      • 2018-03-29
      • 2010-11-02
      • 1970-01-01
      • 2020-05-07
      • 1970-01-01
      • 2014-01-28
      • 1970-01-01
      相关资源
      最近更新 更多