maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible (JIRA) <>
Subject [jira] (MNG-5533) M2 vs M3
Date Tue, 03 Dec 2013 16:09:45 GMT


Jörg Schaible commented on MNG-5533:

And why do you set those environment variables at all? This is also done in the Maven start
script itself, so anything is properly set if you call Maven via path:



 c:\\program files\\maven-3.1.1\\bin\\mvn.bat
 c:\\program files\\maven-2.2.1\\bin\\mvn.bat

Now you just need to add some simple links in Unix:

 /usr/bin/mvn-3.1 ==> /opt/maven-3.1.1/bin/mvn

or one line start scripts somewhere in your PATH:


 c:\\program files\\maven-3.1.1\\bin\\mvn.bat %*

Now you can use "mvn-3.1" at any time to call Maven 3.1.1 and "mvn-2.1" for Maven 2.2.1 and
it is scalable for any version you like to support on your system. You might even add an additional
"mvn" link (resp. batch file) for your default version.
> M2 vs M3
> --------
>                 Key: MNG-5533
>                 URL:
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: Class Loading, Command Line, Documentation:  General, General
>    Affects Versions: Issues to be reviewed for 3.x
>         Environment: Windows
>            Reporter: Martin Spamer
>            Priority: Critical
> Maven 3 uses the M2 environment variable. Surely it would be more reasonable to update
this to M3 to allow sensible migration.  e.g
> M2=C:\Program Files\Apache Software Foundation\apache-maven-2.2.1\bin
> M2_HOME=C:\Program Files\Apache Software Foundation\apache-maven-2.2.1
> M3=C:\Program Files\Apache Software Foundation\apache-maven-3.1.1\bin
> M3_HOME=C:\Program Files\Apache Software Foundation\apache-maven-3.1.1
> MAVEN=%M2%  or MAVEN=%M3%

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message