O'Reilly logo

Apache Maven Cookbook by Raghuram Bharathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Determining updates to Maven dependencies

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.

How to do it...

  1. Take a project for which you want to check for a dependency update, simple-project, which we had created using the quick-start archetype.
  2. Run the following command:
    mvn versions:display-dependency-updates
    
  3. Observe the output:
    [INFO] --- versions-maven-plugin:2.1:display-dependency-updates (default-cli) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required