Link Search Menu Expand Document

In a Maven pom.xml, the author specifies dependencies such as:


And plugins such as:


These typically have version numbers specified. How do you know which version to use?

Here are two ways:

Getting Versions from Maven Central

At this site, you can search for dependencies and plugins and find the various versions, along with the Maven xml element to copy past and put into your pom.xml:

A plugin to help manage dependency versions

This plugin helps manage dependency versions:

This Stack Overflow answer offers one example of how to use it:

Using the org.codehaus.mojo.versions-maven-plugin

(These instructions are from

Add this plugin under the <build> section


This command will create a backup of the pom.xml called pom.xml.versionsBackup

mvn versions:set -DnewVersion=9.9.9

Then run this, which updates the pom.xml

mvn versions:use-latest-versions

You can then run:

diff pom.xml pom.xml.versionsBackup

Test with the new versions. You may want to then set the version in the pom.xml back to what it was before.