【发布时间】:2018-03-04 00:27:10
【问题描述】:
我已将 M2_HOME 设置为
C:\Users\username\Documents\apache-maven-3.5.0
以上目录的内容
09/21/2017 05:13 PM <DIR> .
09/21/2017 05:13 PM <DIR> ..
09/21/2017 05:13 PM <DIR> bin
09/21/2017 05:13 PM <DIR> boot
09/21/2017 05:13 PM <DIR> conf
09/21/2017 05:13 PM <DIR> lib
04/03/2017 08:41 PM 20,934 LICENSE
04/03/2017 08:40 PM 182 NOTICE
04/03/2017 08:36 PM 2,544 README.txt
3 File(s) 23,660 bytes
6 Dir(s) 348,568,027,136 bytes free
但是,当我在 cmd 中运行 mvn --version 时,出现以下错误
ERROR: M2_HOME is set to an invalid directory.
M2_HOME = "C:\Users\abhish\Documents\apache-maven-3.5.0"
Please set the M2_HOME variable in your environment to match the
location of the Maven installation
我在 SO 上查看了类似的 post。然而这并没有帮助,因此发布了这个问题。
我需要解决这个问题来解决this 问题。
【问题讨论】:
-
在C:\Users\abhish\Documents\apache-maven-3.5.0运行
dir,内容是什么? -
你是否在 M2_HOME 中设置了引号“如果是,请在不带引号的情况下设置它
-
没有引号
-
@BrunoCésar 我已编辑问题以显示 M2_HOME 的内容
标签: maven