Plugin Documentation

Goals available for this plugin:

GoalReport?Description
dependency:analyzeNoAnalyzes the dependencies of this project and determines which are: used and declared; used and undeclared; unused and declared. This goal is intended to be used standalone, thus it always executes the test-compile phase - use the dependency:analyze-only goal instead when participating in the build lifecycle.

By default, maven-dependency-analyzer is used to perform the analysis, with limitations due to the fact that it works at bytecode level, but any analyzer can be plugged in through analyzer parameter.

dependency:analyze-dep-mgtNoThis mojo looks at the dependencies after final resolution and looks for mismatches in your dependencyManagement section. In versions of maven prior to 2.0.6, it was possible to inherit versions that didn't match your dependencyManagement. See MNG-1577 for more info. This mojo is also useful for just detecting projects that override the dependencyManagement directly. Set ignoreDirect to false to detect these otherwise normal conditions.
dependency:analyze-duplicateNoAnalyzes the <dependencies/> and <dependencyManagement/> tags in the pom.xml and determines the duplicate declared dependencies.
dependency:analyze-onlyNoAnalyzes the dependencies of this project and determines which are: used and declared; used and undeclared; unused and declared. This goal is intended to be used in the build lifecycle, thus it assumes that the test-compile phase has been executed - use the dependency:analyze goal instead when running standalone.

By default, maven-dependency-analyzer is used to perform the analysis, with limitations due to the fact that it works at bytecode level, but any analyzer can be plugged in through analyzer parameter.

dependency:analyze-reportYesAnalyzes the dependencies of this project and produces a report that summarizes which are: used and declared; used and undeclared; unused and declared.
dependency:build-classpathNoThis goal will output a classpath string of dependencies from the local repository to a file or log.
dependency:copyNoGoal that copies a list of artifacts from the repository to defined locations.
dependency:copy-dependenciesNoGoal that copies the project dependencies from the repository to a defined location.
dependency:getNoDownloads a single artifact transitively from the specified remote repositories. Caveat: will always check the central repository defined in the super pom. You could use a mirror entry in your settings.xml
dependency:go-offlineNoGoal that resolves all project dependencies, including plugins and reports and their dependencies.
dependency:helpNoDisplay help information on maven-dependency-plugin.
Call mvn dependency:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.
dependency:listNoDisplays the list of dependencies for this project.
dependency:list-repositoriesNoGoal that resolves all project dependencies and then lists the repositories used by the build and by the transitive dependencies
dependency:manual-purge-local-repositoryNoRemove/purge artifacts from the local repository.
dependency:propertiesNoGoal that sets a property pointing to the artifact file for each project dependency. For each dependency (direct and transitive) a project property will be set which follows the groupId:artifactId:type:[classifier] form and contains the path to the resolved artifact.
dependency:purge-local-repositoryNoRemove the project dependencies from the local repository, and optionally re-resolve them.
dependency:resolveNoGoal that resolves the project dependencies from the repository.
dependency:resolve-pluginsNoGoal that resolves all project plugins and reports and their dependencies.
dependency:sourcesNoGoal that resolves the project source dependencies from the repository.
dependency:treeNoDisplays the dependency tree for this project.
dependency:unpackNoGoal that retrieves a list of artifacts from the repository and unpacks them in a defined location.
dependency:unpack-dependenciesNoGoal that unpacks the project dependencies from the repository to a defined location.

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven2.0.9
JDK1.5
MemoryNo minimum requirement.
Disk SpaceNo minimum requirement.

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.6</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.6</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
  <!-- To use the report goals in your POM or parent POM -->
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.6</version>
      </plugin>
      ...
    </plugins>
  </reporting>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"