I have created a Maven
project and I want to add all Maven
dependencies in build path of the project in Eclipse
. When I go to Java Bui
If you have m2e installed and the project already is a maven project but the maven dependencies are still missing, the easiest way that worked for me was
Make sure your packaging strategy defined in your pom.xml is not "pom". It should be "jar" or anything else. Once you do that, update your project right clicking on it and go to Maven -> Update Project...
from the command line type:
mvn eclipse:eclipse
this will add all the dependencies you have in your pom.xml into eclipse...
however, if you haven't done any of this before you may need to do one other, one time only step.
Close eclipse, then run the following command from the shell:
mvn -Declipse.workspace=<eclipse workspace> eclipse:add-maven-repo
sample:
mvn -Declipse.workspace=/home/ft/workspaces/wksp1/ eclipse:add-maven-repo
Try:Right Click your project->Maven->Disable Dependency Management. And re-enable dependency management.
Follow these steps
1) Go in projects class path
2) Go in library tab
3) click on Add Library
4) In opened dialogue select Maven Managed Dependencies
5) Click on Next
6) In the new dialogue click on Manage Project Settings
7) In opened dialogue select the check box Resolve dependencies from workspace
8) Click on Restore defaults
9) It will do some process and you will have all your dependencies in your library now.