Want to automatically update your Maven plugins to the latest versions available? Well, with the Maven 2.0 alpha 2 release coming this week, you can.
The introduction of separate release timeframes for plugins some time back was a good move – for example, there have been several individual plugin updates made available since the last Maven 1.0.2 release in December, that users could download as soon as they were ready.
But one of the common questions received is how to find out what the latest versions of all the plugins are. To solve this, if a version is not specified Maven will now check daily (by default) for a new version, and download it if it is newer. This uses the same mechanism as for snapshots, so you can also check for updates on demand, and set the update interval to always, daily, interval or never. We hope to allow greater configurability of these updates in the following June release.
What about build reproducibility? Obviously this is a concern, and for that reason any plugins related to the build is specified directly in the POM, and you have the ability to specify what version of a plugin you are using. Regardless of what releases are known of, that one will always be used to build your project.
This also assists when distributing your project to other people. No more telling them what new plugins they need to install to build! It all happens behind the scenes using the versions specified in the project.
Another feature that makes plugin use in Maven 2.0 really easy that you might not have noticed is the transparent discovery. Maven 2.0 actually doesn’t come with any plugins installed – yet goals like “idea:idea” will discover and download the IDEA plugin automatically. This relies on a little magic specific to Maven plugins currently, but is also scheduled to be expanded to all plugins in the June release.
This really helps with usability in Maven 2.0… but if you’ve got any additional ideas about how you’d like to get plugin updates, feel free to drop us a line on the users list.