blob: b142bcde0967b63b33bdad578fecdcd79ef4cf6c [file] [log] [blame]
Jorge Hernandez777131d2019-01-04 14:43:44 -06001#!/usr/bin/env bash
2
Jorge Hernandez777131d2019-01-04 14:43:44 -06003# ============LICENSE_START=======================================================
4# ONAP
5# ================================================================================
jhh3f563fe2020-03-05 22:32:58 -06006# Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved.
Rashmi Pujarbb03caf2020-01-24 15:34:04 -05007# Modifications Copyright (C) 2020 Bell Canada.
Jorge Hernandez777131d2019-01-04 14:43:44 -06008# ================================================================================
9# Licensed under the Apache License, Version 2.0 (the "License");
10# you may not use this file except in compliance with the License.
11# You may obtain a copy of the License at
12#
13# http://www.apache.org/licenses/LICENSE-2.0
14#
15# Unless required by applicable law or agreed to in writing, software
16# distributed under the License is distributed on an "AS IS" BASIS,
17# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18# See the License for the specific language governing permissions and
19# limitations under the License.
20# ============LICENSE_END=========================================================
jhh3f563fe2020-03-05 22:32:58 -060021
22source ${POLICY_HOME}/etc/profile.d/env.sh
Jorge Hernandez777131d2019-01-04 14:43:44 -060023
24##############################################################################
25# Usage: usage
26##############################################################################
27
28function usage() {
29 echo
30 echo -e "syntax: $(basename "$0") "
jhh4112fec2019-12-09 18:11:13 -060031 echo -e "\t [-f|-l|-d]"
32 echo -e "\t -s <custom-settings> "
Jorge Hernandez777131d2019-01-04 14:43:44 -060033 echo -e "\t -a <artifact> "
34 echo
35 echo -e "Options:"
jhh4112fec2019-12-09 18:11:13 -060036 echo -e "\t -f|--file-repo: deploy in the file repository"
37 echo -e "\t -l|--local-repo: install in the local repository"
38 echo -e "\t -d|--dependencies: install dependencies in the local repository"
39 echo -e "\t -s|--settings: custom settings.xml"
40 echo -e "\t -a|--artifact: file artifact (jar or pom) to deploy and/or install"
Jorge Hernandez777131d2019-01-04 14:43:44 -060041 echo
42 echo
43}
44
45##############################################################################
jhh4112fec2019-12-09 18:11:13 -060046# Usage: init <artifact>
47#
48# If the artifact is a jar, this function extracts the maven metadata for
49# consumption in this script.
50#
51# As a result the global variables will be set:
52# WORKING_DIR: working directory with extracted files.
53# WORKING_POM: pom file location
54# WORKING_POM_PROPERTIES: pom properties file location
55##############################################################################
56
57function init
58{
59 if [[ ${DEBUG} == y ]]; then
60 echo "-- ${FUNCNAME[0]} $* --"
61 set -x
62 fi
63
64 local artifact="${1}"
65 if [[ ! -f ${artifact} ]]; then
66 echo "${artifact}: artifact does not exist"
67 return 1
68 fi
69
70 if [[ ${artifact} != *.jar ]]; then
71 return 0
72 fi
73
74 local dir=$(mktemp -d)
75 local jar="${artifact##*/}"
76
77 WORKING_DIR=$(realpath "${dir}")
78
79 cp -p "${artifact}" "${WORKING_DIR}/${jar}"
80 pushd "${dir}"
81
82 local rc=0
83
84 # determine name of 'pom' file within JAR
85 local pom=$(jar tf "${jar}" META-INF | grep '/pom\.xml$' | head -1)
86 if [[ -n ${pom} ]] ; then
87 jar xf "${jar}" "${pom}"
88 WORKING_POM=$(realpath "${pom}")
89 else
90 echo "${artifact}: pom not found"
91 fi
92
93 local pomProperties=$(jar tf "${jar}" META-INF | grep '/pom\.properties$' | head -1)
94 if [[ -n ${pomProperties} ]]; then
95 jar xf "${jar}" "${pomProperties}"
96 WORKING_POM_PROPERTIES=$(realpath ${pomProperties})
97 source "${WORKING_POM_PROPERTIES}"
98 echo "${artifact}: sourcing in ${WORKING_POM_PROPERTIES}"
99 else
100 echo "${artifact}: pom.properties not found"
101 if [[ -n ${WORKING_POM} ]]; then
102 if ! getPomAttributes "${WORKING_POM}" artifactId groupId version ; then
103 echo "${WORKING_POM}: cannot extract maven coordinates"
104 rc=1
105 fi
106 else
107 echo "${artifact}: cannot extract maven coordinates"
108 rc=1
109 fi
110 fi
111
112 if [[ -z ${version} ]] || [[ -z ${groupId} ]] || [[ -z ${artifactId} ]]; then
113 echo "${artifact}: some coordinates cannot be extracted"
114 rc=1
115 fi
116
117 echo "${artifact}: coordinates ${groupId}:${artifactId}:${version}"
118 popd
119
120 return ${rc}
121}
122
123##############################################################################
124# Usage: cleanup
125#
126# Clean up temporary resources.
127##############################################################################
128
129function cleanup
130{
131 if [[ ${DEBUG} == y ]]; then
132 echo "-- ${FUNCNAME[0]} $* --"
133 set -x
134 fi
135
136 if [[ -n ${WORKING_DIR} ]]; then
137 rm -rf "${WORKING_DIR}"
138 fi
139}
140
141##############################################################################
Jorge Hernandez777131d2019-01-04 14:43:44 -0600142# Usage: getPomAttributes <pom-file> <attribute> ...
143#
144# This function performs simplistic parsing of a 'pom.xml' file, extracting
145# the specified attributes (e.g. 'groupId', 'artifactId', 'version'). The
146# attributes are returned as environment variables with the associated name
147##############################################################################
148
149function getPomAttributes
150{
151 if [[ ${DEBUG} == y ]]; then
152 echo "-- ${FUNCNAME[0]} $* --"
153 set -x
154 fi
155
156 local file="$1"
157 if [[ ! -f "${file}" ]]; then
jhh4112fec2019-12-09 18:11:13 -0600158 echo "${file}: file does not exist"
Jorge Hernandez777131d2019-01-04 14:43:44 -0600159 return 1
160 fi
161
162 local tab=$'\t' rval=0 attr value
163 shift
164
165 for attr in "$@" ; do
166 # Try to fetch the parameter associated with the 'pom.xml' file.
167 # Initially, the 'parent' element is excluded. If the desired
168 # parameter is not found, the 'parent' element is included in the
169 # second attempt.
170 value=$(sed -n \
171 -e '/<parent>/,/<\/parent>/d' \
172 -e '/<dependencies>/,/<\/dependencies>/d' \
173 -e '/<build>/,/<\/build>/d' \
174 -e '/<profiles>/,/<\/profiles>/d' \
175 -e '/<description>/,/<\/description>/d' \
176 -e '/<packaging>/,/<\/packaging>/d' \
177 -e '/<modelVersion>/,/<\/modelVersion>/d' \
178 -e '/<properties>/,/<\/properties>/d' \
179 -e "/^[ ${tab}]*<${attr}>\([^<]*\)<\/${attr}>.*/{s//\1/p;}" \
180 <"${file}")
181
182 if [[ "${value}" == "" ]]; then
183 # need to check parent for parameter
184 value=$(sed -n \
185 -e '/<dependencies>/,/<\/dependencies>/d' \
186 -e '/<build>/,/<\/build>/d' \
187 -e '/<profiles>/,/<\/profiles>/d' \
188 -e '/<description>/,/<\/description>/d' \
189 -e '/<packaging>/,/<\/packaging>/d' \
190 -e '/<modelVersion>/,/<\/modelVersion>/d' \
191 -e '/<properties>/,/<\/properties>/d' \
192 -e "/^[ ${tab}]*<${attr}>\([^<]*\)<\/${attr}>.*/{s//\1/p;}" \
193 <"${file}")
194
195 if [[ "${value}" == "" ]] ; then
jhh4112fec2019-12-09 18:11:13 -0600196 echo "${file}: Can't determine ${attr}"
Jorge Hernandez777131d2019-01-04 14:43:44 -0600197 rval=1
198 fi
199 fi
200
201 # the following sets an environment variable with the name referred
202 # to by ${attr}
203 read "${attr}" <<<"${value}"
204 done
205 return ${rval}
206}
207
Jorge Hernandez777131d2019-01-04 14:43:44 -0600208##############################################################################
Rashmi Pujarbb03caf2020-01-24 15:34:04 -0500209# Usage: setMavenProxyArgs
210#
211# This function performs parsing of http proxy environment variable if provided,
212# extracting the attributes such as proxy host, port, username and password.
213# These proxy attributes are set into the global variable for maven proxy
214# settings to be used as build arguments with maven commands.
215##############################################################################
216
217function setMavenProxyArgs
218{
219 if [[ ${DEBUG} == y ]]; then
220 echo "-- ${FUNCNAME[0]} $* --"
221 set -x
222 fi
223
224 if [[ -z ${http_proxy} ]]; then
225 return 0
226 fi
227
Rashmi Pujar9d5791a2020-01-31 10:33:13 -0500228 local proxy_creds="${http_proxy#*//}"
229 local proxy="${proxy_creds#*@}"
230 local host="${proxy%:*}"
231 local port="${proxy#*:}"
Rashmi Pujarbb03caf2020-01-24 15:34:04 -0500232 MVN_PROXY_SETTINGS="-DproxyHost=${host} -DproxyPort=${port}"
233
234 if [[ "$proxy_creds" == *"@"* ]]; then
Rashmi Pujar9d5791a2020-01-31 10:33:13 -0500235 local creds="${proxy_creds%%@*}"
236 local username="${creds%:*}"
237 local password="${creds#*:}"
Rashmi Pujarbb03caf2020-01-24 15:34:04 -0500238 MVN_PROXY_SETTINGS+=" -DproxyUsername=${username} -DproxyPassword=${password}"
239 fi
240}
241
242##############################################################################
Jorge Hernandez777131d2019-01-04 14:43:44 -0600243# Usage: deployJar <jar-file>
244#
245# This function deploys a JAR file in a repository, as well as
246# the 'pom.xml' member it contains.
247#################################################################
248
249function deployJar
250{
251 if [[ ${DEBUG} == y ]]; then
252 echo "-- ${FUNCNAME[0]} $* --"
253 set -x
254 fi
255
jhh4112fec2019-12-09 18:11:13 -0600256 local file="${1}"
257
258 if [[ ! -f ${file} ]]; then
Jorge Hernandez777131d2019-01-04 14:43:44 -0600259 return 1
260 fi
261
jhh4112fec2019-12-09 18:11:13 -0600262 local repoId repoUrl
263 if [[ "${version}" =~ SNAPSHOT ]] ; then
264 repoId=${SNAPSHOT_REPOSITORY_ID}
265 repoUrl=${SNAPSHOT_REPOSITORY_URL}
266 else
267 repoId=${RELEASE_REPOSITORY_ID}
268 repoUrl=${RELEASE_REPOSITORY_URL}
269 fi
Jorge Hernandez777131d2019-01-04 14:43:44 -0600270
jhh4112fec2019-12-09 18:11:13 -0600271 if [[ -z ${repoUrl} ]] || [[ -z ${repoId} ]]; then
272 echo "{file}: no repository id/url to deploy jar"
273 return 1
274 fi
Jorge Hernandez777131d2019-01-04 14:43:44 -0600275
jhh4112fec2019-12-09 18:11:13 -0600276 echo "${file}: deploying jar artifact to repository ${repoId}: ${repoUrl}"
277 echo "${file}: coordinates ${groupId} ${artifactId} ${version}"
Jorge Hernandez777131d2019-01-04 14:43:44 -0600278
Rashmi Pujarbb03caf2020-01-24 15:34:04 -0500279 mvn ${CUSTOM_SETTINGS} ${MVN_PROXY_SETTINGS} deploy:deploy-file \
jhh4112fec2019-12-09 18:11:13 -0600280 -Dfile="${file}" \
281 -Dversion="${version}" \
282 -Dpackaging=jar \
283 -DgeneratePom=false \
284 -DpomFile="${WORKING_POM}" \
285 -DrepositoryId="${repoId}" \
286 -Durl="${repoUrl}" \
287 -DupdateReleaseInfo=true
Jorge Hernandez777131d2019-01-04 14:43:44 -0600288
jhh4112fec2019-12-09 18:11:13 -0600289 return ${?}
Jorge Hernandez777131d2019-01-04 14:43:44 -0600290}
291
292##############################################################################
293# Usage: deployPom <pom-file>
294#
295# This function deploys a 'pom.xml' file in the local repository
296##############################################################################
297
298function deployPom
299{
300 if [[ ${DEBUG} == y ]]; then
301 echo "-- ${FUNCNAME[0]} $* --"
302 set -x
303 fi
304
305 local file="${1}"
306
jhh4112fec2019-12-09 18:11:13 -0600307 if [[ ! -f ${file} ]]; then
Jorge Hernandez777131d2019-01-04 14:43:44 -0600308 return 1
309 fi
310
jhh4112fec2019-12-09 18:11:13 -0600311 if ! getPomAttributes "${file}" artifactId groupId version ; then
312 echo "${file}: cannot deploy pom due to missing attributes"
313 return 1
314 fi
Jorge Hernandez777131d2019-01-04 14:43:44 -0600315
jhh4112fec2019-12-09 18:11:13 -0600316 local repoId repoUrl
317 if [[ "${version}" =~ SNAPSHOT ]] ; then
318 repoId=${SNAPSHOT_REPOSITORY_ID}
319 repoUrl=${SNAPSHOT_REPOSITORY_URL}
Jorge Hernandez777131d2019-01-04 14:43:44 -0600320 else
jhh4112fec2019-12-09 18:11:13 -0600321 repoId=${RELEASE_REPOSITORY_ID}
322 repoUrl=${RELEASE_REPOSITORY_URL}
Jorge Hernandez777131d2019-01-04 14:43:44 -0600323 fi
jhh4112fec2019-12-09 18:11:13 -0600324
325 echo "${file}: deploying pom artifact to repository ${repoId}: ${repoUrl}"
326 echo "${file}: coordinates ${groupId} ${artifactId} ${version}"
327
Rashmi Pujarbb03caf2020-01-24 15:34:04 -0500328 mvn ${CUSTOM_SETTINGS} ${MVN_PROXY_SETTINGS} deploy:deploy-file \
jhh4112fec2019-12-09 18:11:13 -0600329 -Dfile="${file}" \
330 -Dpackaging=pom \
331 -DgeneratePom=false \
332 -DgroupId="${groupId}" \
333 -DartifactId="${artifactId}" \
334 -Dversion="${version}" \
335 -DrepositoryId="${repoId}" \
336 -Durl="${repoUrl}" \
337 -DupdateReleaseInfo=true
338
339 return ${?}
Jorge Hernandez777131d2019-01-04 14:43:44 -0600340}
341
342##############################################################################
343# Usage: deployArtifact
344#
jhh4112fec2019-12-09 18:11:13 -0600345# This function deploys a maven artifact in a repository
Jorge Hernandez777131d2019-01-04 14:43:44 -0600346##############################################################################
347
348function deployArtifact
349{
350 if [[ ${DEBUG} == y ]]; then
351 echo "-- ${FUNCNAME[0]} $* --"
352 set -x
353 fi
354
355 local file="${1}"
356 if [[ -z "${file}" ]]; then
357 echo "${file}: artifact file not provided"
358 return 1
359 fi
360
361 if [[ ! -f "${file}" ]]; then
362 echo "${file}: artifact file does not exist"
363 return 1
364 fi
365
366 case "${file}" in
367 *pom.xml|*.pom)
368 deployPom "${file}"
jhh4112fec2019-12-09 18:11:13 -0600369 return ${?}
Jorge Hernandez777131d2019-01-04 14:43:44 -0600370 ;;
371 *.jar)
372 deployJar "${file}"
jhh4112fec2019-12-09 18:11:13 -0600373 return ${?}
Jorge Hernandez777131d2019-01-04 14:43:44 -0600374 ;;
jhh4112fec2019-12-09 18:11:13 -0600375 *) echo "${file}: Don't know how to deploy artifact"
376 return 1
Jorge Hernandez777131d2019-01-04 14:43:44 -0600377 ;;
378 esac
jhh4112fec2019-12-09 18:11:13 -0600379}
380
381##############################################################################
382# Usage: installJar <artifact-file>
383#
384# This function installs a jar packaged artifact in the local repository
385##############################################################################
386
387function installJar
388{
389 if [[ ${DEBUG} == y ]]; then
390 echo "-- ${FUNCNAME[0]} $* --"
391 set -x
392 fi
393
394 local file="${1}"
395
396 if [[ ! -f ${file} ]]; then
397 return 1
398 fi
399
Rashmi Pujarbb03caf2020-01-24 15:34:04 -0500400 mvn ${CUSTOM_SETTINGS} ${MVN_PROXY_SETTINGS} \
401 org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file -Dfile="${file}"
jhh4112fec2019-12-09 18:11:13 -0600402
403 return $?
404}
405
406##############################################################################
407# Usage: installPom <pom-file>
408#
409# This function installs a pom file in the local repository
410##############################################################################
411
412function installPom
413{
414 if [[ ${DEBUG} == y ]]; then
415 echo "-- ${FUNCNAME[0]} $* --"
416 set -x
417 fi
418
419 local file="${1}"
420
421 if [[ ! -f ${file} ]]; then
422 return 1
423 fi
424
Rashmi Pujarbb03caf2020-01-24 15:34:04 -0500425 mvn ${CUSTOM_SETTINGS} ${MVN_PROXY_SETTINGS} \
426 org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file \
jhh4112fec2019-12-09 18:11:13 -0600427 -Dpackaging=pom \
428 -Dfile="${file}" \
429 -DpomFile="${file}"
430
431 return $?
432}
433
434##############################################################################
435# Usage: installArtifact
436#
437# This function installs a maven artifacts in the local repository
438##############################################################################
439
440function installArtifact
441{
442 if [[ ${DEBUG} == y ]]; then
443 echo "-- ${FUNCNAME[0]} $* --"
444 set -x
445 fi
446
447 local file="${1}"
448 if [[ -z "${file}" ]]; then
449 echo "${file}: artifact file not provided"
450 return 1
451 fi
452
453 if [[ ! -f "${file}" ]]; then
454 echo "${file}: artifact file does not exist"
455 return 1
456 fi
457
458 case "${file}" in
459 *pom.xml|*.pom)
460 installPom "${file}"
461 return ${?}
462 ;;
463 *.jar)
464 installJar "${file}"
465 return ${?}
466 ;;
467 *) echo "${file}: Don't know how to install the artifact"
468 return 1
469 ;;
470 esac
471}
472
473##############################################################################
474# Usage: installDependencies <pom-file>
475#
476# This function installs the dependencies of an artifact in the file or
477# local repository
478##############################################################################
479
480function installDependencies
481{
482 if [[ ${DEBUG} == y ]]; then
483 echo "-- ${FUNCNAME[0]} $* --"
484 set -x
485 fi
486
487 local file="${1}"
488
489 if [[ ! -f ${file} ]]; then
490 return 1
491 fi
492
493 if [[ -z ${DEPENDENCY_REPO_URL} ]]; then
494 echo "${file}: no repo url to install dependencies"
495 return 1
496 fi
497
498 echo "${file}: deploying dependencies from repository ${DEPENDENCY_REPO_URL}"
499 echo "${file}: coordinates ${groupId} ${artifactId} ${version}"
500
Rashmi Pujarbb03caf2020-01-24 15:34:04 -0500501 mvn ${CUSTOM_SETTINGS} ${MVN_PROXY_SETTINGS} \
502 org.apache.maven.plugins:maven-dependency-plugin:3.1.1:get \
jhh4112fec2019-12-09 18:11:13 -0600503 -DartifactId="${artifactId}" \
504 -DgroupId="${groupId}" \
505 -Dversion="${version}" \
506 -DremoteRepositories="${DEPENDENCY_REPO_URL}"
Jorge Hernandez777131d2019-01-04 14:43:44 -0600507
508 return ${?}
509}
510
511##############################################################################
512# MAIN
513##############################################################################
514
515if [[ ${DEBUG} == y ]]; then
516 echo "-- $0 $* --"
517 set -x
518fi
519
jhh4112fec2019-12-09 18:11:13 -0600520# reset globals
521
522unset ARTIFACT_FILE
523unset LOCAL_INSTALL
524unset INSTALL_DEPS
525unset FILE_REPO_INSTALL
526unset WORKING_DIR
527unset WORKING_POM
528unset WORKING_POM_PROPERTIES
529unset DEPENDENCY_REPO_URL
530unset SETTINGS_FILE
531unset CUSTOM_SETTINGS
Rashmi Pujarbb03caf2020-01-24 15:34:04 -0500532unset MVN_PROXY_SETTINGS
jhh4112fec2019-12-09 18:11:13 -0600533
534# process input
Jorge Hernandez777131d2019-01-04 14:43:44 -0600535
536until [[ -z "$1" ]]; do
537 case $1 in
jhh4112fec2019-12-09 18:11:13 -0600538 -a|--artifact) shift
539 ARTIFACT_FILE=$1
540 ;;
541 -s|--settings) shift
542 SETTINGS_FILE=$1
543 ;;
544 -l|--local-repo) LOCAL_INSTALL="true"
545 ;;
546 -d|--dependencies) INSTALL_DEPS="true"
547 ;;
548 -f|--file-repo) FILE_REPO_INSTALL="true"
549 ;;
550 *) usage
551 exit 1
552 ;;
Jorge Hernandez777131d2019-01-04 14:43:44 -0600553 esac
554 shift
555done
556
jhh4112fec2019-12-09 18:11:13 -0600557if [[ -z ${ARTIFACT_FILE} ]]; then
Jorge Hernandez777131d2019-01-04 14:43:44 -0600558 echo "No artifact file provided: $*"
559 usage
560 exit 1
561fi
562
jhh4112fec2019-12-09 18:11:13 -0600563if [[ -n ${SETTINGS_FILE} ]]; then
564 CUSTOM_SETTINGS="--settings=${SETTINGS_FILE}"
Jorge Hernandez777131d2019-01-04 14:43:44 -0600565fi
566
Rashmi Pujarbb03caf2020-01-24 15:34:04 -0500567# Set proxy attributes into MVN_PROXY_SETTINGS variable
568setMavenProxyArgs
569
jhh4112fec2019-12-09 18:11:13 -0600570# retval has the count of failed operations
571
572retval=0
573
574# initialize
575
576init "${ARTIFACT_FILE}"
577retval=$?
578if [[ ${retval} != 0 ]]; then
579 cleanup
580 exit ${retval}
581fi
582
583# remote repo deploy operation
584#
585# SNAPSHOT_REPOSITORY_URL and RELEASE_REPOSITORY_URL
586# are pre-existing environmental variables (base.conf)
587
588if [[ -n ${SNAPSHOT_REPOSITORY_URL} ]] || [[ -n ${RELEASE_REPOSITORY_URL} ]]; then
589 deployArtifact "${ARTIFACT_FILE}"
590 retval=$(( retval + ${?} ))
591fi
592
593# deploy in file repository
594
595if [[ -n ${FILE_REPO_INSTALL} ]]; then
596 FILE_REPO_ID="file-repository"
597 FILE_REPO_URL="file:${HOME}/.m2/file-repository"
598
Jorge Hernandez777131d2019-01-04 14:43:44 -0600599 SNAPSHOT_REPOSITORY_ID="${FILE_REPO_ID}"
600 SNAPSHOT_REPOSITORY_URL="${FILE_REPO_URL}"
601 RELEASE_REPOSITORY_ID="${FILE_REPO_ID}"
602 RELEASE_REPOSITORY_URL="${FILE_REPO_URL}"
603
604 mkdir -p "${FILE_REPO_URL#file:}" 2> /dev/null
jhh4112fec2019-12-09 18:11:13 -0600605 deployArtifact "${ARTIFACT_FILE}"
606 retval=$(( retval + ${?} ))
Jorge Hernandez777131d2019-01-04 14:43:44 -0600607fi
608
jhh4112fec2019-12-09 18:11:13 -0600609# install in local repository
610
611if [[ -n ${LOCAL_INSTALL} ]]; then
612 installArtifact "${ARTIFACT_FILE}"
613 retval=$(( retval + ${?} ))
614fi
615
616# install dependencies in local and/or file repositories
617
618if [[ -n ${INSTALL_DEPS} ]]; then
619 if [[ -n ${FILE_REPO_INSTALL} ]]; then
620 DEPENDENCY_REPO_URL="${FILE_REPO_URL}"
621 installDependencies "${ARTIFACT_FILE}"
622 retval=$(( retval + ${?} ))
623 fi
624
625 if [[ -n ${LOCAL_INSTALL} ]]; then
626 DEPENDENCY_REPO_URL="file:${HOME}/.m2/repository"
627 installDependencies "${ARTIFACT_FILE}"
628 retval=$(( retval + ${?} ))
629 fi
630fi
631
632cleanup
633
Jorge Hernandez777131d2019-01-04 14:43:44 -0600634exit ${retval}