开发者

Problems with maven installation

Hi I'm trying to install MAVEN, to my computer using this tutorial, I've set my enviroment variable MAVEN_HOME to point to my maven directory, and I put value开发者_运维知识库 of path_to_maven/bin inside another enviroment variable named Path and I get this error message:

C:\>mvn -version
'mvn' is not recognized as an in
operable program or batch file.

I've tried also to use PATH instead of Path but that doesn't solve it, what else can I do? I'm using windows 7..


Go to path_to_maven/bin and type mvn -version. If that works then it's a PATH problem.
In MS-DOS's prompt type set PATH=path_to_maven/bin;%PATH%


You may need to restart your computer for the changes to PATH to take effect.


I had a similar problem while configuring maven.

I've installed Maven 2 on my computer and I had problems when invoking mvn --version from cmd.

I've set the M2_HOME and M2_REPO environment variables and I have added to the system variable PATH the path_to_maven/bin.

In order to be able to invoke mvn from cmd I had to add still another environment variable named PATH with value path_to_maven/bin.

I hope this will help anyone caught in this issue.


If it helps someone:

Try to add the entire directory path in the PATH variable instead of using the referrals like %M2%.


Close the Command Prompt and then re-open it again. Hit the command mvn -version. It should work if the environment/system variables are set properly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜