Maven 2 Dependency Plugin

This plugin provides the capability to manipulate artifacts. Currently it can copy and/or unpack artifacts from local or remote repositories to a specified location.

The plugin has the following goals:

  • copy: takes a list of artifacts defined in the plugin configuration section and copies them to a specified location, renaming them or stripping the version if desired. This goal can resolve the artifacts from remote repositories if they don't exist in local.
  • copy-dependencies: takes the list of direct dependencies and optionally transitive dependencies and copies them to a specified location, stripping the version if desired. This goal can also be run from the command line.
  • unpack: like copy but unpacks.
  • unpack-dependencies: like copy-dependencies but unpacks.
  • resolve: Tells Maven to resolve test scope dependencies and displays the version.
  • sources: Tells Maven to resolve test scope dependencies and their source attachments, and displays the version.
  • resolve-plugins: Tells Maven to resolve plugins and their dependencies.
  • go-offline: Tells Maven to resolve everything this project is dependent on (dependencies, plugins, reports) in preparation for going offline.
  • purge-local-repository: Clears out all dependency-artifact files for the current project or projects from the local repository, and optionally re-resolves them.

Where appropriate, goals are able to detect if the artifacts already exist and don't copy/unpack again.

All goals are also able to handle artifacts with classifiers. This enables the capability to manipulate sources and test-jars for example.

To see examples of how to use the plugin, click here.

To see the goal details, click here.