Maven 3.3.1 Config Error in IntelliJ Idea 14

前端 未结 8 1798
臣服心动
臣服心动 2020-12-13 13:48

I got the maven .tar file from http://maven.apache.org/download.cgi, and installed it to the path /usr/local/. I run the mvn -version command in the new window, the output i

相关标签:
8条回答
  • 2020-12-13 14:20

    Open up the IntelliJ settings dialog.

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

    0 讨论(0)
  • 2020-12-13 14:20

    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)

    0 讨论(0)
  • 2020-12-13 14:20
    1. Goto Run Configuration under JRE tab
    2. type(in VM argument text field) "-Dmaven.multiModuleProjectDirectory="
    0 讨论(0)
  • 2020-12-13 14:25

    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

    0 讨论(0)
  • 2020-12-13 14:34

    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.

    0 讨论(0)
  • 2020-12-13 14:37

    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.

    0 讨论(0)
提交回复
热议问题