Book Image

Apache Maven Cookbook

Book Image

Apache Maven Cookbook

Overview of this book

Table of Contents (18 chapters)
Apache Maven Cookbook
About the Author
About the Reviewers

Dependency management using Eclipse

We have seen that the Eclipse IDE provides support for Maven projects and allows us to run Maven commands from the IDE. Let us now see how we can manage dependencies using Eclipse.

How to do it...

Use the following steps in Eclipse IDE to manage the dependencies:

  1. Open the demoproject-selendroid file in Eclipse.

  2. Open the pom.xml file.

  3. Click on the Dependencies tab as shown in the following screenshot:

  4. A new dependency can be added by clicking on the Add… button (see in the preceding screenshot for the Add... button):

    As you can see in the preceding screenshot, you can specify the values in the Group Id:, Artifact Id:, and Version: textboxes along with the value in the Scope dropdown. Alternately, you can search for an artifact in the Enter groupId, artifactId or sha1 prefix or pattern (*): textbox, and eclipse will populate the relevant columns based on your selection in the Search Results list.

  5. You can also see the dependency tree by clicking on the Dependency...