Maven - release plugin
Table of Contents
https://maven.apache.org/maven-release/maven-release-plugin/
How to customize the tag that is labelled for the release version?
How to set tag for Maven release
The release plugin now supports the tagNameFormat
configuration option, which defaults to @{project.artifactId}-@{project.version}
.
If we want to customize it, we can do something like:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<tagNameFormat>@{project.artifactId}/@{project.version}</tagNameFormat>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<tagNameFormat>${env.BUILD_NUMBER}</tagNameFormat>
</configuration>
</plugin>