Skip to content

Instantly share code, notes, and snippets.

@laszlomiklosik
Created January 28, 2013 07:29
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save laszlomiklosik/4653659 to your computer and use it in GitHub Desktop.
Save laszlomiklosik/4653659 to your computer and use it in GitHub Desktop.
Maven multi-module build options
# Inspired from http://blog.akquinet.de/2010/05/26/mastering-the-maven-command-line-%E2%80%93-reactor-options/
# Build only specific modules:
mvn clean install -pl sub-module-name2
mvn clean install -pl sub-module-name2,sub-module-name3
# Build only starting from specific sub-module (resume from)
mvn clean install -rf sub-module-name2
# Build dependencies (also make)
mvn clean install –pl sub-module-name2 –am
# Build dependents (also make dependents)
mvn clean install -pl sub-module-name2 –amd
# Build only changed modules (compared to your SCM as specified in the pom file)
mvn reactor:make-scm-changes
@vackosar
Copy link

Maven extension gitflow-incremental-builder may be your friend. If you have multi-module maven project and you need to build or test only modules containing changes between two branches e.g. develop is usually stable and feature branches are not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment