Page 1 of 1

$M2_HOME environment variable and mvn script missmatch

Posted: Fri May 22, 2015 2:31 am
by bharath25
i am working on a broadleaf ecommerce project while executing i am facing following issue

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

Re: $M2_HOME environment variable and mvn script missmatch

Posted: Thu Jun 04, 2015 12:18 am
by rudy
This is an issue with Maven 3.3.3.
You can fix this by using one of the below options

1. Downgrade MAVEN to 3.2.5 [Recommended by BroadLeaf]
OR
2. In your build.xml, you can add the following line in all your ANT targets:-

Code: Select all

<jvmarg value="-Dmaven.multiModuleProjectDirectory=<your_maven_installation_path>" />

just below any of the existing

Code: Select all

<jvmarg value>
tag.

Although, i would recommend downgrading maven, otherwise you'd have to add this line in each of the targets of all your build files.