In Maven, you can have one parent pom / Reactor which references child modules through the use of the parent's modules section like this:

<modules>
    <module>simple-weather</module>
    <module>simple-webapp</module>
</modules>

However, each child is free to specify or NOT its parent, and it still gets built; that means, the following piece of config is optional in for simple-weather and simple-webapp pom.xml s:

<parent>
    <groupId>org.sonatype.mavenbook.multi</groupId>
    <artifactId>simple-parent</artifactId>
    <version>1.0</version>
</parent>

When using maven-versions-plugin, and attempting to update the version of all child modules, I've found that if you're NOT specifying the parent in your child pom.xml (or if the child references a different parent), then version updates no longer propagate to the children.

Do you know why is that, and/or how I can workaround this? I should mention that I really do need to have my children pom.xmls with different parents, so it is not really an option to put the Reactor's pom.xml as their parent (for example one module is a client module which inherits from company's standard pom.xml for client modules, while the other is a server module which inherits from company's standard pom.xml for server modules).

0

There are 0 answers