I agree. See here and vote: http://jira.codehaus.org/browse/MNG-624 

-----Original Message-----
From: Sean McNamara [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 11, 2006 10:20 AM
To: Maven Users List
Subject: RE: [m2] Using variables from parent pom.xml - like version
etc.

Does this really address the issue that Sanjay is trying to solve?  If
the parent definition requires the version to be added, then every time
the version is incremented all child POMs must be updated to reflect the
new parent version.  This means that all POMs in the inheritance
heirarchy must be updated for every version increment.

I've seen some postings talking about using the release-plugin to
automate this behavior (re-versioning all POMs), but haven't found any
good docs on that particular plugin.  Pointers would be appreciated.

Seems odd that this very useful feature of M1 didn't make it into M2.

--- "Brian E. Fox" <[EMAIL PROTECTED]> wrote:

> "Once you've done that, you can leave off the child <version/> 
> elements, and the parent's version will be used." I'll add that it's 
> common to inherit the group too.
> 
> -----Original Message-----
> From: John Casey [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 10, 2006 11:56 PM
> To: Maven Users List
> Subject: Re: [m2] Using variables from parent pom.xml - like version 
> etc.
> 
> There are two requirements for versioning in this
> case:
> 
> 1. The parent POM has to have a valid <version/> element (no 
> expressions here).
> 
> 2. Each child POM must specify a <parent/> element that refers to the 
> parent POM explicitly, including the version declared in the parent 
> POM (again, no expressions here).
> 
> Once you've done that, you can leave off the child <version/> 
> elements, and the parent's version will be used.
> 
> HTH,
> 
> John
> 
> Sanjay Choudhary wrote:
> > Thanks for taking time to reply.
> > 
> > Let me ask my question in different way
> > 
> > Parent Project  currentversion 4.0
> > 
> > project 1 -  extends parent project
> > project 2 -  extends parent project
> > project 3 -  extends parent project and depends on
> project 1 and
> > project 2 ..
> > ..
> > project 35 - extends parent project
> > 
> > 
> > Parent project  + project1..35 make an
> Application.
> > 
> > Life cycle of the parent project + child project's
> is same as
> application.
> > Let us say current version of the application 4.0.
> > 
> > In maven 1.0.2 , we used to define tag
> <currentVersion>
> > 4.0</currentVersion>in parent project.xml Then in
> child projects, for
> > example child project 3, that is dependendent on
> project 1 and project
> 
> > 2, We define dependency as
> > 
> > <artifactId>project1</artifactId>
> > <version>${pom.currentVersion}</version>
> > 
> >  <artifactId>project2</artifactId>
> > <version>${pom.currentVersion}</version>
> > 
> > Now if we hv. to release version 4.1 then all we
> need to do is change
> > the parent project.xml - currentVersion attribute.
>  We don't need to
> > change all the 35 projects for the version.
> > 
> > My question is how can a similar behavior achieved
> in M2.
> > 
> > Thanks,
> > Sanjay
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > On 1/10/06, Napoleon Esmundo Ramirez
> <[EMAIL PROTECTED]> wrote:
> >> Hello,
> >>
> >> I just checked your pom's.  Your parent pom seems
> to be okay.  But I
> >> think your second pom isn't.  When declaring
> parent projects in child
> 
> >> projects
> >> (modules) you should explicitly define the
> version. Try setting it
> >> with 1.0-8, and let's see what happens.
> >>
> >> I hope it works this time. :)
> >>
> >> Cheers!
> >> Nap
> >>
> >> On 1/11/06, Allan Ramirez <[EMAIL PROTECTED]>
> wrote:
> >>> Hi there,
> >>>
> >>> Try to use the <dependencyManangement> element.
> >>>
> >>>
> >>>
> >>
>
http://maven.apache.org/guides/introduction/introduction-to-dependenc
> >> y-mechanism.html
> >>> Regards,
> >>> -allan
> >>>
> >>> Sanjay Choudhary wrote:
> >>>
> >>>> I tried using ${project.version} but got the
> following error
> >>>>
> >>>>
> >>>> [INFO] Trace
> >>>>
> org.apache.maven.reactor.MavenExecutionException:
> POM '
> >>>> org.emember:org_kp_eme
> >>>> mber' not found in repository:
> >>>>
> >>>> 
> org.kp.emember:org_kp_emember:pom:${project.version}
> >>>>
> >>>>
> >>>>
> >>>>> <project
> xmlns="http://maven.apache.org/POM/4.0.0";
> >>>>>  
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >>>>>  
>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> >>>>> http://maven.apache.org/maven-v4_0_0.xsd";>
> >>>>>   <modelVersion>4.0.0</modelVersion>
> >>>>>   <parent>
> >>>>> <groupId>org.emember</groupId>
> >>>>> <artifactId>org_emember</artifactId>
> >>>>> <version>CAN I USE VERSION VARIABLE FROM POM? 
> </version>
> >>>>>   </parent>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>> On 1/10/06, Napoleon Esmundo Ramirez
> <[EMAIL PROTECTED]>
> wrote:
> >>>>
> >>>>
> >>>>> Hello,
> >>>>>
> >>>>> Please try ${project.version}.
> >>>>>
> >>>>> Cheers!
> >>>>> Nap
> >>>>>
> >>>>> On 1/11/06, Sanjay Choudhary
> <[EMAIL PROTECTED]> wrote:
> >>>>>
> >>>>>
> >>>>>> I have parent  pom.xml as below
> >>>>>>
> >>>>>> <project
> xmlns="http://maven.apache.org/POM/4.0.0";
> xmlns:xsi="
> >>>>>> http://www.w3.org/2001/XMLSchema-instance";
> >>>>>> 
>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> >>>>>> http://maven.apache.org/maven-v4_0_0.xsd";>
> >>>>>>  <modelVersion>4.0.0</modelVersion>
> >>>>>>  <groupId>org.emember</groupId>  
> >>>>>> <artifactId>org_emember</artifactId>
> >>>>>>  <packaging>pom</packaging>
> >>>>>>  <version>1.0-8</version>
> >>>>>>  <name>Maven Quick Start Archetype</name> 
> >>>>>> <url>http://maven.apache.org</url>
> >>>>>>  <dependencies>
> >>>>>>  </dependencies>
> >>>>>> </project>
> >>>>>>
> >>>>>>
> >>>>>> Then I have pom.xml for each module <project
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

---------------------------------------------------------------------
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]

Reply via email to