+1 to simply remove the variable. That's what I've been doing and advising for years.
Settings M2_HOME only highers the risk to get to weird issues for newcomers with NoClassDefFoundError where actually M2_HOME points to a different maven root that the binary in the PATH. 2016-01-27 11:23 GMT+00:00 Christian Schulte <[email protected]>: > Am 27.01.2016 um 11:02 schrieb Arnaud Héritier: > >> -1 >> See https://issues.apache.org/jira/browse/MNG-5607 >> Ok to introduce MVN_HOME with M2_HOME value as default when defined (and >> then remove M2_HOME in Maven 4) >> But replacing M2_HOME by MVN_HOME in 3.4 seems to be a risky change for >> our >> ecosystem (IDE, CI servers, ...) and not only for the local user >> environment >> >> WDYT ? >> >> Cheers >> >> > The first commit removes support for M2_HOME in 3.4 completely. The second > commit only renames a variable used in the script. M2_HOME is just not > needed and is even confusing. People relying on M2_HOME should just setup > theire PATH properly, IMHO. That's what most of them do anyway. You see > > export PATH=$M2_HOME/bin:$PATH > > almost everywhere. I am pretty sure there are a lot of people who do not > even notice that setting M2_HOME to something not matching theire PATH is > not what they want. Having a 'mvn' script in my PATH and having that script > use a M2_HOME variable to launch something not in my PATH is flawed. I > thought that was the reason for the request to remove that variable. No big > deal reverting those commits, of course. > > So +1 for removing that variable completely in 3.4 or whatever version is > appropriate for such a change. > > Regards, > -- > Christian > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
