Cássio Mazzochi Molin Cássio Mazzochi Molin - 2 months ago 51
Java Question

MAVEN_HOME, MVN_HOME or M2_HOME

What's the correct Maven environment variable name:

MAVEN_HOME
,
MVN_HOME
or
M2_HOME
?

Here I've found some information about
MAVEN_HOME
and
M2_HOME
. But what about
MVN_HOME
?

Answer

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.