The dependencyManagement section in a Maven pom.xml declares the versions (and scopes, exclusions) of dependencies in one central place without actually adding them to the project. A dependency listed there is only used if a module also declares it in its own dependencies block, where the version can then be omitted. This keeps versions consistent across a multi-module build and across teams.
The two sections look similar but behave differently.
| Aspect | dependencies | dependencyManagement |
|---|---|---|
| Adds the artifact to the classpath | Yes | No |
| Declares version, scope, exclusions for reuse | Only for itself | For every matching dependency in this and child modules |
| Inherited by child modules | Yes, all of them | Only as configuration, not as a dependency |
Nothing is downloaded or put on the classpath by this block alone. It only records "if anyone asks for jackson-databind, use 2.18.2". (The version number here is an example; use the current release of the library.)
A module then declares the dependency without a version:
Maven looks up the missing version (and scope, exclusions, type, classifier) in the effective dependencyManagement and fills it in. To change the version for all modules, you edit one line in the parent POM.
The classic setup is a parent POM with <packaging>pom</packaging> that holds dependencyManagement, and child modules that inherit from it:
All modules now share the same versions, which prevents the situation where one module ships library 1.2 and another ships 1.5 and the combined application breaks at runtime.
A Bill of Materials (BOM) is a POM that contains only dependencyManagement. You can pull one into your own section with <scope>import</scope> and <type>pom</type>, which works even if you already have a different parent.
Spring Boot, Jakarta EE, Quarkus, and many other projects publish BOMs this way. Alternatively, a Spring Boot project can use spring-boot-starter-parent as its parent, which already imports the managed versions. Import works only inside dependencyManagement, and the version shown is an example; check the current release.
jackson-databind, that version is used even when a library you depend on asks for another one. This is a standard way to fix a vulnerable transitive library.dependencyManagement, Maven uses "nearest definition" mediation: the version closest to your project in the dependency tree wins, which can change silently when you add a dependency.dependencyManagement and then getting ClassNotFoundException or compile errors.pluginManagement for plugin versions and configuration.Use these commands to inspect the result:
dependency:tree shows what is actually resolved, and help:effective-pom shows the merged POM including inherited management.
jackson.version for versions that are shared by several artifacts.dependencyConvergence or requireUpperBoundDeps to catch conflicting versions during the build.platform(...) and version catalogs, if you also work with Gradle.No. It only sets defaults. A dependency is included when a module declares it in its own dependencies section.
Yes. A version given directly on the child dependency, or a redefinition of the property or management entry in the child, takes precedence.
A parent POM is a mechanism for inheritance. dependencyManagement is one kind of information that a parent (or an imported BOM) can provide.
Check for a direct version on the dependency, a closer BOM import earlier in the file, or a plugin that overrides it. mvn help:effective-pom shows the final values.
dependencyManagement centralises dependency versions, scopes, and exclusions without adding anything to the classpath. Declare versions once in a parent POM or import a BOM, then list dependencies without versions in each module. This gives reproducible, consistent builds and a single place to upgrade or patch a library.