Configuration Management team at my workplace mandates 4 digit version numbers for artefacts - say, 1.2.3.4 - for released artefact and 1.2.3.5-SNAPSHOT for development pom
In addition to this, our version control system (clearcase) has pre-label trigger which enforces a certain naming convention for label/tag.
So, if the pom version is 1.2.3.4-SNAPSHOT and artifactId is, for instance, shopcart then, as per the tag naming requirement, tag name should be:
XXX_1.2.3_SHOPCART_DROP4_SRC
where XXX is project code - constant string value.
As you see, in order to achieve this format, I need to make following customisations to tag name format:
- artifactId - convert to uppercase
- first 3 digits of 4 digit version number to be extracted
- last digit of 4 digit version number to be extracted
- concatenate everything as per the format.
I thought I would use gmaven plugin to get this done and populate a custom property to be used in tag or tagNameFormat configuration property of maven release plugin (v2.3.2) - but that doesn't work at all.
maven release plugin supports only 3 properties (artifactId, version, groupId) and doesn't support any other property.
gmaven plugin works as expected and sets a final user property in the tag name format I need - I verified it using the ant run maven plugin to echo the property.
Problem is with maven release plugin - it doesn't understand any user property...
Can anyone help how can I achieve this?
EDIT:
Interactive run is not a possibility - need to configure this to run for about 15 projects on jenkins ...
Many thanks, Tapasvi