Is there a mechanism to track maven plugin version updates automatically. Since most of the time in dependencyManagement you hard-wire the version numbers for every plugin. Is there an administrative command to find this information on what newer versions are vailable for plugins declared in pom.xml?
Is there a mechanism to track maven plugin version updates automatically. Since most of
Share
The Versions Maven Plugin has a nice
versions:display-plugin-updatesmojo for this.To use it, simply run:
Which produces something like that:
[INFO] ------------------------------------------------------------------------ [INFO] Building sandbox [INFO] task-segment: [versions:display-plugin-updates] [INFO] ------------------------------------------------------------------------ [INFO] [versions:display-plugin-updates {execution: default-cli}] [INFO] [INFO] The following plugin updates are available: [INFO] maven-clean-plugin ....................................... 2.2 -> 2.4 [INFO] maven-compiler-plugin .................................. 2.0.2 -> 2.1 [INFO] maven-deploy-plugin ...................................... 2.4 -> 2.5 [INFO] maven-install-plugin ..................................... 2.2 -> 2.3 [INFO] maven-jar-plugin ......................................... 2.2 -> 2.3 [INFO] maven-resources-plugin ................................. 2.3 -> 2.4.1 [INFO] maven-site-plugin ................................. 2.0-beta-7 -> 2.1 [INFO] maven-surefire-plugin .................................. 2.4.3 -> 2.5 [INFO] [INFO] All plugins have a version specified. [INFO] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7 seconds [INFO] Finished at: Fri Jan 22 07:21:57 CET 2010 [INFO] Final Memory: 16M/68M [INFO] ------------------------------------------------------------------------It will also warn you if you have not specified the versions of plugins that you are using. See Checking for new plugin updates for details.
Update: (answering some additional questions posted as comments)
AFAIK, the plugin should scan all plugins i.e.
build.plugins,build.pluginManagement.pluginsandbuild.reporting.plugins(see MVERSIONS-83 about this).I did a test too and this is not what I’m observing. At least it works with mojos from codehaus (like in the last sample from the previous link). But if I move the plugin in
build.plugins, it doesn’t work indeed. This is actually a bug, see MVERSIONS-69. Surprisingly, it seems to work with the version 1.1 that you can run as shown below:And if you look closely at MVERSIONS-69, the output of the integration tests suggests that it should work with any plugin. But I confess, I’m not 100% sure.