Hi Dave,

I typically don't want child projects to have a version different from
the parent.  If I did, I probably wouldn't organize them as subprojects.
So for my subprojects, I omit the version attribute in their POM.  That
way they inherit the version from the parent.

As for dependencies, I do this in A's pom if A depends on B:

  <dependencies>
    <dependency>
      <groupId>${pom.parent.groupId}</groupId>
      <artifactId>B</artifactId>
      <version>${pom.parent.version}</version>
    </dependency>
    ...

Make sense?

Jim

-----Original Message-----
From: David C. Hicks [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 18, 2007 7:30 PM
To: users@maven.apache.org
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