Can anyone tell me what is the best/simplest way to maintain a version
number across all the poms in a multi-module project?
They are all to be deployed with the same version every time.
Ideally, the version could be declared in one place (the superpom), and all
children would know to use it.
I've tried doing something like this in the root POM:
<properties>
<parent.groupId>com.something</parent.groupId>
<parent.artifactId>something_parent</parent.artifactId>
<parent.version>2.0</parent.version>
</properties>
and then
<groupId>${parent.groupId}</groupId>
<artifactId>${parent.artifactId}</artifactId>
<version>${varent.version}</version>
in the ROOT POM as well.
Then I have my modules below set their parent to be:
<groupId>${parent.groupId}</groupId>
<artifactId>${parent.artifactId}</artifactId>
<version>${varent.version}</version>
This sort of works, but not great.
What's the best way to do something like this?