Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Bash function to only build modules (and dependent modules) in a multi-module reactor which have been touched since current branch was forked.
- function mvnd {
- # NB! ignores changes in pom modules
- # NB! checks only diffs branch from local master
- find . -maxdepth 4 -name pom.xml | xargs -I{} grep -iL -F "<packaging>pom</packaging>" {} | xargs dirname |grep -v target | sed -e 's/^.[/]*//g' | grep . > /tmp/mvn-modules.txt && git diff --name-only master | grep -o -F -f /tmp/mvn-modules.txt | xargs | tr ' ' ',' | xargs -I{} mvn $@ -pl {}
- }
- function mvndu {
- # NB! diffs from upstream head (can be used on master branch)
- find . -maxdepth 4 -name pom.xml | xargs -I{} grep -iL -F "<packaging>pom</packaging>" {} | xargs dirname |grep -v target | sed -e 's/^.[/]*//g' | grep . > /tmp/mvn-modules.txt && git diff --name-only @{u}...HEAD | grep -o -F -f /tmp/mvn-modules.txt | xargs | tr ' ' ',' | xargs -I{} mvn $@ -U -pl {} -amd -pl \!build/ear,\!build/war
- }
Add Comment
Please, Sign In to add comment