5 # Download the latest VPP java API package
6 URL="https://nexus.fd.io/service/local/artifact/maven/content"
9 ARTIFACTS="vpp-api-java"
11 VERSION=`./vpp-version`
12 if [ "${VERSION}" != 'RELEASE' ]; then
13 if [ "${OS}" == "centos7" ]; then
14 VERSION="${VERSION}.x86_64"
16 VERSION="${VERSION}_amd64"
20 if [ "${OS}" == "ubuntu1404" ]; then
21 OS_PART="ubuntu.trusty.main"
24 elif [ "${OS}" == "ubuntu1604" ]; then
25 OS_PART="ubuntu.xenial.main"
28 elif [ "${OS}" == "centos7" ]; then
34 if [ "${STREAM}" == "master" ]; then
37 STREAM_PART="stable.${STREAM}"
40 REPO="fd.io.${STREAM_PART}.${OS_PART}"
42 for ART in ${ARTIFACTS}; do
43 for PAC in ${PACKAGE}; do
44 curl "${URL}?r=${REPO}&g=${GROUP}&a=${ART}&p=${PAC}&v=${VERSION}&c=${CLASS}" -O -J || exit
48 # verify downloaded package
49 if [ "${OS}" == "centos7" ]; then
55 for FILE in ${FILES}; do
56 echo " "${FILE} >> ${FILE}.md5
58 for MD5FILE in *.md5; do
59 md5sum -c ${MD5FILE} || exit
63 # install vpp-api-java, this extracts jvpp .jar files into usr/share/java
64 if [ "${OS}" == "centos7" ]; then
65 sudo rpm --nodeps --install vpp-api-java*
67 sudo dpkg --ignore-depends=vpp --install vpp-api-java*
71 # install jvpp jars into maven repo, so that maven picks them up when building hc2vpp
72 version=`./jvpp-version`
77 for item in jvpp*.jar; do
78 # Example filename: jvpp-registry-17.01-20161206.125556-1.jar
79 # ArtifactId = jvpp-registry
81 basefile=$(basename -s .jar "$item")
82 artifactId=$(echo "$basefile" | cut -d '-' -f 1-2)
83 mvn install:install-file -Dfile=${item} -DgroupId=io.fd.vpp -DartifactId=${artifactId} -Dversion=${version} -Dpackaging=jar -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r