Search code examples
mavenspring-bootdependenciesdependency-management

Why is spring-boot-dependencies in dependencyManagement?


The Spring documentation Using Spring Boot without the parent POM shows that the dependency on spring-boot-dependencies is added to the dependencyManagement section. Is this really correct?

spring-boot-dependencies specifies version properties for all the dependencies. However, these properties are not available in the POM that uses spring-boot-dependencies. Presumably, this is because spring-boot-dependencies is in dependencyManagement.

spring-boot-dependencies only includes dependencyManagement and pluginManagement. So it seems possible to include spring-boot-dependencies as a dependency (not dependencyManagement) without adding unnecessary dependencies.

So why is spring-boot-dependencies to be included as dependencyManagement?


Solution

  • It's definitely correct. Please see Using Spring Boot without the parent POM!