Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven 3.3.1 ECLIPSE: -Dmaven.multiModuleProjectDirectory system propery is not set

I just installed Maven 3.3.1 on Mac OS X, and building a Maven Project with Eclipse is giving me this error:

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

It did not happen before with Maven 3.2.5.

Is there any way to fix this (except downgrading to 3.2.5) ?

Where exactly can I set this "multiModuleProjectDirectory" property in Eclipse?

like image 379
Bob Avatar asked Mar 29 '15 14:03

Bob


3 Answers

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
like image 76
Diego Macario Avatar answered Nov 19 '22 20:11

Diego Macario


In IntelliJ you can set this option in VM Options field that you can find in the next configuration view:

Preferences/Build, execution, deployment/Build tools/Maven/Runner

enter image description here

like image 21
gerosalesc Avatar answered Nov 19 '22 19:11

gerosalesc


This was filed as a bug with m2e in Eclipse at https://bugs.eclipse.org/bugs/show_bug.cgi?id=462944 , due to the changes in Maven 3.3.1.

This is fixed in m2e 1.5.2 as of 2015-04-13. This is an available release that can be installed from http://download.eclipse.org/technology/m2e/releases/ .

(No more changing JVM arguments for the entire workspace or for specific launch configurations required.)

like image 17
ziesemer Avatar answered Nov 19 '22 18:11

ziesemer