Search code examples
eclipsemavenmaven-3

-Dmaven.multiModuleProjectDirectory system propery is not set


I am getting below error message when trying to run maven commands from eclipse

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

Update :- Screen shot added

enter image description here


Solution

  • In Eclipse go this location

    Window > Preferences > Java > Installed JREs > Edit
    

    and add these lines in Default VM argument section

    -Dmaven.multiModuleProjectDirectory=$M2_HOME
    

    Please check below screen shot

    enter image description here