Build single module from multimodule pom

maven

Solution

Without automatic installing not, but it's possible to build only choosen projects. You need to have multi module build (I'm assuming you do). In reactor mode every command need to be run from the root of reactor.

So in your case:

`mvn reactor:make -Dmake.folders=mm2`

In this case you build mm2 module and modules on which it depends (mm1).

Useful links:

- Maven reactor plugin reference

- Maven book reactor chapter

From book examples I build only project persist and his dependency project model. Others projects are untouched with `mvn reactor:make -Dmake.folders=sample-persist`

alt text http://www.sonatype.com/books/maven-book/reference/figs/web/running_aro-dependencies.png

Other useful command is `reactor:make-dependents` which build projects that depend on X.

Problem

Is it possible to do? The environment: Multimodule pom consists of 3 modules: mm1, mm2, mm3. Module mm2 has mm1 as dependency. It is possible to build parent pom without any errors. The question: Is it possible to build single module mm2 (i.e., run maven from mm2 base directory) without installing mm1 into local repository? Thanks.

Original source