To check for plugin or dependency updates of a Maven project the versions-maven-plugin has two interesting mojos:
Unfortunately the command line is a bit long. Cumbersome to type, not that easy to remember. Using the alias-maven-plugin the command line can be shortened to:
In addition to that checking a project for declaring all dependencies (that is not relying on transitive dependencies) or not declaring unused dependencies is a common task to keep the project dependencies clean. The maven-dependency-plugin provides the analyze mojo for this:
In short this would be
The configuration to make this work looks like this:
The
And if you can't remember all the shortcuts? Type
For more information please refer to the alias-maven-plugin and (for an example configuration) config-smartics-alias.
mvn versions:display-plugin-updates
mvn versions:display-dependency-updates
Unfortunately the command line is a bit long. Cumbersome to type, not that easy to remember. Using the alias-maven-plugin the command line can be shortened to:
pu
du
In addition to that checking a project for declaring all dependencies (that is not relying on transitive dependencies) or not declaring unused dependencies is a common task to keep the project dependencies clean. The maven-dependency-plugin provides the analyze mojo for this:
mvn dependency:analyze
In short this would be
a
The configuration to make this work looks like this:
<br /> Aliases to analyze project information.<br />
a
mvn dependency:analyze
<br /> Analyzes the dependencies of this project and determines which are: used and declared;<br /> used and undeclared; unused and declared. This goal is intended to be used standalone,<br /> thus it always executes the test-compile phase - use the dependency:analyze-only goal<br /> instead when participating in the build lifecycle.<br /> <br /> <p><br /> For more information please refer to the<br /> <a href="http://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html">analyze mojo</a>.<br /> </p><br />
pu
mvn versions:display-plugin-updates
<br /> Displays all plugins that have newer versions available.<br /> <p><br /> For more information please refer to the<br /> <a href="http://mojo.codehaus.org/versions-maven-plugin/display-plugin-updates-mojo.html">display-plugin-updates mojo</a>.<br /> </p><br />
du
mvn versions:display-dependency-updates
<br /> Displays all dependencies that have newer versions available.<br /> <p><br /> For more information please refer to the<br /> <a href="http://mojo.codehaus.org/versions-maven-plugin/display-dependency-updates-mojo.html">display-dependency-updates<br /> mojo</a>.<br /> </p><br />
The
comment
elements are optional, but help teams to share information about the aliases.And if you can't remember all the shortcuts? Type
h
!
--- project-analysis
a = mvn dependency:analyze [args]
pu = mvn versions:display-plugin-updates [args]
du = mvn versions:display-dependency-updates [args]
For more information please refer to the alias-maven-plugin and (for an example configuration) config-smartics-alias.