I am trying to use a Maven Versions Plugin to upgrade all the child POM's to parent version and execute the build of all child modules in the parent pom.The Pom Files look like this
Parent POM
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.build.pom</groupId>
<artifactId>basepom</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<modules>
<module>
<module>../Common</module>
<module>
<modules>
<!-- . . . -->
</project>
Child Pom
<parent>
<artifactId>basepom</artifactId>
<groupId>com.build.pom</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.child.common</groupId>
<artifactId>common</artifactId>
<packaging>jar</packaging>
<name>Common</name>
<description>Common Jar</description>
Now if I run a Maven build on the base POM using the command from Eclipse
mvn clean install
The child module is getting build properly however if I update the basepom version to 2.0 and use version plugin command
mvn clean -N versions:update-child-modules install
The versions are getting updated however the child modules are not getting built. Only the base pom gets build.
Do I have to explicitly specify to build the child modules in some Phase? What am I missing?.