You can also declare your own properties in a properties section, for
example:
<properties>
  <log4j.version>1.2.14</log4j.version>
</properties>

That you can then refer to with ${log4j.version} anywhere in your poms,
including the child poms. But there's no way to include a properties file
and read the information from there.

Kalle

PS. Note it's usually better to use dependencyManagement for version info,
but the above happens to be a live example for sharing version between
plugin- and dependencyManagement sections.

On 5/6/07, Martin Gilday <[EMAIL PROTECTED]> wrote:

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]


Reply via email to