Maven 3.3.1 Config Error in IntelliJ Idea 14

怎甘沉沦 提交于 2019-11-28 18:13:07
dreamer

Open up the IntelliJ settings dialog.

In Maven-->Runner options set a following VM option: -Dmaven.multiModuleProjectDirectory=project root

This is a known bug in IntelliJ (as indicated by @Frank) in IntelliJ 14.0.3 and 14.1.

It will be fixed in IntelliJ 14.0.5 and 14.1.1.

If you need the fix right now, you can download and install the specific fix as described in the issue.

Alternatively, if you do not need the newest maven 3.3.1, you can fallback to an earlier version of maven.

I've got the same error with these tools version:

  1. apache-maven-3.3.1
  2. Eclipse: Luna Service Release 2 (4.4.2) with M2Eclipse 1.5.0
  3. java: 1.8.0_31

Solved it by adding the VM argument (-Dmaven.multiModuleProjectDirectory= MAVEN_HOME_PATH)

If the variant from previous comments will not work:

-Dmaven.multiModuleProjectDirectory=project root

you can try this with quotes:

-Dmaven.multiModuleProjectDirectory="project root"

This is exactly what helped me.

Got the same with Luna Service Release 2 (4.4.2), following are the steps that i followed:

  1. Goto - Run Configuration - under JRE tab - type -Dmaven.multiModuleProjectDirectory=

This solution was provided by sheltem Mar...Thanks

Anadi Kumar
  1. Goto Run Configuration under JRE tab
  2. type(in VM argument text field) "-Dmaven.multiModuleProjectDirectory="

This thread is important thread and very useful so I added this solution to it. I added this line to maven runner and it works with me

    -Dmaven.multiModuleProjectDirectory=$M2_HOME

Noting that, M2_HOME is defined in the environment variables for maven home in case of windows OS.

If you don't rely on an external IDE, remember to put this in MAVEN_OPTS, like so (Linux)

export MAVEN_OPTS=-Dmaven.multiModuleProjectDirectory=<your path> 

From Apache Maven's documentation, it's good to learn about this variable:

This variable contains parameters used to start up the JVM running Maven and can be used to supply additional options to globally to Maven. E.g. JVM memory settings could be defined with the value -Xms256m -Xmx512m.

You can refer to this link https://maven.apache.org/configure.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!