You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Christian Goetze <ch...@sensage.com> on 2006/11/14 20:23:45 UTC

Version management question

I recently asked the question below, but no answer.

I was wondering whether I really need to edit all pom.xml files in all 
my project whenever I bump version numbers.

I'm still new at this, so if this is a trivial question, please bear 
with me...
--
cg

Christian Goetze wrote:

> Why can't I do this:
>
> <project>
>  <modelVersion>4.0.0</modelVersion>
>
>  <!-- This project belongs to ... -->
>  <parent>
>   <groupId>com.sensage</groupId>
>   <artifactId>sensage</artifactId>
>   <version>${sensage-version}</version>
>  </parent>
>
> I do run "mvn -Dsensage-version=3.6"...
>
> It works fine when I run from the top of the project down.
> -- 
> cg
>
> ---------------------------------------------------------------------
> 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: Version management question

Posted by Christian Goetze <ch...@sensage.com>.
Lee Meador wrote:

> This does not work.
>
> If you think about it you can see why.
>
> You would define 'sensage-version' in the parent pom and use it in all 
> the
> children. The problem is that as it is parsing the child pom, maven 
> has to
> find the parent. To do that, it looks in the <parent> section and has 
> to use
> the value of "sensage-version'.

Not really, since I pass in  the value of sensage-version via a -D flag. 
Maven just refuses to resolve it within a <parent>...</parent> section.

>
> Its a classic catch-22 situation. You can't find the parent without the
> value of 'sensage-version' and you you can't find the value of
> 'sensage-versin' without the parent.

Yeah, I guess so... I'm wondering, though, why maven can't just go look 
in the parent directory for a pom.xml file and not require me to specify 
where the parent is - after all, maven has no qualms about imposing all 
sorts of directory structure conventions, so why not just go that extra 
step, or at least have a tag "use whatever is in the parent directory"....

Meanwhile, I guess I just need to live with having to manage all 
versions in all the pom.xml files by hand - sigh -.
--
cg

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


Re: Version management question

Posted by Lee Meador <le...@leemeador.com>.
This does not work.

If you think about it you can see why.

You would define 'sensage-version' in the parent pom and use it in all the
children. The problem is that as it is parsing the child pom, maven has to
find the parent. To do that, it looks in the <parent> section and has to use
the value of "sensage-version'.

Its a classic catch-22 situation. You can't find the parent without the
value of 'sensage-version' and you you can't find the value of
'sensage-versin' without the parent.

-- Lee

On 11/14/06, Christian Goetze <ch...@sensage.com> wrote:
>
> I recently asked the question below, but no answer.
>
> I was wondering whether I really need to edit all pom.xml files in all
> my project whenever I bump version numbers.
>
> I'm still new at this, so if this is a trivial question, please bear
> with me...
> --
> cg
>
> Christian Goetze wrote:
>
> > Why can't I do this:
> >
> > <project>
> >  <modelVersion>4.0.0</modelVersion>
> >
> >  <!-- This project belongs to ... -->
> >  <parent>
> >   <groupId>com.sensage</groupId>
> >   <artifactId>sensage</artifactId>
> >   <version>${sensage-version}</version>
> >  </parent>
> >
> > I do run "mvn -Dsensage-version=3.6"...
> >
> > It works fine when I run from the top of the project down.
> > --
> > cg
> >
> > ---------------------------------------------------------------------
> > 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
>
>


-- 
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com