I want to update the version of my Maven project to the release version corresponding to the current snapshot version. E.g. 1.2-SNAPSHOT
should become 1.2
. In other words, I just want to remove the -SNAPSHOT
suffix from the version. I want to do this in a non-interactive way, so that my CI tool can perform this action.
I know this can be done with either the maven-release-plugin
or the maven-versions-plugin
and probably other plugins as well. I have a preference for the maven-versions-plugin
because it handles aggregator projects nicely.
Both plugins prompt for the new version, but allow you to provide the version on the command line. How to I provide the new version relative to the current snapshot version? As said, I just want to remove the -SNAPSHOT
part.
So to be clear:
- I only want to update the version of the project, not all the other stuff that the release plugin offers.
- I don't want to specify the version number, but just update the version to "whatever there's before
-SNAPSHOT
".