Maven Versions Plugin

by 8/20/2010 09:03:00 AM 0 comments

Maven Versions Plugin

I came across this article (at that discusses a Maven plugin that can assist you with updating the dependencies in a Maven project to more recent versions. The short guide is:
  • mvn versions:display-dependency-updates: Lists the dependencies you are using and which ones have an update available
  • mvn versions:display-plugin-updates: Same as above but looks at the plugins that your project is using
  • mvn versions:set -DnewVersion=1.0.2-SNAPSHOT: Changes your projects version number. Here we're setting it to 1.0.2-SNAPSHOT
  • mvn versions:use-latest-versions: Updates all dependencies to the latest version
    • mvn versions:use-latest-releases: Replaces SNAPSHOT dependencies with latest release
    • mvn versions:use-releases: Replaces SNAPSHOT dependencies with the corresponding release version
    • versions:use-next-snapshots: Use the next available SNAPSHOT release
    • versions:use-latest-snapshots: Use the bleeding edge (i.e. the latest SNAPSHOT release
  • mvn versions:commit: Commits any changes you made with mvn versions to your pom and removes the backup files that mvn versions created.
  • mvn versions:revert: Rollback any changes you made with the mvn versions to it's previous state.

Brian Schlining


Cras justo odio, dapibus ac facilisis in, egestas eget quam. Curabitur blandit tempus porttitor. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.