Java – Install parent POM without building Child modules

javamavenmaven-2pom.xml

I have a parent POM in a Maven project, with this structure:

             parent
               |
        ---------------
        |             |
      child1       child2

I want to install the POM of the "parent" in the local REPO to allow child1 take some changes that I did in the dependencyManagement, but I cannot do a regular "clean install" because "child2" is broken and will not build.

Which is the proper way to do this with maven (other than going to the parent pom and commenting the "child2" module).

Best Solution

Use the '-N' option in the mvn command.

From mvn -h:

-N,--non-recursive Do not recurse into sub-projects