Often you get this problem that your maven is working from command line but not from eclipse. One possible reason of this problem is - eclipse uses embedded maven with its m2e (Maven to eclipse) plugin. Hence your local settings doesn't apply to eclipse. Here is the way to integrate maven with eclipse-
Here are few assumption of this tutorial -
1. Maven is installed in your drive
2. M2_HOME is setup as your environment variable
1. Step one - Set your Maven installation path (Uncheck embedded Maven)
Go to Window-> Preferences->Maven->Installations
Uncheck embedded maven
Click on Add
And browse your local maven installation path here.
2. Step 2- Change maven user settings
Go to Window-> Preferences->Maven->User Settings
Give your user settings file path here
3. Step 3 - Update VM argument
Go to Window->Preferences->JAVA->Installed JREs
Select your JRE
Add following to your "Add default VM arguments "
-Dmaven.multiModuleProjectDirectory=$M2_HOME
Here are few assumption of this tutorial -
1. Maven is installed in your drive
2. M2_HOME is setup as your environment variable
1. Step one - Set your Maven installation path (Uncheck embedded Maven)
Go to Window-> Preferences->Maven->Installations
Uncheck embedded maven
Click on Add
And browse your local maven installation path here.
2. Step 2- Change maven user settings
Go to Window-> Preferences->Maven->User Settings
Give your user settings file path here
3. Step 3 - Update VM argument
Go to Window->Preferences->JAVA->Installed JREs
Select your JRE
Add following to your "Add default VM arguments "
-Dmaven.multiModuleProjectDirectory=$M2_HOME
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.