Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MAVEN_HOME, MVN_HOME or M2_HOME [duplicate]

What's the correct Maven environment variable name: MAVEN_HOME, MVN_HOME or M2_HOME?

I've found some details about MAVEN_HOME and M2_HOME here. But I also have seen MVN_HOME around.

like image 830
cassiomolin Avatar asked Oct 28 '14 13:10

cassiomolin


Video Answer


2 Answers

I've personally never found it useful to set M2_HOME.

What counts is your $PATH environment. Hijacking part of the answer from Danix, all you need is:

export PATH=/Users/xxx/sdk/apache-maven-3.0.5/bin:$PATH 

The mvn script computes M2_HOME for you anyway for what it's worth.

like image 100
Steve C Avatar answered Oct 13 '22 01:10

Steve C


M2_HOME (and the like) is not to be used as of Maven 3.5.0. See MNG-5607 and Release Notes for details.

like image 33
ᄂ ᄀ Avatar answered Oct 13 '22 01:10

ᄂ ᄀ