Managing Maven Project Dependencies

See Also 

To make libraries and projects available to your project during compilation, testing and execution you need to declare the projects or libraries as dependencies. All dependencies need to be available as artifacts in your local repository.

You declare a dependency by modifying the POM to add the coordinates of the artifact you want to declare as a dependency. All Maven artifacts are defined by a unique coordinate that consists of a group identifier (groupId), artifact identifier (artifactId) and version. Adding a dependency to the POM is similar to adding libraries to the classpath in an Ant-based project.

You can add a dependency to a Maven project in the following ways:

After you add a dependency to pom.xml, a node for the artifact (  ) appears under the project's Dependencies node. Artifacts that are not in your local repository are marked with a badge. You need to have a copy of the artifact in your local repository if you want to use it in your project. This applies to libraries and to other projects that are described as dependencies.

Notes:

See Also
About Working with Maven
Configuring Maven Settings
Working with the Maven POM

Legal Notices