tom | 1cd74ae | 2014-10-01 14:58:32 -0700 | [diff] [blame] | 1 | #!/bin/bash |
Pavlin Radoslavov | 9141379 | 2014-10-15 11:00:32 -0700 | [diff] [blame] | 2 | # ---------------------------------------------------------------------------- |
tom | 1cd74ae | 2014-10-01 14:58:32 -0700 | [diff] [blame] | 3 | # Selectively builds only those projects that contained modified Java files. |
Pavlin Radoslavov | 9141379 | 2014-10-15 11:00:32 -0700 | [diff] [blame] | 4 | # ---------------------------------------------------------------------------- |
tom | 1cd74ae | 2014-10-01 14:58:32 -0700 | [diff] [blame] | 5 | |
| 6 | projects=$(find $ONOS_ROOT -name '*.java' \ |
Thomas Vachuska | fc7f22d | 2014-12-04 11:07:01 -0800 | [diff] [blame] | 7 | -not -path '*/openflowj/*' -and -not -path '.git/*' -and -not -path '*/archetypes/*' \ |
tom | 1cd74ae | 2014-10-01 14:58:32 -0700 | [diff] [blame] | 8 | -exec $ONOS_ROOT/tools/dev/bin/onos-build-selective-hook {} \; | \ |
| 9 | sort -u | sed "s:$ONOS_ROOT::g" | tr '\n' ',' | \ |
| 10 | sed 's:/,:,:g;s:,/:,:g;s:^/::g;s:,$::g') |
| 11 | |
Pavlin Radoslavov | 9141379 | 2014-10-15 11:00:32 -0700 | [diff] [blame] | 12 | [ -n "$projects" ] && cd $ONOS_ROOT && mvn --projects $projects ${@:-clean install} |