You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Abid Hussain <hu...@gmx.de> on 2011/09/23 12:08:25 UTC

Incremet SNAPSHOT dependency when release

Hello,

my question is about how SNAPSHOT dependencies between submodules in multi module projects can be automatically incremented when performing a release.

Let's give an example: I've a multi module project P with two sub modules A and B. Current version is 1.0-SNAPSHOT. The version number is only declared in P. A and B inherit P's version.

A is dependent on B 1.0-SNAPSHOT: A -> B (1.0-SNAPSHOT).

Now I prepare a release of P by calling mvn release:prepare in the root directory of P. The release preparation is done and the dependency from A to B is changed to 1.0 in the tagged version. On my local machine the version of P is incremented to 1.1-SNAPSHOT, same is done with the parent version declaration in A and B (incremented to 1.1-SNAPSHOT).

But, on my local machine the dependency from A to B is still of version 1.0-SNAPSHOT. Is there a way to configure that also the dependencies between modules in a multi-module project is to be incremented after a release?

Regards,

Abid
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

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


Re: Incremet SNAPSHOT dependency when release

Posted by Anders Hammar <an...@hammar.net>.
I thought that the release plugin handled this. But I have never
tried, as I always use the ${project.version} property for specifying
version within a multi-module project. That would solve your problem.

/Anders

On Fri, Sep 23, 2011 at 12:08, Abid Hussain <hu...@gmx.de> wrote:
> Hello,
>
> my question is about how SNAPSHOT dependencies between submodules in multi module projects can be automatically incremented when performing a release.
>
> Let's give an example: I've a multi module project P with two sub modules A and B. Current version is 1.0-SNAPSHOT. The version number is only declared in P. A and B inherit P's version.
>
> A is dependent on B 1.0-SNAPSHOT: A -> B (1.0-SNAPSHOT).
>
> Now I prepare a release of P by calling mvn release:prepare in the root directory of P. The release preparation is done and the dependency from A to B is changed to 1.0 in the tagged version. On my local machine the version of P is incremented to 1.1-SNAPSHOT, same is done with the parent version declaration in A and B (incremented to 1.1-SNAPSHOT).
>
> But, on my local machine the dependency from A to B is still of version 1.0-SNAPSHOT. Is there a way to configure that also the dependencies between modules in a multi-module project is to be incremented after a release?
>
> Regards,
>
> Abid
> --
> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
>
> ---------------------------------------------------------------------
> 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: Incremet SNAPSHOT dependency when release

Posted by Jörg Schaible <jo...@gmx.de>.
Hi Abid,

Abid Hussain wrote:

> Hello,
> 
> my question is about how SNAPSHOT dependencies between submodules in multi
> module projects can be automatically incremented when performing a
> release.
> 
> Let's give an example: I've a multi module project P with two sub modules
> A and B. Current version is 1.0-SNAPSHOT. The version number is only
> declared in P. A and B inherit P's version.
> 
> A is dependent on B 1.0-SNAPSHOT: A -> B (1.0-SNAPSHOT).
> 
> Now I prepare a release of P by calling mvn release:prepare in the root
> directory of P. The release preparation is done and the dependency from A
> to B is changed to 1.0 in the tagged version. On my local machine the
> version of P is incremented to 1.1-SNAPSHOT, same is done with the parent
> version declaration in A and B (incremented to 1.1-SNAPSHOT).
> 
> But, on my local machine the dependency from A to B is still of version
> 1.0-SNAPSHOT. Is there a way to configure that also the dependencies
> between modules in a multi-module project is to be incremented after a
> release?

Use a depMgmt section in P to declare the version of A and B and do omit the 
version in the dependency list of A. That way the release plugin will also 
update the version in the depMgmt section of P.

- Jörg


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