-Dmaven.multiModuleProjectDirectory system propery is not set.

简介: Myeclipse中使用maven插件的时候,运行run as maven build的时候报错-Dmaven.multiModuleProjectDirectory system propery is not set.

Myeclipse中使用maven插件的时候,运行run as maven build的时候报错

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


项目使用的JDK1.7,maven插件版本是3.3.1

起初按照网上的教程,在Window->Preference->Java->Installed JREs->Edit->Default VM arguments中设置-Dmaven.multiModuleProjectDirectory=$M2_HOME,一直不生效。


后来查阅相关资料,想到可能是maven版本和JDK版本不兼容,于是果断换了3.2.1版本的maven,再试问题解决。


 

  遇到这个问题,最优的解决方法:使用低版本的maven。

目录
相关文章
|
7月前
Failed to execute goal maven-resources-plugin:3.2.0:resources Input length = 1 -> [Help 1]
Failed to execute goal maven-resources-plugin:3.2.0:resources Input length = 1 -> [Help 1]
70 0
|
Java Maven
Maven3 package时报 'version' contains an expression but should be a constant
父pom文件: 4.0.0 com.wey WEY ${com.wey.version} pom 子Module 4.0.0 com.wey WEY ${com.wey.version} pom package web工程时报 'version' contains an expression but should be a constant这个错误提示,这是因为Maven3 不允许出现version为非常量值的情况。
9233 0
|
5月前
|
Java Maven
Maven 生命周期clean default size含义
Maven 生命周期clean default size含义
|
6月前
|
测试技术
Maven-DskipTests和-Dmaven.test.skip=true的区别
Maven-DskipTests和-Dmaven.test.skip=true的区别
215 6
|
Java Apache Maven
Eclipse创建maven项目时,出现Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources错
Eclipse创建maven项目时,出现Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources错
265 0
Eclipse创建maven项目时,出现Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources错
|
开发工具
Could not get unknown property ‘versions‘ for object of type com.android.build.gradle.AppExtension
Could not get unknown property ‘versions‘ for object of type com.android.build.gradle.AppExtension
1541 0
Could not get unknown property ‘versions‘ for object of type com.android.build.gradle.AppExtension
|
Java Maven Android开发
how does eclipse know what tasks it should do when we select Maven build
how does eclipse know what tasks it should do when we select Maven build
91 0
how does eclipse know what tasks it should do when we select Maven build