Fork me on GitHub

Plugin Documentation

Goals available for this plugin:

Goal Report? Description
versions:commit No Removes the initial backup of the pom, thereby accepting the changes.
versions:compare-dependencies No Compare dependency versions of the current project to dependencies or dependency management of a remote repository project. Can optionally update locally the project instead of reporting the comparison
versions:dependency-updates-aggregate-report Yes Generates an aggregate report of available updates for the dependencies of a project.
versions:dependency-updates-report Yes Generates a report of available updates for the dependencies of a project.
versions:display-dependency-updates No Displays all dependencies that have newer versions available. It will also display dependencies which are used by a plugin or defined in the plugin within a pluginManagement.
versions:display-extension-updates No Displays all build and core extensions that have newer versions available.
versions:display-parent-updates No Displays any updates of the project's parent project
versions:display-plugin-updates No Displays all plugins that have newer versions available, taking care of Maven version prerequisites.
versions:display-property-updates No Displays properties that are linked to artifact versions and have updates available.
versions:force-releases No Replaces any -SNAPSHOT versions with a release version, older if necessary (if there has been a release).
versions:help No Display help information on versions-maven-plugin.
Call mvn versions:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.
versions:lock-snapshots No Attempts 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:parent-updates-report Yes Generates a report on available updates for parent artifacts
versions:plugin-updates-aggregate-report Yes Generates an aggregated report of available updates for the plugins of a project.
versions:plugin-updates-report Yes Generates a report of available updates for the plugins of a project.
versions:property-updates-aggregate-report Yes Generates an aggregate report of available updates for properties of a project which are linked to the dependencies and/or plugins of a project.
versions:property-updates-report Yes Generates a report of available updates for properties of a project which are linked to the dependencies and/or plugins of a project.
versions:resolve-ranges No Attempts 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:revert No Restores the pom from the initial backup.
versions:set No Sets the current project's version and based on that change propagates that change onto any child modules as necessary.
versions:set-property No Set a property to a given version without any sanity checks. Please be careful this can lead to changes which might not build anymore. The sanity checks are done by other goals like update-properties or update-property etc. they are not done here. So use this goal with care.
versions:set-scm-tag No Updates the current project's SCM tag.
versions:unlock-snapshots No Attempts 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-modules No Scans the current projects child modules, updating the versions of any which use the current project to the version of the current project.
versions:update-parent No Sets the parent version to the latest parent version.
versions:update-properties No Sets properties to the latest versions of specific artifacts.
versions:update-property No Sets a property to the latest version in a given range of associated artifacts.
versions:use-dep-version No Updates a dependency to a specific version. This can be useful if you have to manage versions for a very large (100+ module) projects where you can’t always use the most up-to-date version of a particular third party component.
versions:use-latest-releases No Replaces any release versions (i.e. versions that are not snapshots and do not have a year-month-day suffix) with the latest release version. This goal will not replace versions of dependencies which use snapshots or versions with a year-month-day suffix.
versions:use-latest-snapshots No Replaces any release versions with the latest snapshot version (if it has been deployed).
versions:use-latest-versions No Replaces any version with the latest version found in the artifactory.
versions:use-next-releases No Replaces any release versions with the next release version (if it has been released).
versions:use-next-snapshots No Replaces any release versions with the next snapshot version (if it has been deployed).
versions:use-next-versions No Replaces any version with the latest version.
versions:use-reactor No Replaces any versions with the corresponding version from the reactor.
versions:use-releases No Replaces 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:

Maven 3.2.5
JDK 1.8

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>2.16.2</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>
      </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>2.16.2</version>
      </plugin>
      ...
    </plugins>
  </reporting>
  ...
</project>

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