If you have a pom reactor (pom with a <modules> element and a <packaging> defined as pom ), then the modules will be built in a dependent order. This ordering occurs regardless of the order in which the modules are listed in pom.
There are several ways to approach this:
Option 1
Your jet pump does not have to be the same pump as your parent pump. So you could:
project/pom.xml # Reactor pom with <modules> element project/parent/pom.xml # Parent pom project/module-a/pom.xml # Some module 'a' project/module-b/pom.xml # Some module 'b'
In this case, the pom reactor contains:
<modules> <module>parent</module> <module>module-a</module> <module>module-b</module> </modules>
Running mvn install at the top level will create your parent pom and two modules in a dependent order.
Option 2
Move the parent pom up the directory and use it as the parent pom and pom of the reactor, so your project looks like this
project/pom.xml # Parent/Reactor pom with <modules> element project/module-a/pom.xml # Some module 'a' project/module-b/pom.xml # Some module 'b'
The module section in it will look like this:
<modules> <module>module-a</module> <module>module-b</module> </modules>
Again, running mvn install at the top level will create the parent pom and two modules in a dependent order.
Option 3
Leave your parent pom where it is and add a module section:
<modules> <module>../module-a</module> <module>../module-b</module> </modules>
In this case, running mvn install -f parent / pom.xml will create the parent pom and two modules in a dependent order.
Conclusion
Usually I use Option 2. This is the template that is most used in maven, and I try to avoid too much deviation from the "beaten path", which is widely understood and verified.
See the Multiple Module Guide for more information.