Aleksey,

Thank you for the advice. That looks like it will work much better than what I 
was doing.

Rick

-----Original Message-----
From: Aleksey Didik [mailto:[email protected]] 
Sent: Thursday, July 08, 2010 9:13 AM
To: Maven Users List
Subject: Re: maven release plugin not updating sub-module dependencies

  Rick, see comments below.

> I thought it would update the sibling modules based on the modules included 
> in the parent pom. It updates the sibling dependencies when it changes the 
> tagged version just not the next version.
Look like I've not clear understood release process with sibling 
dependencies. If it updates when it changes the tagged version, but not 
updates next version, it looks like an issue...

> So you're saying move the sibling dependencies to the dependencyManagement 
> and use ${project.version}, or just use ${project.version} in the sibling 
> poms instead of using the X.X-SNAPSHOT version ??

By the way, I use ${project.version}-<dependencyManagement> way in all 
my projects and it's fully cover all necessities.

If you will use ${project.version} instead of using X.X-SNAPSHOT 
version, it could make some troubles, because ${project.version} 
property for current pom (module) is this module version. And if you 
associate dependency version with current module version/ it could be 
not good.

I use this way:

*parent pom.xml:*

<version> 1.0-SNAPSHOT </version>

/<modules>
<module>a-module</module>
<module>b-module</module>
</modules>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>...</groupId>
<artifactId>a-module</artifactId>
<version>${project.version}</version>
</dependency>
<dependencies>
</dependencyManagement>/

*b-module pom.xml:*

/ <dependencies>
<dependency>
<groupId>...</groupId>
<artifactId>a-module</artifactId>
</dependency>
<dependencies>/

In this variant I'm using the same version for all modules in my project 
and all sibling modules depends on each other by project version of 
parent module.
Release plugin update only module version, not dependency versions. All 
dependency versions will be updated automatically by using 
dependencyManagement section and ${project.version} property.
It's usable in most projects, than have no necessity to have different 
versions of project modules.

In this case also usable to set 
/<autoVersionSubmodules>true</autoVersionSubmodules>/ in release plugin 
configuration.
It help you to input release and next version only for parent module, 
sibling modules will use the same version.

Hope this help,
Aleksey.










-----------------------------------------
The information in this message may be proprietary and/or
confidential, and protected from disclosure.  If the reader of this
message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify First Data
immediately by replying to this message and deleting it from your
computer. 

Reply via email to