Skip to content

Instantly share code, notes, and snippets.

@j-white
Created June 6, 2022 18:38
Show Gist options
  • Save j-white/56d13071af4845377d023e0430a14ca6 to your computer and use it in GitHub Desktop.
Save j-white/56d13071af4845377d023e0430a14ca6 to your computer and use it in GitHub Desktop.
#!/bin/sh
RELEASE=`python3 -c "import xml.etree.ElementTree as ET; print(ET.parse(open('pom.xml')).getroot().find( '{http://maven.apache.org/POM/4.0.0}version').text)";`
ROOT=`pwd`
if [ ! -e $ROOT/rebuild.sh ]; then
echo "Invalid root" && exit 1
fi
SRC_HOME="/Users/jwhite/git/opennms"
export MAVEN_OPTS="$MAVEN_OPTS -Xmx8g -XX:ReservedCodeCacheSize=1g"
./target/opennms/bin/opennms stop
rm -rf ./target
rm -rf ./features/minion/container/karaf/target
rm -rf ./features/container/minion/target
#./compile.pl -Dbuild.skip.tarball=true -DskipTests=true && ./assemble.pl -DskipTests=true
./clean.pl -DskipTests=true && ./compile.pl -DskipTests=true && ./assemble.pl -DskipTests=true
mkdir ./target/opennms-$RELEASE
ln -s $SRC_HOME/target/opennms-$RELEASE $SRC_HOME/target/opennms
tar zxvf ./target/opennms-$RELEASE.tar.gz -C $SRC_HOME/target/opennms-$RELEASE
cp -R /Users/jwhite/labs/opennms/overlay/* $SRC_HOME/target/opennms/
# sudo -E, sudo, sudo
./target/opennms/bin/runjava -s
./target/opennms/bin/install -dis
./target/opennms/bin/opennms -t start
date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment