Konubinix' opinionated web of thoughts

Avoid Specifying the Version Several Times in Maven

Fleeting

Maven – Maven CI Friendly Versions

You should define the version either via property in the parent or use the .mvn/maven.config file

solution for this is to simply use a property inside the pom file

<project> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache</groupId> <artifactId>apache</artifactId> <version>18</version> </parent> <groupId>org.apache.maven.ci</groupId> <artifactId>ci-parent</artifactId> <name>First CI Friendly</name> <version>${revision}</version> … <properties> <revision>1.0.0-SNAPSHOT</revision> </properties> <modules> <module>child1</module> .. </modules> </project> The child will look like this:

<project> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.maven.ci</groupId> <artifactId>ci-parent</artifactId> <version>${revision}</version> </parent> <groupId>org.apache.maven.ci</groupId> <artifactId>ci-child</artifactId> … </project>