summaryrefslogtreecommitdiffstats
path: root/tca-cdap-container/get-tca.sh
blob: 66038b182e152ad4489ae82b03fb11a9cf6e4187 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

ARTIFACTPATH=${1:-/opt/tca/}
PROTO='https'
NEXUSREPO='nexus.onap.org'
REPO='snapshots'
GROUPID='org.onap.dcaegen2.analytics.tca'
ARTIFACTID='dcae-analytics-cdap-tca'
VERSION='2.2.0-SNAPSHOT'

URL="${PROTO}://${NEXUSREPO}/service/local/repositories/${REPO}/content/${GROUPID//.//}/${ARTIFACTID}/${VERSION}/maven-metadata.xml"
VT=$(wget --no-check-certificate -O- $URL | grep -m 1 \<value\> | sed -e 's/<value>\(.*\)<\/value>/\1/' | sed -e 's/ //g')

URL="${PROTO}://${NEXUSREPO}/service/local/repositories/${REPO}/content/${GROUPID//.//}/${ARTIFACTID}/${VERSION}/${ARTIFACTID}-${VT}.jar"
#wget --no-check-certificate "${URL}" -O "${ARTIFACTPATH}${ARTIFACTID}-${VERSION%-SNAPSHOT}.jar"
wget --no-check-certificate "${URL}" -O "${ARTIFACTPATH}${ARTIFACTID}.${VERSION}.jar"