[ 
http://jira.codehaus.org/browse/MNG-3060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_99915
 ] 

Brian Fox commented on MNG-3060:
--------------------------------

Your idea is interesting, but any changes to the pom requires a model change 
that would require a medium version update (ie 2.x not 2.0.x) and would force 
you to update anyway (to get the feature to keep you from updating ;-)  ) Since 
mvn is just a bat or shell script, there's nothing to prevent you from making a 
few of them like m204, m206 etc to launch the correct one. Then you could use 
the enforcer plugin to make sure the correct version was used for the current 
project. Along the same lines, you could put your version in some other file 
parallel to the pom that your script reads and uses to decide. This is more 
divergence from the mainstream than using enforcer, but it could work too.

> backwards compatible maven command line
> ---------------------------------------
>
>                 Key: MNG-3060
>                 URL: http://jira.codehaus.org/browse/MNG-3060
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: Command Line
>            Reporter: Ryan Christianson
>
> I work for a company that is using maven 2.0.4. We are looking at upgrading 
> to 2.0.6, but we have many projects that might be broken by the upgrade. This 
> means that we need to upgrade all of our old projects, which its expensive.
> I'm wondering if this could be solved by updating the command line tool to 
> support multiple installed versions of maven. 
> It might work like this:
> - add a "suggested maven version" to pom.xml files (eg. 
> <mavenVersion>2.0.4</mavenVersion>
> - update the mvn command line tool to look for the suggested version maven as 
> class paths like this:
> - M2_HOME_2_0_4 would be maven 2.0.4, M2_HOME_2_0_6 would be 2.0.6 and so on.
> - if no M2_HOME_{$VERSION} is found, then use M2_HOME

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