I believe that you are correct about not being able to parameterize the
project parent tag, or so a co-worker tells me. He conjectures that the
parent resolution is required before resolution of property names. That
makes sense, since, in general, the value you're looking for could be
defined in the parent pom, but it does create a situation in which it
doesn't seem possible to have your consistent version number for a
multimodule project in a single place. I suspect that the official answer is
that you're the only place you're supposed to impose a single version number
on a multimodule project is via the release plugin, which copies the same
version number into everything you're releasing. It does seem as though
parameterzing parent version tags within a multimodule project might
interfere with the release plugin, or vice versa, even if it were allowed.

-- Bryan

-----Original Message-----
From: Martin Gilday [mailto:[EMAIL PROTECTED] 
Sent: Sunday, May 06, 2007 12:50 PM
To: Maven Users List
Subject: Re: Version number propogation

You can use ${pom.version} in some circumstances.  I think a parent tag
might be a case where you can't though.


----- Original message -----
From: "Howard Lewis Ship" <[EMAIL PROTECTED]>
To: "Maven Users List" <[email protected]>
Date: Sun, 6 May 2007 08:30:45 -0700
Subject: Version number propogation

I have a project with multiple modules.

I'm keeping the version numbers synced.

This ends up with a lot of repetition of the version number:

  <artifactId>tapestry-core</artifactId>
  <packaging>jar</packaging>
  <version>5.0.5-SNAPSHOT</version>
  <parent>
    <groupId>org.apache.tapestry</groupId>
    <artifactId>tapestry-project</artifactId>
    <version>5.0.5-SNAPSHOT</version>
    <relativePath>../tapestry-project/pom.xml</relativePath>
  </parent>


Worse yet, those same version numbers are creeping into documentation
and
into project archetypes.

How would I go about externalizing the version number so that it appears
just once?  I'd love to have something like I used to do in Ant ... a
build.properties file that defines the version number.

Also, is there a general way to include POM properties inside APT
documents
and/or site.xml?

-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.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