The dependency plugin

The dependency plugin gathers many features that are worth diving into them. dependency can be either through this short name, or through its complete designation: org.apache.maven.plugins:maven-dependency-plugin.

We have already seen the tree goal that allows displaying on standard output the hierarchy of dependencies, as well as the get goal that installs manually an archive to the local repository. Let's study a bit more the other features of the dependency plugin.

The analyze goal

The analyze goal (and analyze-only) will analyze the dependencies and determine which of them are used/unused or declared/undeclared.

The analyze goal is to be run standalone, whereas analyze-only is to be used in the build lifecycle.

Let's consider ...

Get Apache Maven Dependency Management now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.