Wednesday, May 31, 2017

How to Remove -Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match In Eclipse.

Generally when ever you installed new Maven version and try to debug or run the maven project we get following error on the console of Eclispe
-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match
This indicate that when we try to exeute our project through MAVEN plug in of eclipse it is not able to find the M2_HOME. Setting this paratmer on the Global i.e. %PATH% will not help.
We need to set the same in Eclipse IDe
Step :-
Go to Eclipse Menu bar -- > Window --> Preference --> Click on Installed JRE --> Click on Edit Button --> Add follwoing -Dmaven.multiModuleProjectDirectory=M2_HOME in Default VM argumetns.

Error_Maven

No comments: