Christophe Herreman
Christophe Herreman

Reputation: 16085

"tagNameFormat" property is not applied in Maven Release plugin

I'm using the "tagNameFormat" configuration property on the Maven Release plugin to only use the project version as the tag, but it doesn't seem to have any effect. When I run a mvn release:prepare the suggested tag is still in the form {artifactId}-{version}.

My config is as follows:

<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>

Am I missing something here?

Upvotes: 4

Views: 2086

Answers (1)

Raghuram
Raghuram

Reputation: 52635

Works for me with latest maven (3.0.4) and 2.2.2 of maven release plugin on a mercurial repository.

Pom snippet

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

Log

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: :

Upvotes: 5

Related Questions