I think it is sufficient to run the parent POM. See the question What is the "reactor" in Maven? about the plugin that implements that for Maven. So you have the following options (at least):
- Build the parent POM, which will build all modules as well.
- Build a module individually, and it will build its dependencies automatically.
Here is a small experiment I have done on my own:
Build automatically == false.
![enter image description here]()
Build a multi-module Maven project, and add there 2 modules.![enter image description here]()
Insert some code into the modules. ![enter image description here]()
Run mvn install inside eclipse ![enter image description here]()
As a result, I get the following output in the console:
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] MultiModuleExample
[INFO] Unnamed - com.tsi.mli:sideware:jar:0.0.1-SNAPSHOT
[INFO] Unnamed - com.tsi.mli:business:jar:0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Building MultiModuleExample
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
[INFO] [install:install {execution: default-install}]
[INFO] Installing C:\projekte\setools-work\build\example-build-projekte\indigo-full\ws\multi-module-example\pom.xml to C:\Users\mliebelt\.m2\repository\com\tsi\mli\multi-module-example\0.0.1-SNAPSHOT\multi-module-example-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - com.tsi.mli:sideware:jar:0.0.1-SNAPSHOT
[INFO] task-segment: [install]
...
The directory structure I have got is:
multi-module-example/
business/
src/
target/
.classpath
.project
pom.xml
sideware/
...
src/
.project
pom.xml