Plugin Documentation

Goals available for this plugin:

GoalReport?Description
versions:commitNoRemoves the initial backup of the pom, thereby accepting the changes.
versions:compare-dependenciesNoCompare dependency versions of the current project to dependencies or dependency management of a remote repository project.
versions:dependency-updates-reportYesGenerates a report of available updates for the dependencies of a project.
versions:display-dependency-updatesNoDisplays all dependencies that have newer versions available.
versions:display-plugin-updatesNoDisplays all plugins that have newer versions available.
versions:display-property-updatesNoSets properties to the latest versions of specific artifacts.
versions:helpNoDisplay help information on versions-maven-plugin.
Call
  mvn versions:help -Ddetail=true -Dgoal=<goal-name>
to display parameter details.
versions:lock-snapshotsNoAttempts to resolve unlocked snapshot dependency versions to the locked timestamp versions used in the build. For example, an unlocked snapshot version like "1.0-SNAPSHOT" could be resolved to "1.0-20090128.202731-1". If a timestamped snapshot is not available, then the version will remained unchanged. This would be the case if the dependency is only available in the local repository and not in a remote snapshot repository.
versions:plugin-updates-reportYesGenerates a report of available updates for the dependencies of a project.
versions:property-updates-reportYesGenerates a report of available updates for properties of a project which are linked to the dependencies and/or plugins of a project.
versions:resolve-rangesNoAttempts to resolve dependency version ranges to the specific version being used in the build. For example a version range of "[1.0, 1.2)" would be resolved to the specific version currently in use "1.1".
versions:revertNoRestores the pom from the initial backup.
versions:setNoSets the current projects version, updating the details of any child modules as necessary.
versions:unlock-snapshotsNoAttempts to resolve unlocked snapshot dependency versions to the locked timestamp versions used in the build. For example, an unlocked snapshot version like "1.0-SNAPSHOT" could be resolved to "1.0-20090128.202731-1". If a timestamped snapshot is not available, then the version will remained unchanged. This would be the case if the dependency is only available in the local repository and not in a remote snapshot repository.
versions:update-child-modulesNoScans the current projects child modules, updating the versions of any which use the current project to the version of the current project.
versions:update-parentNoSets the parent version to the latest parent version.
versions:update-propertiesNoSets properties to the latest versions of specific artifacts.
versions:update-propertyNoSets a property to the latest version in a given range of associated artifacts.
versions:use-latest-releasesNoReplaces any release versions with the latest release version.
versions:use-latest-snapshotsNoReplaces any release versions with the latest snapshot version (if it has been deployed).
versions:use-latest-versionsNoReplaces any version with the latest version.
versions:use-next-releasesNoReplaces any release versions with the next release version (if it has been released).
versions:use-next-snapshotsNoReplaces any release versions with the next snapshot version (if it has been deployed).
versions:use-next-versionsNoReplaces any version with the latest version.
versions:use-releasesNoReplaces any -SNAPSHOT versions with the corresponding release version (if it has been released).

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven2.0
JDK1.4
MemoryNo minimum requirement.
Disk SpaceNo minimum requirement.

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>1.3.1</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>1.3.1</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
  <!-- To use the report goals in your POM or parent POM -->
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>1.3.1</version>
      </plugin>
      ...
    </plugins>
  </reporting>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"