Multi-Module Maven Projects: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 9: Line 9:
=Overview=
=Overview=


For guidelines on when it is appropriate to use modules, and when separate projects, see "[ [#When_We_Should_Use_Modules.3F|When We Should Use Modules ?]]" section.
<pre>
<pre>
<project>
<project>

Revision as of 17:07, 4 November 2016

External

Internal

Overview

For guidelines on when it is appropriate to use modules, and when separate projects, see "[ [#When_We_Should_Use_Modules.3F|When We Should Use Modules ?]]" section.

<project>
    ...
    <modules>
        <module>module1</module>
        <module>module2</module>
    </modules>
    ...
</project>

Each <module> element corresponds to a subdirectory of the top level project directory. Maven will look into these subdirectories for pom.xml files. Each module will have its own independent source hierarchy.

The Reactor

When We Should Use Modules?

Modules and Versions

Organizatorium

  • The modules do not need to specify their <groupId>, as it is inherited from their parent, and thus redundant.