[ 
http://jira.codehaus.org/browse/MVERSIONS-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=236732#action_236732
 ] 

Stephen Connolly commented on MVERSIONS-125:
--------------------------------------------

I think the option 2 would be my preference... but as to whether the oldVersion 
needs to be specified at all or if it should be *, that is a different 
question...

perhaps

-DoldVersion=[,]

would be better as that way you can at least use ranges to select old versions 
and the current default of the project's current version is probably valid for 
legacy behaviour

> Set dependencies to a specific version
> --------------------------------------
>
>                 Key: MVERSIONS-125
>                 URL: http://jira.codehaus.org/browse/MVERSIONS-125
>             Project: Maven 2.x Versions Plugin
>          Issue Type: New Feature
>    Affects Versions: 1.2
>            Reporter: Stefan Seelmann
>
> This is a successor to MVERSIONS-92.
> I'd like to update a specific dependency (defined by groupId and artifactId) 
> to a specific version in all modules of a multi-module build. The current 
> dependency version should not be considered. (BTW, in my case it is not 
> possible to move the dependency versions to the dependencyManagement of the 
> parent pom because the root isn't the parent. Instead such a multi-module 
> build is combined using svn:externals)
> root pom
> |
> |- module foo:bar-a:2.0.7-SNAPSHOT
> |
> |- module foo:bar-b:1.0.3-SNAPSHOT, dependency to foo:bar-a:2.0.5, should be 
> updated to 2.0.6
> |
> |- module foo:bar-c:0.5.0-SNAPSHOT, dependency to foo:bar-a:2.0.2, should be 
> updated to 2.0.6
> The current set goals doesn't work for that case for the following two 
> reasons:
> - I need to define the old version, however I don't know the old version. 
> Even if I knew it I would need to invoke the goal multiple time because the 
> versions can be different.
> - If the module itself is included in the reactor then it also updates the 
> project version of the module. For example, if I'd like to update in all my 
> modules the dependency foo:bar-b to version 2.0.6 and the foo:bar-a project 
> is also in the reactor but has version 2.0.7-SNAPSHOT then its version is 
> also updated to 2.0.6.
> I'll write a patch or a new goal, but wanted to ask how this requirement fits 
> best into the versions plugin. I had the following ideas:
> 1. Create a new goal. 
> MVERSIONS-92 already suggested a new goal. I tested the patch and it works 
> great. The only drawback is that it is a bit cumbersome to invoke:
>   mvn versions:use-specific-version -Dincludes="foo:bar-a" 
> -DnewVersion="2.0.6" -DexcludeReactor=false
> However all in all this is my preferred solution.
> 2. Extend the set goal.
> In that case we could add additional flags processParent, 
> processProject,processDependencies, processPlugins (all true by default to be 
> backward compatible?). Additional it should be allowed to omit the 
> oldVersion, which means that no version match is done: 
>   mvn versions:set -DgroupId="foo" -DartifactId="bar" -DoldVersion="*" 
> -DnewVersion="1.2.3" -DprocessDependencies=true -DprocessProject=false 
> -DprocessParent=false
> Thoughts?

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

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to