-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable

来源:互联网 发布:mac mobi 制作软件 编辑:程序博客网 时间:2024/06/05 04:50

问题发生在用eclipse执行maven项目时报错:

-Dmaven.multiModuleProjectDirectory system property is not set.
Check $M2_HOME environment variable and mvn script match.

从https://stackoverflow.com/questions/29330577/maven-3-3-1-eclipse-dmaven-multimoduleprojectdirectory-system-propery-is-not-s
看到原来是eclipse中maven与jdk之间还要配置一下:
这里写图片描述

In Eclipse you need to go like this.
Window-> Preference -> Java -> Installed JREs -> Edit
In the edit Default VM arguments you need to put
If you already set the maven home.
-Dmaven.multiModuleProjectDirectory=$M2_HOME

阅读全文
0 0