Vemai Clan
Vemai Clan

Reputation: 53

Can a child pom inherit plugin management and dependency management from the spring-boot-starter-parent of a custom parent pom?

Suppose, I have a custom parent pom with spring-boot-starter-parent as its parent. Will a child pom of this custom parent be able to inherit plugin management and dependency management from the spring-boot-starter-parent?

From what I could find out: if we use a custom parent we cannot use the plugin management features of the spring-boot-starter-parent but dependency management can be used by importing it spring-boot-dependencies as BOM. But say - my custom parent has spring-boot-starter-parent as its parent - will the child pom of this custom parent be able to inherit/use the dependency and plugin management features of the spring-boot-starter-parent through transitive dependencies mechanism? I think it could but I am not 100% confident. I am still a novice to Maven and I couldn't quite get my head around this. Please help to explain it.

Upvotes: 0

Views: 769

Answers (1)

Simon Martinelli
Simon Martinelli

Reputation: 36223

Inheritance works. You can simply try it.

For your reference her is the official documentation:

https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using-boot-maven-without-a-parent

Upvotes: 0

Related Questions