You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jens Hohl <ho...@ibidem.de> on 2007/06/15 10:07:33 UTC

Versions in a Multiproject

Good Morning,

 

 

Can someone point me to infos how i can set the version in a
Multiproject ?

In my parent pom file the <version><version> Tag contains e.g
1.0-SNAPSHOT.

How can I refer to that value in my child POMs ? What's best way to do
that ?

 

Regards,

Jens


Re: Versions in a Multiproject

Posted by Stephen Connolly <st...@gmail.com>.
aha I remember now

if you have the parent also the parent folder then the default value  
of project/parent/relativePath which is ../pom.XML will kick in

if you move the parent and don't set relative path then it won't find  
the newer version of the patent that you have locally

Sent from my iPod

On 24 Aug 2008, at 16:05, Stephen Connolly <stephen.alan.connolly@gmail.com 
 > wrote:

> ok, here is one "solution"
>
> the current behaviour is that if you have the parent in the reactor  
> (possibly only if it is also the parent folder) then maven ignores  
> the version.
>
> what I would do is separate the parent from aggregation
>
> so the project you use as parent does not have any child modules
>
> this might be enough to solve your issues. if not, I would then take  
> a look at the version-maven-plugin and its update-parent goal
>
> Sent from my iPod
>
> On 20 Aug 2008, at 01:39, mfs <fa...@gmail.com> wrote:
>
>>
>> Has anyone been able to figure out an alternate solution where  
>> doesnt need to
>> specify the "<version>${pom.parent.version}</version>" in every  
>> pom ? and be
>> able to inherit/refer the parent pom, so that we can specify the pom
>> version(s) in a multi-module project at one place, and hence make the
>> branching easy..
>>
>>
>>
>> Petr Ferschmann wrote:
>>>
>>> Hello,
>>>
>>> The solution is not that simple. The problem with inherited  
>>> version is
>>> if you enter only the subproject (and run mvn command there), the  
>>> newest
>>> version (I think) of parent pom.xml is always used.
>>> So if you checkout older version, it can make problems.
>>>
>>> So we used different approach, we specify in every pom.xml the  
>>> parent
>>> version. For project version we use
>>> <version>${pom.parent.version}</version>.
>>>
>>> The only working solution is using the maven release plugin (it
>>> increases version when releasing new version).
>>> Without that I was not able to use simple way for version handling.
>>>
>>> How others handle that?
>>>
>>> Petr
>>>
>>>
>>> Maria Odea Ching píše v Pá 15. 06. 2007 v 16:43 +0800:
>>>
>>>> You can do that by not specifying the <version> element in your  
>>>> child
>>>> pom. The child pom would automatically inherit its parent's version
>>>> which you specified in the <parent> block.
>>>>
>>>> See
>>>> http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project%20Inheritance
>>>>
>>>> -Deng
>>>>
>>>> Jens Hohl wrote:
>>>>> Good Morning,
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Can someone point me to infos how i can set the version in a
>>>>> Multiproject ?
>>>>>
>>>>> In my parent pom file the <version><version> Tag contains e.g
>>>>> 1.0-SNAPSHOT.
>>>>>
>>>>> How can I refer to that value in my child POMs ? What's best way  
>>>>> to do
>>>>> that ?
>>>>>
>>>>>
>>>>>
>>>>> Regards,
>>>>>
>>>>> Jens
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --- 
>>>> ------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>
>>> Petr Ferschmann
>>>
>>>
>>> SoftEU s.r.o.
>>> -----------------------------------
>>> Bolevecká 6
>>> 301 00 Plzen
>>> Czech Republic
>>> -----------------------------------
>>> Phone: +420 373 731 284
>>>      +420 373 729 300
>>> Fax:   +420 373 729 301
>>> Cell:  +420 775 638 008
>>> E-mail: pferschmann@softeu.com
>>>
>>>
>>
>> -- 
>> View this message in context: http://www.nabble.com/Versions-in-a-Multiproject-tp11135002p19061164.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>

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


Re: Versions in a Multiproject

Posted by Stephen Connolly <st...@gmail.com>.
ok, here is one "solution"

the current behaviour is that if you have the parent in the reactor  
(possibly only if it is also the parent folder) then maven ignores the  
version.

what I would do is separate the parent from aggregation

so the project you use as parent does not have any child modules

this might be enough to solve your issues. if not, I would then take a  
look at the version-maven-plugin and its update-parent goal

Sent from my iPod

On 20 Aug 2008, at 01:39, mfs <fa...@gmail.com> wrote:

>
> Has anyone been able to figure out an alternate solution where  
> doesnt need to
> specify the "<version>${pom.parent.version}</version>" in every  
> pom ? and be
> able to inherit/refer the parent pom, so that we can specify the pom
> version(s) in a multi-module project at one place, and hence make the
> branching easy..
>
>
>
> Petr Ferschmann wrote:
>>
>> Hello,
>>
>> The solution is not that simple. The problem with inherited version  
>> is
>> if you enter only the subproject (and run mvn command there), the  
>> newest
>> version (I think) of parent pom.xml is always used.
>> So if you checkout older version, it can make problems.
>>
>> So we used different approach, we specify in every pom.xml the parent
>> version. For project version we use
>> <version>${pom.parent.version}</version>.
>>
>> The only working solution is using the maven release plugin (it
>> increases version when releasing new version).
>> Without that I was not able to use simple way for version handling.
>>
>> How others handle that?
>>
>> Petr
>>
>>
>> Maria Odea Ching píše v Pá 15. 06. 2007 v 16:43 +0800:
>>
>>> You can do that by not specifying the <version> element in your  
>>> child
>>> pom. The child pom would automatically inherit its parent's version
>>> which you specified in the <parent> block.
>>>
>>> See
>>> http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project%20Inheritance
>>>
>>> -Deng
>>>
>>> Jens Hohl wrote:
>>>> Good Morning,
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Can someone point me to infos how i can set the version in a
>>>> Multiproject ?
>>>>
>>>> In my parent pom file the <version><version> Tag contains e.g
>>>> 1.0-SNAPSHOT.
>>>>
>>>> How can I refer to that value in my child POMs ? What's best way  
>>>> to do
>>>> that ?
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Jens
>>>>
>>>>
>>>>
>>>
>>>
>>> --- 
>>> ------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>
>> Petr Ferschmann
>>
>>
>> SoftEU s.r.o.
>> -----------------------------------
>> Bolevecká 6
>> 301 00 Plzen
>> Czech Republic
>> -----------------------------------
>> Phone: +420 373 731 284
>>       +420 373 729 300
>> Fax:   +420 373 729 301
>> Cell:  +420 775 638 008
>> E-mail: pferschmann@softeu.com
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Versions-in-a-Multiproject-tp11135002p19061164.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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


Re: Versions in a Multiproject

Posted by mfs <fa...@gmail.com>.
Has anyone been able to figure out an alternate solution where doesnt need to
specify the "<version>${pom.parent.version}</version>" in every pom ? and be
able to inherit/refer the parent pom, so that we can specify the pom
version(s) in a multi-module project at one place, and hence make the
branching easy..



Petr Ferschmann wrote:
> 
> Hello, 
> 
> The solution is not that simple. The problem with inherited version is
> if you enter only the subproject (and run mvn command there), the newest
> version (I think) of parent pom.xml is always used. 
> So if you checkout older version, it can make problems.
> 
> So we used different approach, we specify in every pom.xml the parent
> version. For project version we use
> <version>${pom.parent.version}</version>.
> 
> The only working solution is using the maven release plugin (it
> increases version when releasing new version). 
> Without that I was not able to use simple way for version handling.
> 
> How others handle that?
> 
> Petr
> 
> 
> Maria Odea Ching píše v Pá 15. 06. 2007 v 16:43 +0800:
> 
>> You can do that by not specifying the <version> element in your child 
>> pom. The child pom would automatically inherit its parent's version 
>> which you specified in the <parent> block.
>> 
>> See 
>> http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project%20Inheritance
>> 
>> -Deng
>> 
>> Jens Hohl wrote:
>> > Good Morning,
>> >
>> >  
>> >
>> >  
>> >
>> > Can someone point me to infos how i can set the version in a
>> > Multiproject ?
>> >
>> > In my parent pom file the <version><version> Tag contains e.g
>> > 1.0-SNAPSHOT.
>> >
>> > How can I refer to that value in my child POMs ? What's best way to do
>> > that ?
>> >
>> >  
>> >
>> > Regards,
>> >
>> > Jens
>> >
>> >
>> >   
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
> 
> Petr Ferschmann 
> 
> 
> SoftEU s.r.o.
> -----------------------------------
> Bolevecká 6
> 301 00 Plzen
> Czech Republic
> -----------------------------------
> Phone: +420 373 731 284
>        +420 373 729 300
> Fax:   +420 373 729 301
> Cell:  +420 775 638 008
> E-mail: pferschmann@softeu.com 
> 
> 

-- 
View this message in context: http://www.nabble.com/Versions-in-a-Multiproject-tp11135002p19061164.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Versions in a Multiproject

Posted by Petr Ferschmann <pf...@softeu.com>.
Hello, 

The solution is not that simple. The problem with inherited version is
if you enter only the subproject (and run mvn command there), the newest
version (I think) of parent pom.xml is always used. 
So if you checkout older version, it can make problems.

So we used different approach, we specify in every pom.xml the parent
version. For project version we use
<version>${pom.parent.version}</version>.

The only working solution is using the maven release plugin (it
increases version when releasing new version). 
Without that I was not able to use simple way for version handling.

How others handle that?

Petr


Maria Odea Ching píše v Pá 15. 06. 2007 v 16:43 +0800:

> You can do that by not specifying the <version> element in your child 
> pom. The child pom would automatically inherit its parent's version 
> which you specified in the <parent> block.
> 
> See 
> http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project%20Inheritance
> 
> -Deng
> 
> Jens Hohl wrote:
> > Good Morning,
> >
> >  
> >
> >  
> >
> > Can someone point me to infos how i can set the version in a
> > Multiproject ?
> >
> > In my parent pom file the <version><version> Tag contains e.g
> > 1.0-SNAPSHOT.
> >
> > How can I refer to that value in my child POMs ? What's best way to do
> > that ?
> >
> >  
> >
> > Regards,
> >
> > Jens
> >
> >
> >   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

Petr Ferschmann 


SoftEU s.r.o.
-----------------------------------
Bolevecká 6
301 00 Plzen
Czech Republic
-----------------------------------
Phone: +420 373 731 284
       +420 373 729 300
Fax:   +420 373 729 301
Cell:  +420 775 638 008
E-mail: pferschmann@softeu.com 

Re: Versions in a Multiproject

Posted by Maria Odea Ching <oc...@exist.com>.
You can do that by not specifying the <version> element in your child 
pom. The child pom would automatically inherit its parent's version 
which you specified in the <parent> block.

See 
http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project%20Inheritance

-Deng

Jens Hohl wrote:
> Good Morning,
>
>  
>
>  
>
> Can someone point me to infos how i can set the version in a
> Multiproject ?
>
> In my parent pom file the <version><version> Tag contains e.g
> 1.0-SNAPSHOT.
>
> How can I refer to that value in my child POMs ? What's best way to do
> that ?
>
>  
>
> Regards,
>
> Jens
>
>
>   


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