Update (19-Jun-2017) - After looking at this more and reading through Maven CI Friendly Versions I've updated this post to reflect how this should be done with Maven 3.5.
My new approach is to set up the parent POM as follows (this actually stays the same as in my previous post):
Parent POM
<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>maven.test1</groupId>
<artifactId>maven-test1-parent</artifactId>
<version>${revision}</version> <!-- update 19-Jun-2017 - this is not changed -->
<properties>
<revision>42.0</revision>
</properties>
<name>${project.artifactId}</name>
<description>Main POM file for ${project.artifactId}</description>
<packaging>pom</packaging>
<modules>
<module>Child1</module>
</modules>
</project>
Update (19-Jun-2017) - the parent POM doesn't change.
The child/sub-module POM now changes to this:
Child POM
<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>maven.test1</groupId>
<artifactId>maven-test1-parent</artifactId>
<version>${revision}</version> <!-- this is changed from [1.0,99.0) to ${revision} -->
</parent>
<artifactId>maven-test1-child1</artifactId>
<name>${project.artifactId}</name>
</project>
Update (19-Jun-2017) - the parent reference is now ${revision} and since the parent POM sets its version to ${revision} as well, the child POM will inherit that.
So this approach still lets you version your modules from one place and removes the need to use the hack-ey parent version range string. This also works in Maven 3.3.3.
Also since the ${revision} property can be set via the command line, there is no need to update the parent POM whenever the revision for the build changes, you can just do this:
Command
mvn clean install -Drevision=42.1
-i