Why not skip version int the child project poms? It should then be inherited 
from the parent pom.

-----Original Message-----
From: Ron Wheeler [mailto:[email protected]] 
Sent: 13. desember 2011 15:33
To: Maven Users List
Subject: Re: maintaining same version

On 13/12/2011 8:58 AM, Prashant Neginahal wrote:
> For example, spring framework. It has same version for all its modules 
> like spring-core, spring-context etc. I am looking at something like 
> spring to maintain same ver for all modules.

This is true at the time of release but during development, your modules could 
be at various SNAPSHOT versions depending which modules are "finished" or at 
some known state that you want to identify.
As one gets to have more modules, more of the libraries and functional modules 
start to get stable and do not get changed.
You are probably right to publish the public jars (APIs, executable jars, etc) 
with a known release but your internal stuff does not need to have its version 
changed if it does not change.

Automating the setting of versions is not worth the trouble. Saving a few 
seconds of typing in each module is not your biggest problem and it will lead 
to inflexibility in your version process that will be problematic as you get 
better organized and more "Mavenized".

Ron


>
> On 12/13/11, Prashant Neginahal<[email protected]>  wrote:
>> Thanks. But, in this case, how do we release them using release 
>> plug-in. They are not multimodule projects.
>>
>> I would like to have same version for similar "family" of projects 
>> which is controlled by some parent pom. To achieve this, is it 
>> required to have multimodule module project?
>>
>> On 12/13/11, Barrie Treloar<[email protected]>  wrote:
>>> On Tue, Dec 13, 2011 at 4:12 PM, Prashant Neginahal 
>>> <[email protected]>  wrote:
>>>> Thanks for your reply. Are you suggestting something below.
>>>>
>>>> Parent POM.
>>>>
>>>>   <groupId>com.tdsecurities</groupId>
>>>>   <artifactId>test-parent</artifactId>
>>>>   <version>1.0-SNAPSHOT</version>
>>>>
>>>> In all child projects
>>>>
>>>> <parent>
>>>>   <artifactId>test-parent</artifactId>
>>>>   <groupId>com.tdsecurities</groupId>
>>>>   <version>1.0-SNAPSHOT</version>
>>>> </parent>
>>>> <groupId>com.tdsecurities</groupId>
>>>>   <artifactId>test-child</artifactId>
>>>>   <version>${parent.version}</version>
>>> Almost.
>>> <parent>
>>>   <artifactId>test-parent</artifactId>
>>>   <groupId>com.tdsecurities</groupId>
>>>   <version>1.0-SNAPSHOT</version>
>>> </parent>
>>> <groupId>com.tdsecurities</groupId>
>>> <artifactId>test-child</artifactId>
>>>
>>> You dont need the current pom's artifact version.
>>> i.e. deleted<version>${parent.version}</version>
>>> It either inherits it from the parent, or gets it from the parent's 
>>> dependencyManagement section (I dont know which).
>>> The result being you dont need to specify it.
>>>
>>> --------------------------------------------------------------------
>>> - To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


--
Ron Wheeler
President
Artifact Software Inc
email: [email protected]
skype: ronaldmwheeler
phone: 866-970-2435, ext 102



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to