Using maven release:prepare simplifies the process of deploying an artifact. It is possible to define the tag with tag tag. The plugin allows to use properties to build a customized tag-name.
But I need a more customized version, which used “_” insteat of points for delimeters in version. e.g. version: 1.0.1.2 => tagname should be 01_01_01 .
If I could access the majorVersion, minorVersion of ${project.version} this would be a solution too. But it seems that they are not available general.
Any ideas how to achieve this in an easy manner?
The easy way is to always run maven like so
Of course if you forget to invoke
validateprior to release:prepare your release will be borked… so that’s no good.The next improvement is to have a profile with defaultGoals
Then you release by doing the non-standard
The true fix would be to suggest a patch to the maven release plugin to allow regex like replacement in the tagNameFormat configuration parameter.