[ 
http://jira.codehaus.org/browse/MRELEASE-252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=161132#action_161132
 ] 

Sylvain MariƩ edited comment on MRELEASE-252 at 1/28/09 1:12 PM:
-----------------------------------------------------------------

Actually the desired behaviour would be a bit more complex for option 2. Let's 
say I have the following layout:

parentPom 0.0.4-SNAPSHOT
|
--- module O 0.0.1-SNAPSHOT 
     (depends on A 0.0.2-SNAPSHOT) (inherits from parentPom 0.0.4-SNAPSHOT)
|
---module A 0.0.2-SNAPSHOT 
     (depends on B 0.0.1-SNAPSHOT and C 0.0.2-SNAPSHOT) (inherits from 
parentPom 0.0.4-SNAPSHOT)
|
---module B 0.0.1-SNAPSHOT 
     (inherits from parentPom 0.0.4-SNAPSHOT)
|
--- module C 0.0.2-SNAPSHOT 
     (inherits from parentPom 0.0.4-SNAPSHOT)

I would like to be able to prepare/perform a release on a subset, lets say 
parent + modules A and B. First I need to tell the plugin that I want this 
subset. There are several ways to do it: 
a) in the pom, under maven-release configuration: 
<partialReleases>
    <customrelease1>this,A,B</customrelease1> // "this" designating the parent 
here
    <customrelease2>A,B</customrelease2> // parent would not be released
     //note : which names shall we use ? artifactIds or same as <module> names ?
</partialReleases>
One of these partial releases could be then chosen through commandline 
(-DpartialRelease=customrelease1)
b) through direct commandLine arguments (-DpartialRelease="this,A,B")
c) in the release.properties file (?)
d) in a separate file (one per custom release), for example 
"customrelease1.subset". This file would be given to the plugin through a 
commandline argument (e.g. -DpartialRelease=customrelease1.subset )
...


Assume that I found a way to choose subset "parent, A, B". The output of the 
default behaviour should probably be:

Releases: 

parentPom 0.0.4
---module A 0.0.2
     (depends on B 0.0.1 and C 0.0.1) (inherits from parentPom 0.0.4)
---module B 0.0.1
     (inherits from parentPom 0.0.4)

this is a "normal" behaviour except that dependency to modules not included 
(here, C) are by default set to the previous release (or another version 
choosen by user, if needed)


New Trunk:

parentPom 0.0.5-SNAPSHOT
|
--- module O 0.0.1-SNAPSHOT 
     (depends on A 0.0.3-SNAPSHOT) (inherits from parentPom 0.0.5-SNAPSHOT)
|
---module A 0.0.3-SNAPSHOT 
     (depends on B 0.0.2-SNAPSHOT and C 0.0.2-SNAPSHOT) (inherits from 
parentPom 0.0.5-SNAPSHOT)
|
---module B 0.0.2-SNAPSHOT 
     (inherits from parentPom 0.0.5-SNAPSHOT)
|
--- module C 0.0.2-SNAPSHOT 
     (inherits from parentPom 0.0.5-SNAPSHOT)

Here the new versions are set as usual, but modules that were not released are 
still updated too, to the correct dependency version and correct parent (O, C).

Another thought: maybe it would also be interesting to update modules A and B 
but not the parent (if you decide that the parent version should not change 
because its pom hasn't changed at all). In such case it is the same than for 
dependencies: previous version of the parent should be used.


Now I tried to reach this goal by creating profiles with partial subsets of 
modules, but this does not work well with current version of maven-release. Is 
by any chance such a fix planned ?

      was (Author: slysha):
    Actually the desired behaviour would be a bit more complex for option 2. 
Let's say I have the following layout:

parentPom 0.0.4-SNAPSHOT
---module A 0.0.2-SNAPSHOT 
     (depends on B 0.0.1-SNAPSHOT and D 0.0.2-SNAPSHOT) (inherits from 
parentPom 0.0.4-SNAPSHOT)
---module B 0.0.1-SNAPSHOT 
     (inherits from parentPom 0.0.4-SNAPSHOT)
--- module C 0.0.1-SNAPSHOT 
     (depends on A 0.0.2-SNAPSHOT) (inherits from parentPom 0.0.4-SNAPSHOT)
--- module D 0.0.2-SNAPSHOT 
     (inherits from parentPom 0.0.4-SNAPSHOT)

I would like to be able to prepare/perform a release on a subset, lets say 
parent + modules A and B.
The output of the default behaviour should probably be:

Releases: 

parentPom 0.0.4
---module A 0.0.2
     (depends on B 0.0.1 and D 0.0.1) (inherits from parentPom 0.0.4)
---module B 0.0.1
     (inherits from parentPom 0.0.4)

this is a "normal" behaviour except that dependency to modules not included 
(here, D) are by default set to the previous release (or another version 
choosen by user, if needed)


New Trunk:

parentPom 0.0.5-SNAPSHOT
---module A 0.0.3-SNAPSHOT 
     (depends on B 0.0.2-SNAPSHOT and D 0.0.2-SNAPSHOT) (inherits from 
parentPom 0.0.5-SNAPSHOT)
---module B 0.0.2-SNAPSHOT 
     (inherits from parentPom 0.0.5-SNAPSHOT)
--- module C 0.0.1-SNAPSHOT 
     (depends on A 0.0.3-SNAPSHOT) (inherits from parentPom 0.0.5-SNAPSHOT)
--- module D 0.0.2-SNAPSHOT 
     (inherits from parentPom 0.0.5-SNAPSHOT)

Here the new versions are set as usual, but modules that were not released are 
still updated too, to the correct dependency version and correct parent (C, D).

Another thought: maybe it would also be interesting to update modules A and B 
but not the parent (if you decide that the parent version should not change 
because its pom hasn't changed at all). In such case it is the same than for 
dependencies: previous version of the parent should be used.


Now I tried to reach this goal by creating profiles with partial subsets of 
modules, but this does not work well with current version of maven-release. Is 
by any chance such a fix planned ?
  
> Support for multi modules project
> ---------------------------------
>
>                 Key: MRELEASE-252
>                 URL: http://jira.codehaus.org/browse/MRELEASE-252
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: perform, prepare, stage
>    Affects Versions: 2.0-beta-6
>         Environment: Maven 2.0.6
>            Reporter: Franck HUGOT
>
> I would like to prepare a release for multi-modules project.
> I would create tags for all the modules and modify poms.
> Not only the versionId in the pom but also the eventual dependencies between 
> all the modules.
> Indeed, if a module A has a dependency to module B, the version will be 
> updated.
> The dependency management is a hard task in multi modules project and this 
> feature would be really appreciated.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to