Files
monasca-api/common/build_common.sh
Craig Bryant 011824ef26 Change to use maven 3
Also, download and build common directly instead of hacking the
build to use the jars from tarballs.openstack.org

Update the README.md to explain the new StackForge build

Change-Id: I08cc1b304eaad38fc0619a09efc91c11e8633199
2015-03-13 11:43:55 -06:00

30 lines
677 B
Bash
Executable File

#!/bin/sh
set -x
ME=`whoami`
echo "Running as user: $ME"
MVN=$1
VERSION=$2
check_user() {
ME=$1
if [ "${ME}" != "jenkins" ]; then
echo "\nERROR: Download monasca-common and do a mvn install to install the monasca-commom jars\n" 1>&2
exit 1
fi
}
BUILD_COMMON=false
POM_FILE=~/.m2/repository/monasca-common/monasca-common/${VERSION}/monasca-common-${VERSION}.pom
if [ ! -r "${POM_FILE}" ]; then
check_user ${ME}
BUILD_COMMON=true
fi
# This should only be done on the stack forge system
if [ "${BUILD_COMMON}" = "true" ]; then
git clone https://github.com/stackforge/monasca-common
cd monasca-common
${MVN} clean
${MVN} install
fi