4 # ============LICENSE_START=======================================================
6 # ================================================================================
7 # Copyright (C) 2017 AT&T Intellectual Property. All rights
9 # ================================================================================
10 # Licensed under the Apache License, Version 2.0 (the "License");
11 # you may not use this file except in compliance with the License.
12 # You may obtain a copy of the License at
14 # http://www.apache.org/licenses/LICENSE-2.0
16 # Unless required by applicable law or agreed to in writing, software
17 # distributed under the License is distributed on an "AS IS" BASIS,
18 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 # See the License for the specific language governing permissions and
20 # limitations under the License.
21 # ============LICENSE_END=========================================================
24 if [ -z "$SETTINGS_FILE" -a -z "$GLOBAL_SETTINGS_FILE" -a -s "$HOME"/.m2/settings.xml ]
26 DEFAULT_MAVEN_SETTINGS=${HOME}/.m2/settings.xml
27 SETTINGS_FILE=${SETTINGS_FILE:-${DEFAULT_MAVEN_SETTINGS}}
28 GLOBAL_SETTINGS_FILE=${GLOBAL_SETTINGS_FILE:-${DEFAULT_MAVEN_SETTINGS}}
31 SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
33 targetDir=${1:-${SDNC_HOME}}
34 featureDir=${targetDir}/features
37 SDNC_NORTHBOUND_FEATURES=" \
38 generic-resource-api \
44 if [ ! -d ${targetDir} ]
49 if [ ! -d ${featureDir} ]
51 mkdir -p ${featureDir}
56 mavenOpts=${2:-"-s ${SETTINGS_FILE} -gs ${GLOBAL_SETTINGS_FILE}"}
59 echo "Installing SDN-C core version ${ccsdk.sli.version}"
60 for feature in ${SDNC_CORE_FEATURES}
62 rm -f /tmp/${feature}-installer*.zip
63 mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.sdnc.core:${feature}-installer:${ccsdk.sli.version}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true
64 unzip -d ${featureDir} /tmp/${feature}-installer*zip
67 echo "Installing SDN-C adaptors version ${ccsdk.sli.version}"
68 for feature in ${SDNC_ADAPTORS_FEATURES}
70 rm -f /tmp/${feature}-installer*.zip
71 mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.sdnc.adaptors:${feature}-installer:${ccsdk.sli.version}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true
72 unzip -d ${featureDir} /tmp/${feature}-installer*zip
75 echo "Installing SDN-C northbound version ${sdnc.northbound.version}"
76 for feature in ${SDNC_NORTHBOUND_FEATURES}
78 rm -f /tmp/${feature}-installer*.zip
79 mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.sdnc.northbound:${feature}-installer:${sdnc.northbound.version}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true
80 unzip -d ${featureDir} /tmp/${feature}-installer*zip
83 echo "Installing SDN-C plugins version ${ccsdk.sli.version}"
84 for feature in ${SDNC_PLUGINS_FEATURES}
86 rm -f /tmp/${feature}-installer*.zip
87 mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.sdnc.plugins:${feature}-installer:${ccsdk.sli.version}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true
88 unzip -d ${featureDir} /tmp/${feature}-installer*zip
93 echo "Installing platform-logic"
94 rm -f /tmp/platform-logic-installer*.zip
95 mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.sdnc.oam:platform-logic-installer:${sdnc.project.version}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true
96 unzip -d ${targetDir} /tmp/platform-logic-installer*.zip
98 find ${targetDir} -name '*.sh' -exec chmod +x '{}' \;