Add default path for mvn settings file 47/1847/1
authorRashmi Pujar <rashmi.pujar@bell.ca>
Wed, 8 Mar 2017 22:17:17 +0000 (17:17 -0500)
committerRashmi Pujar <rashmi.pujar@bell.ca>
Wed, 8 Mar 2017 22:17:17 +0000 (17:17 -0500)
I believe Jenkins is settings these env variables.
However, having defaults when env is not set is
helpful to build images locally.

Change-Id: I0a40d5ce85e114a8ebb8003c94b7f0f7e3eb6d41
Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
Former-commit-id: 86b789e39591f2cbe7810806d196b8b342e89883

installation/sdnc/src/main/scripts/installZips.sh [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index c149396..ecff5a5
@@ -5,14 +5,14 @@
 # openECOMP : SDN-C
 # ================================================================================
 # Copyright (C) 2017 AT&T Intellectual Property. All rights
-#                         reserved.
+#                                              reserved.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
-#
+# 
 #      http://www.apache.org/licenses/LICENSE-2.0
-#
+# 
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # ============LICENSE_END=========================================================
 ###
 
+if [ -z "$SETTINGS_FILE" -a -z "$GLOBAL_SETTINGS_FILE" -a -s "$HOME"/.m2/settings.xml ]
+then
+  DEFAULT_MAVEN_SETTINGS=${HOME}/.m2/settings.xml
+  SETTINGS_FILE=${SETTINGS_FILE:-${DEFAULT_MAVEN_SETTINGS}}
+  GLOBAL_SETTINGS_FILE=${GLOBAL_SETTINGS_FILE:-${DEFAULT_MAVEN_SETTINGS}}
+fi
+
 SDNC_HOME=${SDNC_HOME:-/opt/openecomp/sdnc}
 
 targetDir=${1:-${SDNC_HOME}}