Tuesday, 21 July 2026

Set custom Maven tag for a Release in Jenkins

Jenkins 2.302.2
Maven 3.8.1

My goal was to get a tag like v{new.version} without further ado when triggering the release.

To do so, the way I found was to check Preselect 'Specify custom SCM comment prefix' in the Jenkins config and add this into the pom:


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




No comments:

Post a Comment