We use a number of third-party libraries to build our projects. As you recall, we specify the groupId
, artifactId
, and version
elements of each of these dependant libraries in our pom file. There may be many occasions when there are updates to these libraries and new versions are released. It will be good to have a mechanism to get notified about these releases and update the project build file suitably.
simple-project
, which we had created using the quick-start archetype.mvn versions:display-dependency-updates
[INFO] --- versions-maven-plugin:2.1:display-dependency-updates (default-cli) @ simple-project --- [INFO] artifact junit:junit: checking for updates from central [INFO] The following dependencies in Dependencies have newer versions: [INFO] junit:junit ............................................ 3.8.1 -> 4.12
The display-dependency-updates
goal of the Maven Versions plugin uses the metadata of each of the maven dependencies to determine the latest version of each dependency. If it does not match the current version, it displays a report about the difference.
We have already seen earlier that SNAPSHOT
versions are handled differently by Maven, and it automatically checks and updates these dependencies for each build as per the configuration. If the version number of the SNAPSHOT
changes (1.0-SNAPSHOT
to 1.1-SNAPSHOT
), then the Versions plugin indicates that.
3.17.79.20