While writing for the first time a multi-modules maven pom, I wonder something.
First, here my parent pom :
...
<modelVersion>4.0.0</modelVersion>
<groupId>project.room_management</groupId>
<artifactId>room_management</artifactId>
<packaging>pom</packaging>
<version>1.0</version>
<name>room_management</name>
<modules>
<module>room_management_dao</module>
<module>room_management_domain</module>
<module>room_management_service</module>
<module>room_management_gui</module>
</modules>
...
and one of its children :
...
<parent>
<groupId>project.room_management</groupId>
<artifactId>room_management</artifactId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>project.room_management</groupId>
<artifactId>room_management_domain</artifactId>
<version>1.0</version>
...
Considering I don’t need common modules to be share from parent to children poms, can I remove without “risks” the parent declaration into the children poms ? Or Maven does need it for modules compilation ?
You do not need the
<parent>section in the modules.This primarily mean that each module must be independent – you cannot share configuration sections through the parent.