For reasons beyond my control, we should use the maven project setup, where the topmost pom.xml is not really the parent pom. Now we would like to create a Jenkins deployment pipeline, which, of course, would deploy a unique version of the entire reactor to our nexus repository.
Our setup is as follows:
root (no parent pom)
+---- parent (company-wide parent pom is somewhere else)
+---- module1 (parent pom is ../parent/pom.xml)
+---- module2 (parent pom is ../parent/pom.xml)
Now we must:
- install root, parent, module1 and module2 versions in our unique build version
- install the parent versions of module1 and module2 in the same build version
- leave the version of the external parent pump intact
I do not see the parameters in versions:setmojo that do this. The call mvn versions:set -DnewVersion=1.2.3sets the version for the root pump only. The same challenge works fine in a traditional assembly of parent / child reactors.
Is there a possible solution?
Note: This is
versions:update-child-modulesnot an option because we cannot determine a specific target version.
source
share