Use Case
I am working on a multi-module project and I am trying to drop -SNAPSHOT
for all child modules that have different versions.
Example
For the purposes of this exercise we can assume there are two sub-modules. The articles Maven Simple Project Archetype and Create an archetype from a multi-module project can be referenced to follow along.
Parent - 1.0.0-SNAPSHOT
ChildA - 1.2.3-SNAPSHOT
ChildB - 1.0.0-SNAPSHOT
Results
When I run mvn versions:set -D removeSnapshot -D processAllModules
I expect the versions to change as indicated below.
Parent - 1.0.0
ChildA - 1.2.3
ChildB - 1.0.0
But, it seems -SNAPSHOT is stripped from all versions except the children that have a different version from the parent.
Parent - 1.0.0
ChildA - 1.2.3-SNAPSHOT
ChildB - 1.0.0
Is there any way to run the mvn versions:set
command to honor the version number, while stripping the -SNAPSHOT
postfix?
UPDATE #1
Running mvn versions:set -D removeSnapshot=true
yields the same results as running mvn versions:set -D removeSnapshot -D processAllModules
.
Parent - 1.0.0
ChildA - 1.2.3-SNAPSHOT
ChildB - 1.0.0
-DremoveSnapshot=true
?