0

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.

Vemai Clan
  • 33
  • 4
  • Have you read the docs? https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using-boot-maven-without-a-parent – Simon Martinelli Jun 07 '19 at 14:46
  • 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. – Vemai Clan Jun 10 '19 at 13:11
  • Have you tried it? – Simon Martinelli Jun 10 '19 at 15:26
  • 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. – Vemai Clan Jun 17 '19 at 16:29
  • Great that it works. I added my comment as the answer. I would appreciate if you could accept it. Thank you – Simon Martinelli Jun 17 '19 at 18:21

1 Answers1

0

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

Simon Martinelli
  • 34,053
  • 5
  • 48
  • 82