summaryrefslogtreecommitdiffstats
path: root/jvpp/install_from_package.sh
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2017-12-19 10:19:43 +0100
committerMarek Gradzki <mgradzki@cisco.com>2017-12-19 12:28:50 +0000
commita31bc791c7dca9ab9f74691fb8774f36be17764e (patch)
tree1e2789d85c9302aeacf81cfe077d9d7593cd0e57 /jvpp/install_from_package.sh
parent594d4f62ec8684e61314bce6e042cf3910e77e4e (diff)
Scripts for installing jvpp jars to local mvn repo
By default hc2vpp build downloads latest jvpp packages from nexus.fd.io. They might not be compatible with installed vpp (e.g. in case of non-backward compatible vpp api changes). In order to prevent API mismatch, it is required to use jvpp version corresponding to the vpp installed. The patch includes scripts that can be used before building hc2vpp to install jvpp jars from vpp build dir or vpp-api-java package. Change-Id: I9aa0dc37921e022e5644c54238d3d579f6eb5ba8 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'jvpp/install_from_package.sh')
-rwxr-xr-xjvpp/install_from_package.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/jvpp/install_from_package.sh b/jvpp/install_from_package.sh
new file mode 100755
index 000000000..f196f3ab0
--- /dev/null
+++ b/jvpp/install_from_package.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Installs jvpp jars from vpp-api-java package to local maven repository.
+# Use before building hc2vpp to make sure it matches installed vpp.
+# Not needed when using honeycomb package from nexus.fd.io
+# (compatible vpp version is given as package dependency).
+
+DIR_NAME=$(dirname $0)
+source ${DIR_NAME}/common.sh
+
+# Directory used by vpp-api-java package
+JAR_DIR="/usr/share/java/"
+echo "Installing vpp-api-java package jars from $JAR_DIR"
+
+JARS=$(find "$JAR_DIR" -type f -iname 'jvpp-*.jar')
+echo "Found:"
+echo "$JARS"
+
+JVPP_VERSION=`$DIR_NAME/../jvpp-version`
+echo "Target jvpp version: $JVPP_VERSION"
+
+for i in ${JARS}
+do
+ install_jvpp_jar "$i" "JVPP_VERSION"
+done \ No newline at end of file