Maven pom.xml Viewer · Tutorial

How to review the dependencies in a Maven pom.xml

6 min readbeginnerUpdated

Before a release, you want to be sure the build uses fixed, known versions. You will open the POM, find entries that make builds unpredictable and decide how to fix each.

What you need

Steps

  1. Open the POM

    Load the example service. Spring Boot starters show Version from parent/BOM: the parent spring-boot-starter-parent manages their versions, which is fine.

  2. Show only problems

    Tick Only show entries worth checking. Three remain: a snapshot, a version range and an unknown property.

  3. Fix the range

    payment-client uses [1.2,2.0), so each build may pick a different version. Pin the one you tested.

    <version>1.4.2</version>
  4. Define the missing property

    ${audit.version} isn’t defined in this POM. Add it to <properties> or check that the parent defines it.

  5. Release the snapshot

    shared-contracts follows ${project.version}, which is a snapshot. Release it first, then depend on the release version.

Try it yourself

Opens the Maven pom.xml Viewer with this tutorial's sample loaded.

Try it now

Common mistakes

Overriding managed versions casually
Adding a version to a Spring Boot starter overrides the tested set. Only do it to fix a specific issue.
Ignoring test scope
Test dependencies don’t ship, but flagged test dependencies still make builds unpredictable.

Next steps

Go back to the Maven pom.xml Viewer, or keep going with one of these: