I have this dependencyManagement in my parent POM of my multi-module project:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>A</artifactId>
<version>3.5</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>B</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>C</artifactId>
<version>1.1</version>
</dependency>
</dependencyManagement>
And this in every child module POM:
Module A:
<parent>
<groupId>${project.groupId}</groupId>
<artifactId>ParentId</artifactId>
<version>1.0</version>
</parent>
<artifactId>A</artifactId>
<version>3.5</version>
<packaging>nbm</packaging>
Module B:
<parent>
<groupId>${project.groupId}</groupId>
<artifactId>ParentId</artifactId>
<version>1.0</version>
</parent>
<artifactId>B</artifactId>
<version>1.0</version>
<packaging>nbm</packaging>
Module C:
<parent>
<groupId>${project.groupId}</groupId>
<artifactId>ParentId</artifactId>
<version>1.0</version>
</parent>
<artifactId>C</artifactId>
<version>1.1</version>
<packaging>nbm</packaging>
Every time that we want to release, we have to check that the version in every child module is the same that the version in the dependencyManagement (developers are asked to change the version in both places every time they change something).
There is some way to check that the versions are the same automaticaly? If the versions are not the same, how could I change them automaticaly?