Defining a parent module

In most of the multi-module Maven projects, there are many things that are shared across multiple modules. Dependency versions, plugin versions, properties, and repositories are only some of them. It is a common (and a best) practice to create a separate module called parent and define everything in common in its POM file. The packaging type of this POM file is pom. The artifact generated by the pom packaging type is itself a POM file.

The following are few examples of Maven parent modules:

Not all the projects follow this approach. Some just keep ...

Get Maven Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.