Amit Patel Amit Patel - 2 years ago 362
Java Question

How to add "Maven Managed Dependencies" library in build path eclipse?

I have created a

project and I want to add all
dependencies in build path of the project in
. When I go to Java Build Path > Add Library > Maven Managed Dependency > Next in property dialog of the project, it asks me to Use "Maven Project Setting" to configure Maven dependency resolution.

My question is how to add maven dependencies in current build path?

Answer Source

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


mvn -Declipse.workspace=/home/ft/workspaces/wksp1/ eclipse:add-maven-repo
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download