mavenintellij-ideamulti-module

Intellij multiModuleProjectDirectory system property is not set


I have recently imported my multi module project to IntelliJ14 ultimate edition , while giving maven install command it gives me following error

> > "C:\Program Files\Java\jdk1.7.0_80\bin\java" -Xmx1024M -XX:MaxPermSize=512m -Dmaven.home=C:\IBM\apache-maven-3.3.3 -Dclassworlds.conf=C:\IBM\apache-maven-3.3.3\bin\m2.conf -Didea.launcher.port=7532 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.0.2\bin" -Dfile.encoding=UTF-8
> -classpath "C:\apache-maven-3.3.3\boot\plexus-classworlds-2.5.2.jar;C:\Program
> Files (x86)\JetBrains\IntelliJ IDEA 14.0.2\lib\idea_rt.jar"
> com.intellij.rt.execution.application.AppMain
> org.codehaus.classworlds.Launcher -Didea.version=14.0.2
> -DskipTests=true package -P enterprise
> 
> -Dmaven.multiModuleProjectDirectory system propery is not set. Check $M2_HOME environment variable and mvn script match.

Process finished with exit code 1

any idea how to fix it?

Thanks


Solution

  • This is a bug of IDEA 14. You have to either update it or manually install the patch as described in the bug comment:

    https://youtrack.jetbrains.com/issue/IDEA-137783