Konubinix' opinionated web of thoughts

Maven Project Aggregation

Fleeting

[2021-02-27 Sat 19:37]

By setting packaging to pom type, we’re declaring that project will serve as a parent or an aggregator – it won’t produce further artifacts.

https://www.baeldung.com/maven-multi-module

[2021-02-27 Sat 20:12]

Next, when running mvn package command in the parent project directory, Maven will build and test all three modules

https://www.baeldung.com/maven-multi-module

Project Aggregation is similar to Project Inheritance. But instead of specifying the parent POM from the module, it specifies the modules from the parent POM. By doing so, the parent project now knows its modules, and if a Maven command is invoked against the parent project, that Maven command will then be executed to the parent’s modules as well.

https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#project-aggregation

To do Project Aggregation, you must do the following:

Change the parent POMs packaging to the value “pom”. Specify in the parent POM the directories of its modules (children POMs).

https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#project-aggregation

Notes linking here