Friday, August 20, 2010

Maven Versions Plugin

Maven Versions Plugin

I came across this article (at http://www.wakaleo.com/blog/281-managing-version-numbers-in-maven-with-the-maven-versions-plugin 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.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.