Maven plugin updates

Is there a mechanism for automatically tracking updates to the maven plugin version. Since most of the time in dependencyManagement, you tightly link version numbers for each plugin. Is there an administrative team to search for this information about which newer versions are available for plugins declared in pom.xml?

+7
maven-2
source share
1 answer

Versions Maven Plugin has nice versions:display-plugin-updates mojo for this. To use it, just run:

 mvn versions:display-plugin-updates 

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 the plugins that you use. For more details, see Checking for New Plugin Updates .

Update: (answering some additional questions posted as comments)

How to solve this in order to find out the list of plugins for search (is it from pluginManagement?)

AFAIK, the plugin should scan all plugins, i.e. build.plugins , build.pluginManagement.plugins and build.reporting.plugins (see MVERSIONS-83 about this).

I quickly checked build / pluginManagement / plugins and didn't seem to find updates for plugins other than org.apache.maven.plugins

I also did a test, and this is not what I am observing. At least it works with mojos from codehaus (as in the last example from the previous link ). But if I translate the plugin into build.plugins , it does not work. This is actually a bug, see MVERSIONS-69 . Surprisingly, it looks like you are working with version 1.1, as shown below:

 mvn org.codehaus.mojo:versions-maven-plugin:1.1:display-plugin-updates 

And if you look closely at MVERSIONS-69 , the result of integration tests suggests that it should work with any plugin. But I admit, I'm not 100% sure.

+11
source share

All Articles