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 | |
Thomas Vachuska | 0a1e549 | 2014-12-08 08:52:50 -0800 | [diff] [blame] | 6 | # TODO: figure out a more elegant way of ignoring disconnected projects |
tom | 1cd74ae | 2014-10-01 14:58:32 -0700 | [diff] [blame] | 7 | projects=$(find $ONOS_ROOT -name '*.java' \ |
Jonathan Hart | fccd312 | 2015-02-17 11:44:56 -0800 | [diff] [blame] | 8 | -not -path '.git/*' -and -not -path '*/archetypes/*' -and -not -path '*/foo/*' -and -not -path '*/grouphandler/*' \ |
tom | 1cd74ae | 2014-10-01 14:58:32 -0700 | [diff] [blame] | 9 | -exec $ONOS_ROOT/tools/dev/bin/onos-build-selective-hook {} \; | \ |
| 10 | sort -u | sed "s:$ONOS_ROOT::g" | tr '\n' ',' | \ |
| 11 | sed 's:/,:,:g;s:,/:,:g;s:^/::g;s:,$::g') |
| 12 | |
Pavlin Radoslavov | 9141379 | 2014-10-15 11:00:32 -0700 | [diff] [blame] | 13 | [ -n "$projects" ] && cd $ONOS_ROOT && mvn --projects $projects ${@:-clean install} |