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

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top