You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "DeGrande, Rick" <Ri...@firstdata.com> on 2010/07/08 00:34:34 UTC

maven release plugin not updating sub-module dependencies

I have a multi--module configuration.  the directory structure is:

aggregate
ejb
war

The war file includes the ejb as a dependency.  When I do a
release:prepare -DdryRun maven generates the pom.xml.tag correctly but
it doesn't update the sub module dependencies in the pom.xml.next.  How
do I get it to update the sub-module dependencies ?

 

thanks




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

RE: maven release plugin not updating sub-module dependencies

Posted by "DeGrande, Rick" <Ri...@firstdata.com>.
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:didik@magenta-technology.ru] 
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. 

Re: maven release plugin not updating sub-module dependencies

Posted by Aleksey Didik <di...@magenta-technology.ru>.
  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.









RE: maven release plugin not updating sub-module dependencies

Posted by "DeGrande, Rick" <Ri...@firstdata.com>.
Aleksey,

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. 

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

Thanks for your response

Rick

-----Original Message-----
From: Aleksey Didik [mailto:didik@magenta-technology.ru] 
Sent: Thursday, July 08, 2010 8:12 AM
To: Maven Users List
Subject: Re: maven release plugin not updating sub-module dependencies


  Hello Rick.

In this case release will not change dependencies versions, because 
maven have no difference between external artifact and module artifact.
My suggestion is to use ${project.version} and <dependencyManagement> 
for cross module dependencies.

hth,
Aleksey Didik.

08.07.2010 17:59, DeGrande, Rick пишет:
> No, I was thinking about doing that, but I have the dependencies in the sibling poms.  I'm not using the ${project.version} in these poms.  I just have the SNAPSHOT version specified on the sibling dependencies.
>
>
> Thanks
> Rick
>
> -----Original Message-----
> From: Aleksey Didik [mailto:didik@magenta-technology.ru]
> Sent: Thursday, July 08, 2010 1:14 AM
> To: Maven Users List
> Subject: Re: maven release plugin not updating sub-module dependencies
>
>
>    Hello, Rick.
> Please, clarify, how do you define submodule dependency?
> Do you use<dependecyManagement>  section in parent pom with
> ${project.version} property?
>
> Best regards,
> Aleksey Didik.
>
>
> 08.07.2010 2:34, DeGrande, Rick пишет:
>> I have a multi--module configuration.  the directory structure is:
>>
>> aggregate
>> ejb
>> war
>>
>> The war file includes the ejb as a dependency.  When I do a
>> release:prepare -DdryRun maven generates the pom.xml.tag correctly but
>> it doesn't update the sub module dependencies in the pom.xml.next.  How
>> do I get it to update the sub-module dependencies ?
>>
>>
>>
>> thanks
>>
>>
>>
>>
>> -----------------------------------------
>> 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.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven release plugin not updating sub-module dependencies

Posted by Aleksey Didik <di...@magenta-technology.ru>.
  Hello Rick.

In this case release will not change dependencies versions, because 
maven have no difference between external artifact and module artifact.
My suggestion is to use ${project.version} and <dependencyManagement> 
for cross module dependencies.

hth,
Aleksey Didik.

08.07.2010 17:59, DeGrande, Rick пишет:
> No, I was thinking about doing that, but I have the dependencies in the sibling poms.  I'm not using the ${project.version} in these poms.  I just have the SNAPSHOT version specified on the sibling dependencies.
>
>
> Thanks
> Rick
>
> -----Original Message-----
> From: Aleksey Didik [mailto:didik@magenta-technology.ru]
> Sent: Thursday, July 08, 2010 1:14 AM
> To: Maven Users List
> Subject: Re: maven release plugin not updating sub-module dependencies
>
>
>    Hello, Rick.
> Please, clarify, how do you define submodule dependency?
> Do you use<dependecyManagement>  section in parent pom with
> ${project.version} property?
>
> Best regards,
> Aleksey Didik.
>
>
> 08.07.2010 2:34, DeGrande, Rick пишет:
>> I have a multi--module configuration.  the directory structure is:
>>
>> aggregate
>> ejb
>> war
>>
>> The war file includes the ejb as a dependency.  When I do a
>> release:prepare -DdryRun maven generates the pom.xml.tag correctly but
>> it doesn't update the sub module dependencies in the pom.xml.next.  How
>> do I get it to update the sub-module dependencies ?
>>
>>
>>
>> thanks
>>
>>
>>
>>
>> -----------------------------------------
>> 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.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: maven release plugin not updating sub-module dependencies

Posted by "DeGrande, Rick" <Ri...@firstdata.com>.
No, I was thinking about doing that, but I have the dependencies in the sibling poms.  I'm not using the ${project.version} in these poms.  I just have the SNAPSHOT version specified on the sibling dependencies.


Thanks
Rick

-----Original Message-----
From: Aleksey Didik [mailto:didik@magenta-technology.ru] 
Sent: Thursday, July 08, 2010 1:14 AM
To: Maven Users List
Subject: Re: maven release plugin not updating sub-module dependencies


  Hello, Rick.
Please, clarify, how do you define submodule dependency?
Do you use <dependecyManagement> section in parent pom with 
${project.version} property?

Best regards,
Aleksey Didik.


08.07.2010 2:34, DeGrande, Rick пишет:
> I have a multi--module configuration.  the directory structure is:
>
> aggregate
> ejb
> war
>
> The war file includes the ejb as a dependency.  When I do a
> release:prepare -DdryRun maven generates the pom.xml.tag correctly but
> it doesn't update the sub module dependencies in the pom.xml.next.  How
> do I get it to update the sub-module dependencies ?
>
>
>
> thanks
>
>
>
>
> -----------------------------------------
> 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven release plugin not updating sub-module dependencies

Posted by Aleksey Didik <di...@magenta-technology.ru>.
  Hello, Rick.
Please, clarify, how do you define submodule dependency?
Do you use <dependecyManagement> section in parent pom with 
${project.version} property?

Best regards,
Aleksey Didik.


08.07.2010 2:34, DeGrande, Rick пишет:
> I have a multi--module configuration.  the directory structure is:
>
> aggregate
> ejb
> war
>
> The war file includes the ejb as a dependency.  When I do a
> release:prepare -DdryRun maven generates the pom.xml.tag correctly but
> it doesn't update the sub module dependencies in the pom.xml.next.  How
> do I get it to update the sub-module dependencies ?
>
>
>
> thanks
>
>
>
>
> -----------------------------------------
> 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org