Safeguard
Developer Tools•

How do I list outdated Maven dependencies, and should I upgrade all?

Use versions:display-dependency-updates to list newer Maven dependency versions, limit it to minor or patch updates, and upgrade by risk, not all at once.

Safeguard Security Team
3 min read

Run mvn versions:display-dependency-updates to list dependencies that have newer versions available. Do not upgrade everything at once. Sort the list by security relevance first, then by size of the version jump, and move in small batches your tests can cover.

Definition

The Versions Maven Plugin from MojoHaus has a goal called display-dependency-updates. It reports dependencies with newer versions available, including dependencies in dependencyManagement and, by default, those used by plugins.

Run it

mvn versions:display-dependency-updates
mvn versions:display-dependency-updates -DallowMajorUpdates=false

Useful parameters from the plugin page:

ParameterDefaultEffect
allowMajorUpdatestrueSet false to hide major version jumps
allowMinorUpdatestrueSet false to hide minor and larger jumps
allowIncrementalUpdatestrueSet false to hide patch level updates
allowSnapshotsfalseInclude snapshot versions
ignoredVersionsnoneSkip matching versions, such as release candidates
showNewestPerSegmentfalseList newest incremental, minor and major versions, since 2.23.0

The page says that switching off a higher level segment also limits the lower ones, so test your combination.

Is the newest version the safest?

Not automatically. Newer usually means more fixes, but it can mean breaking changes, and a brand new release is also the version an attacker would target if a project were hijacked. A common approach is to prefer the lowest version that includes the fix you need, then move further on your schedule.

Adding it to a routine

Run the report on a schedule, for example weekly in CI, and save the output. A growing list is a signal. A short list that stays short means your upgrades are keeping pace. Pair it with a rule that critical advisories skip the schedule and are handled the same day.

Sorting the list

  1. Cross-check the list against known advisories. Anything with a known vulnerability goes first.
  2. Group by update size. Patch updates are cheapest.
  3. Look at frameworks separately. A framework BOM may manage dozens of versions, see Maven BOMs.
  4. Skip release candidates and snapshots with ignoredVersions.
  5. Upgrade a few, run the tests, repeat.

Outdated is not the same as vulnerable. A library can be years behind and have no advisory, and a recent one can have a critical flaw. Use this list for hygiene and a scanner for risk.

Try it yourself

Click through it at your own pace, or open it full screen.

Sort by severity and notice how that ordering differs from simply how old a package is.

Where Safeguard fits

Safeguard's dependency scanning ties known vulnerabilities to your components, so you can sort an upgrade backlog by risk. Try the free scan.

Quick check

Does display-dependency-updates change my POM?

No. It only reports. Other goals in the plugin make changes.

Does outdated mean vulnerable?

No. Check advisories separately. Age and vulnerability are different questions.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.