The tagNameFormat property is not applied in the Maven release plugin

I use the "tagNameFormat" configuration property in the Maven Release plugin to use only the project version as a tag, but this does not seem to have any effect. When I launch the mvn release: the preparation of the proposed tag is still in the form {artifactId} - {version}.

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

Did I miss something?

+4
source share
1 answer

Works for me with the latest maven (3.0.4) and 2.2.2 maven release plugins on mercury storage.

Fragment below

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

Journal

 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: : 
+5
source

Source: https://habr.com/ru/post/1402744/


All Articles