As seen in the introduction to the POM, Maven supports project aggregation in addition to project inheritance. This section outlines how Maven processes projects with multiple modules, and how you can work with them more effectively.
The mechanism in Maven that handles multi-module projects is referred to as the reactor. This part of the Maven core does the following:
Because modules within a multi-module build can depend on each other, it is important that The reactor sorts all the projects in a way that guarantees any project is built before it is required.
The following relationships are honoured when sorting projects:
Note that only "instantiated" references are used - dependencyManagement and pluginManagement elements will not cause a change to the reactor sort order
No special configuration is required to take advantage of the reactor, however it is possible to customize its behavior.
The following command line switches are available:
Refer to the Maven command line interface reference for more information on these switches.
For versions of Maven prior to Maven 2.1, or for additional capabilities with the reactor such as building only the modules with SCM changes, the Reactor plugin can be used to further customize the execution of the projects. For information on how to use this, refer to the Reactor Plugin documentation.