Maven by Example
   - 7.2. The Simple Parent Project

7.2. The Simple Parent Project

This simple-parent project has a pom.xml that references five submodules: simple-command, simple-model, simple-weather, simple-persist, and simple-webapp. The top-level pom.xml is shown in simple-parent Project POM.

simple-parent Project POM. 

<project xmlns=""

    <name>Multi-Spring Chapter Simple Parent Project</name>





If you are already familiar with Maven POMs, you might notice that this top-level POM does not define a dependencyManagement element. The dependencyManagement element allows you to define dependency versions in a single, top-level POM, and it is introduced in Chapter 8, Optimizing and Refactoring POMs.

Note the similarities of this parent POM to the parent POM defined in simple-parent Project POM. The only real difference between these two POMs is the list of submodules. Where that example only listed two submodules, this parent POM lists five submodules. The next few sections explore each of these five submodules in some detail. Because our example uses Java annotations, we’ve configured the compiler to target the Java 5 JVM.

Become a Member

Are you a current user of: