0
votes

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.

1
Hi @SimonMartinelli, yes I have already read this. However, here it does not mention anything about inheriting starter parent from custom parent, which is my main doubt.Esli Vemai
Have you tried it?Simon Martinelli
Hi Simon, thank you. I tried and could fetch both the dependency and plugin managements. Sometimes, without even giving a thought I tend to seek spoon feeding. This is a lesson learned. Thanks and please advise if you have anything additional to say regarding the question.Esli Vemai
Great that it works. I added my comment as the answer. I would appreciate if you could accept it. Thank youSimon Martinelli

1 Answers

0
votes

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