From 5fa5b9907684b63824352a353d31365e95cfbca3 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Thu, 18 Jan 2018 14:20:46 -0500 Subject: [PATCH] Improve verbosity in maven shell scripts There is no harm in enabling debug level verbosity for these scripts and may help in improving troubleshooting. Change-Id: I9edfee2f7d2415117d854ad7cdba280cc9751004 Signed-off-by: Thanh Ha --- shell/maven-build.sh | 2 +- shell/maven-fetch-metadata.sh | 2 +- shell/maven-javadoc-generate.sh | 2 +- shell/maven-sonar.sh | 2 +- shell/maven-stage.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/shell/maven-build.sh b/shell/maven-build.sh index 6be1900c..a807a03a 100644 --- a/shell/maven-build.sh +++ b/shell/maven-build.sh @@ -14,7 +14,7 @@ # DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound. # Ensure we fail the job if any steps fail. -set -e -o pipefail +set -xe -o pipefail set +u export MAVEN_OPTS diff --git a/shell/maven-fetch-metadata.sh b/shell/maven-fetch-metadata.sh index d3670d06..ebffa96f 100644 --- a/shell/maven-fetch-metadata.sh +++ b/shell/maven-fetch-metadata.sh @@ -12,7 +12,7 @@ # Uses wget to fetch a project's maven-metadata.xml files from a Maven repository. # Ensure we fail the job if any steps fail. -set -eu -o pipefail +set -xeu -o pipefail project=$(xmlstarlet sel \ -N "x=http://maven.apache.org/POM/4.0.0" -t \ diff --git a/shell/maven-javadoc-generate.sh b/shell/maven-javadoc-generate.sh index 405b29b0..891f60bc 100644 --- a/shell/maven-javadoc-generate.sh +++ b/shell/maven-javadoc-generate.sh @@ -13,7 +13,7 @@ # DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound. # Ensure we fail the job if any steps fail. -set -e -o pipefail +set -xe -o pipefail set +u JAVADOC_DIR="$WORKSPACE/archives/javadoc" diff --git a/shell/maven-sonar.sh b/shell/maven-sonar.sh index ef9bea28..ae9648a8 100644 --- a/shell/maven-sonar.sh +++ b/shell/maven-sonar.sh @@ -14,7 +14,7 @@ # DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound. # Ensure we fail the job if any steps fail. -set -e -o pipefail +set -xe -o pipefail set +u export MAVEN_OPTS diff --git a/shell/maven-stage.sh b/shell/maven-stage.sh index 482b53f4..74b74a99 100644 --- a/shell/maven-stage.sh +++ b/shell/maven-stage.sh @@ -16,7 +16,7 @@ # $STAGING_PROFILE_ID : Provided by a job parameter. # Ensure we fail the job if any steps fail. -set -eu -o pipefail +set -xeu -o pipefail TMP_FILE="$(mktemp)" lftools deploy nexus-stage "$NEXUS_URL" "$STAGING_PROFILE_ID" "$WORKSPACE/m2repo" | tee "$TMP_FILE" -- 2.16.6