Use the mvn-phase-lib under utils
Switch to use the DCAE wide mvn-phase-lib.sh, which is under dcaegen2/utils
instead of having each repo having its own mvn-phase-lib.sh.
Issue-ID: DCAEGEN2-206
Change-Id: I2e95b410074f3e49d78b0f68d7dfb806fb49ba07
Signed-off-by: Lusheng Ji <lji@research.att.com>
diff --git a/mvn-phase-script.sh b/mvn-phase-script.sh
index afbe961..88b19f6 100755
--- a/mvn-phase-script.sh
+++ b/mvn-phase-script.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# ================================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,8 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ============LICENSE_END=========================================================
-#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
set -ex
@@ -69,6 +67,7 @@
MVN_PHASE="$2"
+echo "MVN_RELEASE_TAG is [$MVN_RELEASE_TAG]"
echo "MVN_PROJECT_MODULEID is [$MVN_PROJECT_MODULEID]"
echo "MVN_PHASE is [$MVN_PHASE]"
echo "MVN_PROJECT_GROUPID is [$MVN_PROJECT_GROUPID]"
@@ -86,7 +85,15 @@
echo "HOME is [$HOME]"
echo "PROJECT_ROOT is [$PROJECT_ROOT]"
-source "${PROJECT_ROOT}"/mvn-phase-lib.sh
+MVN_RELEASE_TAG="${MVN_RELEASE_TAG:-R2}"
+
+
+if ! wget -O ${PROJECT_ROOT}/mvn-phase-lib.sh \
+ "$MVN_RAWREPO_BASEURL_DOWNLOAD"/org.onap.dcaegen2.utils/${MVN_RELEASE_TAG}/scripts/mvn-phase-lib.sh; then
+ echo "Fail to download mvn-phase-lib.sh"
+ exit 1
+fi
+source "${PROJECT_ROOT}"/mvn-phase-lib.sh
# Customize the section below for each project