0

I am having issues running mvn --version anywhere outside of C:\Program Files\Apache Software Foundation\apache-maven-3.2.1\bin. If I run mvn --version inside the apache-maven/bin folder I get the version number, however if I run it anywhere outside it says will not recognize mvn.

Am I missing something in my path variables?

My System Variables:

M2 = %M2_HOME%\bin
M2_HOME = C:\Program Files\Apache Software Foundation\apache-maven-3.2.1
JAVA_HOME = C:\Program Files\Java\jdk1.7.0_51

I appended

Path = ; %M2%

My User Variables:

M2 = %M2_HOME%\bin
M2_HOME = C:\Program Files\Apache Software Foundation\apache-maven-3.2.1
JAVA_HOME = C:\Program Files\Java\jdk1.7.0_51

Thanks

4

1 回答 1

0

You have to define variables before you use them. Change the order of the first two lines in your first example, and set PATH, not Path.

于 2014-02-28T19:12:44.613 回答