When the number of your projects rises, the need of factorization and rationalization arises. Two tools exist for this purpose: parent POMs and modules. Although both kinds are often merged, they belong to different registers.

Parent POM

Parent POMs, aka super POMs, offer a mechanism of inheritance. They allow you to factorize some data and constants, among which are the following few:

  • Common dependencies: In other terms, the artifacts that part or all of children POMs will depend on. Inscribing them in a parent POM has the same effect as writing them several times (and possibly having to update them manually on upgrading).
  • Properties, such as:
    • Plugin
    • Declarations
    • Executions and IDs
  • Configurations
  • Common data: Developers' names, SCM address, ...

Get Apache Maven Dependency Management now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.