Always compile ONOS before start compiling JNI
Change-Id: If4e73bcf2fbc233819eb456db495772fabbd9001
diff --git a/ramcloud-build-scripts/build_jni_so.sh b/ramcloud-build-scripts/build_jni_so.sh
index 0ee12c4..a674e7f 100755
--- a/ramcloud-build-scripts/build_jni_so.sh
+++ b/ramcloud-build-scripts/build_jni_so.sh
@@ -1,12 +1,11 @@
#!/bin/bash
+
JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-oracle}
ONOS_HOME=${ONOS_HOME:-~/ONOS}
RAMCLOUD_HOME=${RAMCLOUD_HOME:-~/ramcloud}
RAMCLOUD_BRANCH=${RAMCLOUD_BRANCH:-master}
-if [ ! -d ${ONOS_HOME}/target/classes ]; then
- mvn -f ${ONOS_HOME}/pom.xml
-fi
+mvn -f ${ONOS_HOME}/pom.xml compile -T 1C
javah -cp ${ONOS_HOME}/target/classes -o ${ONOS_HOME}/src/main/cpp/edu_stanford_ramcloud_JRamCloud.h edu.stanford.ramcloud.JRamCloud