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

Dan
  • 2,701
  • 1
  • 29
  • 34

1 Answers1

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.

Software Engineer
  • 15,457
  • 7
  • 74
  • 102
  • Thanks for looking into it, I tried setting M2_HOME first by deleting variable M2. I could be misunderstanding, but I am setting the variables through the System Properties>Environment Variables and not through the cmd line which seems to ignore the order. – ghostFishKillah Mar 03 '14 at 15:06