0

I installed maven as per http://maven.apache.org/download.cgi and I created the following environment variables:

JAVA_HOME : C:\Program Files (x86)\Java\jre7
M2 : %M2_HOME%\bin
M2_HOME : C:\Program Files (x86)\Apache Software Foundation\apache-maven-3.1.0

And, I prepended PATH with this:

%M2%;%JAVA_HOME%\bin;

When I try to run cmd and enter mvn --version it says:

'mvn' is not recognized as an internal or external command, operable program or batch file.

4

1 回答 1

1

我不久前遇到了这个......PATH不支持多层嵌套,它只会评估第一层。尝试设置M2为相同的值M2_HOME并添加\bin到末尾

于 2013-09-23T19:38:53.950 回答