blob: 75c0c92a0e158b6d47464a5ace6bacde1312caa6 [file] [log] [blame]
#!/bin/bash
# -----------------------------------------------------------------------------
# Builds a set of projects using ONOS archetypes.
# -----------------------------------------------------------------------------
function _usage () {
cat << _EOF_
usage:
$(basename $0)
summary:
Builds a set of projects using ONOS archetypes.
_EOF_
}
[ "$1" = "-h" ] && _usage && exit 0
set -e
export AROOT=${ONOS_STAGE_ROOT:-/tmp}/foo
export ARCHETYPE_OPTS="-DarchetypeGroupId=org.onosproject -DarchetypeVersion=2.1.0-SNAPSHOT"
mkdir -p $AROOT
for an in api bundle cli rest ui uitab uitopo; do
cd $AROOT
rm -fr $AROOT/foo-$an
mvn archetype:generate "$@" $ARCHETYPE_OPTS \
-DarchetypeArtifactId=onos-$an-archetype \
-DgroupId=org.foo -DartifactId=foo-$an -Dversion=1.0 \
-Dpackage=org.foo.$an -DinteractiveMode=false
cd $AROOT/foo-$an
mvn "$@" clean install
done