Just for the record, and for future folks searching this issue, the
versions plugin allows one to synchronize parent/child pom versions
like so:

1. Change the root pom's version
2. Incant: mvn -N versions:update-child-modules

So, yes, the version number is duplicated; but at least there's a
plugin to help you keep them synchronized.

See also: 
http://mojo.codehaus.org/versions-maven-plugin/update-child-modules-mojo.html

Cheers,
-Babak

On Tue, Oct 26, 2010 at 11:58 PM, Babak Farhang <farh...@gmail.com> wrote:
> Hi Arnaud,
>
> Thanks for the info. I'm playing with the versions plugin: hopefully
> that way I wont have to bring scm (release plugin) into the mix in
> order to address this issue.
>
> Babak
>
> 2010/10/26 Arnaud Héritier <aherit...@gmail.com>:
>>>
>>> On Tue, Oct 26, 2010 at 21:00, Arnaud bourree 
>>> <arnaud.bour...@gmail.com>wrote:
>>>
>>>> 2010/10/26 Babak Farhang <farh...@gmail.com>:
>>>>> Hi everyone,
>>>>>
>>>>> I have a nested, multi-module project in which every module's pom
>>>>> inherits from a root pom. I'd like to find a way to avoid duplicating
>>>>> the parent pom version number in every submodule. The aim is to keep
>>>>> the version number for these submodules in sync with one another, from
>>>>> one release to the next. Here's a strategy I've tried using
>>>>> profiles.xml that doesn't quite work.
>>
>> It is impossible for now.
>> It is forbidden/not recommended to use properties in GAV 
>> (GroupId/ArtifactId/Version)
>> The minimum you can do now is to set the version in the parent pom and in 
>> each child in the parent section
>> For dependencies between modules you can use ${project.version}
>> In a near future (Maven 3.1 in theory) you won't have anymore to set the 
>> version in the parent element if your module defines the relative path to 
>> its parent or if it follows the convention to have it in its parent directory
>> To ensure to keep the same version everywhere you use the release plugin 
>> which will update them for you.
>> The versions plugin could help you too.
>>
>> Cheers
>>
>>
>> Arnaud
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to