Multi-Module Maven Projects: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
No edit summary
Line 17: Line 17:


Each <tt><module></tt> element corresponds to a ''subdirectory'' of the top level project directory. Maven will look into these subdirectories for <tt>pom.xml</tt> files. Each module will have its own independent source hierarchy.
Each <tt><module></tt> element corresponds to a ''subdirectory'' of the top level project directory. Maven will look into these subdirectories for <tt>pom.xml</tt> files. Each module will have its own independent source hierarchy.
=Organizatorium=
The modules do not need to specify their <tt><groupId></tt>, as it is inherited from their parent, and thus redundant.

Revision as of 21:32, 18 March 2016

Internal

Overview

<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.


Organizatorium

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