0

With the help of this post, I am trying to collate the best practices to Centralize the Maven Plugins and Dependencies in one pom ? Although few of the questions are bit obivious, I am still posting it as an open question for the sake of curating all the questions to conclude an ideal super pom for a corporate use. I welcome hearing from the Maven gurus.

  1. Will <pluginManagement> from parent pom be inherited into child pom ?

  2. Will <dependencyManagement> from parent pom be inherited into child pom ?

  3. Will <properties> from parent pom be inherited into child pom ?

  4. Will BOM pom import bring in dependencies from its <dependencyManagement> section ?

  5. Will BOM pom import bring in plugins from its <pluginManagement> section ?

  6. Will BOM pom import bring in properties from its <properties> section ?

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
zikzakjack
  • 972
  • 2
  • 9
  • 20
  • 1
    Just one tip: top level poms that specify too much end up being annoying, as usually individual apps then need to go around overriding a lot of dependencies that otherwise would come in a transitive way. Only specify truly global dependencies and configuration. Also it might be unreal to re-release all apps after you do a change in the top level pom, so be aware that apps could be using 1+ year old top level poms. So bear in mind not all apps will be aligned to the latest version of your top level pom. – Augusto Apr 29 '19 at 09:17

1 Answers1

1

For question 1 to 4, the answer is yes.

For 5 and 6, I am not sure, but I guess the answer is no.

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142