Hello,
I vaguely remember reading a thread a few months ago on this topic, but
could not find it searching nabble.
The question is: how to minize duplication when setting project version
numbers in a multi-module project ? I assume at that time that the version
number should identical for a whole bunch of modules and sub-modules.
I was tempted to do the following:
In the top-level pom:
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.courtanet</groupId>
<artifactId>Benefit</artifactId>
<version>1.1-SNAPSHOT</version>
</parent>
<groupId>net.courtanet</groupId>
<artifactId>myproject</artifactId>
<version>${myproject.version}</version>
<properties>
<myproject.version>1.1-SNAPSHOT</myproject.version>
</properties>
In the modules' poms:
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.courtanet</groupId>
<artifactId>myproject</artifactId>
<version>${myproject.version}</version>
</parent>
<groupId>net.courtanet.myproject</groupId>
<artifactId>myproject-presentation</artifactId>
This works but I had to manually install intermediary pom artifacts. But
once this is done, I can install everything using standard reactor.
I do not feel very comfortable with this solution, because when I change my
version number, I change it in one place, but I need to do some "manual"
work for things to run smoothly. ANd I guess there may be some unforeseen
traps I may fall in.
I was wondering how other people are managing this ? Of course, when you
decouple version numebres between modules, this is not an issue as you need
to maintain links using concrete version numbers.
Best regards,
Arnaud Bailly
Courtanet
--
View this message in context:
http://www.nabble.com/Best-practice-for-handling-multi-modules-version-numbers-tp18031836p18031836.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]