maven - remove -SNAPSHOT from properties tag in pom.xml

696 views Asked by At

The parent pom.xml of my application contains the following snippet:

...
<version>2.0-SNAPSHOT</version>
...
<properties>
    <property.version>1.0-SNAPSHOT</property.version>
</properties>

Essentially, I would like to update both the -SNAPSHOT versions to release versions. i.e., I want my resultant pom.xml to be like:

...
<version>2.0</version>
...
<properties>
    <property.version>1.0</property.version>
</properties>

[Note: v1.0 of <property.version> is not yet deployed to the artifactory and also might not be the latest version available
There might exist more properties with SNAPSHOT versions that I do not want to update to release versions]

I figured out a way to update the <version> using maven versions:set plugin. However, I could not find any solution for updating the version (by removing -SNAPSHOT) inside the <properties> tag.

I've looked at documentations for versions:update-properties, versions:update-property.

I am trying to achieve this by using the mvn versions plugin, otherwise I would have to write a script (eg. shell) which would parse and do the needful.

0

There are 0 answers