Dave,

I'm not sure this is the solution to your problem but I thought I would
share what we do and maven handles this nicely.

In any of the sub-projects where you want to refer to dependencies on
other sub-projects that are children of the parent we use the ${version}
macro as the version.  Ex:

<dependencies>
    <dependency>
      <groupId>myGroup</groupId>
      <artifactId>A</artifactId>
      <version>${version}</version>
    </dependency>
    <dependency>
      <groupId> myGroup </groupId>
      <artifactId>B</artifactId>
      <version>${version}</version>
    </dependency>
</dependencies>

Now in the version tag of each sub-project as well as the parent we do
use a real snapshot version ex: 1.212-SNAPSHOT.  When we do a release
maven will auto create the release version and then increment for the
next snapshot.

I hope this helps.

-Dave


-----Original Message-----
From: David C. Hicks [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 18, 2007 7:30 PM
To: [email protected]
Subject: release-plugin, inheritance, and dependencies

Hi,

I've got a bit of a quandry with respect to release:prepare that I hope 
someone can shed some light on.

Assume that we have a parent project called "Master."  Projects A, B, 
and C all inherit from Master, and Master contains module declarations 
for all three so that they can be built as a single unit.  Projects B 
and C depend on project A.  So, if you can imagine the POMs, Master has 
a version and so do projects A, B, and C.  Additionally, all three child

projects refer to Master's version in the <parent> tag.  Also, Projects 
B and C refer to Project A's version in their dependencies list.

Now, I perform release:prepare on Master.  The version of the Master POM

is updated properly, as are the <parent><version> tag references in 
projects A, B, and C.  However, the versions of projects A, B and C 
don't appear to be altered and the dependencies in projects B and C 
definitely do not get changed to refer to the new version of project A.

It's entirely possible that I've got something way-bad wrong being 
rather new to all this.  Can someone either spell out how this SHOULD 
work, or point me to a resource that describes it?  It's near impossible

to find information about this since the keywords "maven", "release", 
and "version" show up in a go-zillion places.  :-)

Thanks,
Dave


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