blob: 331c4332d8e2097107ae2ea5b3ffec3021f3ead9 [file] [log] [blame]
Thomas Vachuskafc7f22d2014-12-04 11:07:01 -08001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Builds a set of projects using ONOS archetypes.
4# -----------------------------------------------------------------------------
5
Ayaka Koshibef17f34a2015-09-24 19:31:48 -07006function _usage () {
7cat << _EOF_
8usage:
9 $(basename $0)
10
11summary:
12 Builds a set of projects using ONOS archetypes.
13
14_EOF_
15}
16
17[ "$1" = "-h" ] && _usage && exit 0
18
Brian O'Connor726dc5b2015-09-05 00:13:07 -070019set -e
20
Thomas Vachuskafc7f22d2014-12-04 11:07:01 -080021export AROOT=/tmp/foo
Brian O'Connorf967ad62015-09-18 15:19:54 -070022export ARCHETYPE_OPTS="-DarchetypeGroupId=org.onosproject -DarchetypeVersion=1.4.0-SNAPSHOT"
Thomas Vachuskafc7f22d2014-12-04 11:07:01 -080023
Thomas Vachuskad9813e62015-01-21 08:43:04 -080024mkdir -p $AROOT
Thomas Vachuskaa2ae4222015-04-29 18:42:09 -070025for an in api bundle cli ui; do
Thomas Vachuskafc7f22d2014-12-04 11:07:01 -080026 cd $AROOT
27 rm -fr $AROOT/foo-$an
28 mvn archetype:generate $ARCHETYPE_OPTS \
29 -DarchetypeArtifactId=onos-$an-archetype \
30 -DgroupId=org.foo -DartifactId=foo-$an -Dversion=1.0 \
31 -Dpackage=org.foo.$an -DinteractiveMode=false
32 cd $AROOT/foo-$an
33 mvn clean install
34done