Maven:找不到mvn命令 [英] Maven: mvn command not found

查看:443
本文介绍了Maven:找不到mvn命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设置了以下系统验证(OS = Vista):

I set the following system veriables (OS = Vista):

M2_HOME = C:\Program Files\Maven 
M2 = %M2_HOME%\bin 
path = %M2% 

如果我运行mvn-我得到的版本:

If i run mvn -- version I get:

mvn: command not found

任何人都不知道为什么会这样吗? 谢谢.

Anyone have any idea why this could be? Thanks.

推荐答案

如果您在Windows上,我想您需要像这样设置PATH:

If you are on windows, what i suppose you need to do set the PATH like this:

SET PATH=%M2%

此外,我假设您需要将路径设置为C:... \ apache-maven-3.0.3 \,因为这是Windows存档的默认文件夹. 另一方面,我假设您需要将maven的路径添加到您的路径中,而不是仅将其设置为maven,因此您的设置应如下所示:

furthermore i assume you need to set your path to something like C:...\apache-maven-3.0.3\ cause this is the default folder for the windows archive. On the other i assume you need to add the path of maven to your and not set it to only maven so you setting should look like this:

SET PATH=%PATH%;%M2%

这篇关于Maven:找不到mvn命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆