summaryrefslogtreecommitdiffstats
path: root/mvn-phase-lib.sh
diff options
context:
space:
mode:
authorAndrew Gauld <ag1282@att.com>2018-02-22 11:35:58 -0500
committerAndrew Gauld <ag1282@att.com>2018-02-22 11:36:31 -0500
commitb758d3686595c03eeb1bfe4f50b86f28b7b8c86f (patch)
treed39f5509e654f1756bd80853275b34b2cd2a6872 /mvn-phase-lib.sh
parentbc19a3632f8df30e28876418f00cd96caa6dfa91 (diff)
Make SONAR code coverage work
Change-Id: I8a61f287d439a5bf0b2cb203e31b514a2cae0a5e Issue-ID: DCAEGEN2-355 Signed-off-by: Andrew Gauld <ag1282@att.com>
Diffstat (limited to 'mvn-phase-lib.sh')
-rwxr-xr-xmvn-phase-lib.sh11
1 files changed, 4 insertions, 7 deletions
diff --git a/mvn-phase-lib.sh b/mvn-phase-lib.sh
index 3a41708..a44a206 100755
--- a/mvn-phase-lib.sh
+++ b/mvn-phase-lib.sh
@@ -52,10 +52,7 @@ if [ -z "$WORKSPACE" ]; then
WORKSPACE=$(pwd)
fi
-if [ -z "$SETTINGS_FILE" ]; then
- echo "SETTINGS_FILE environment variable not set. Cannot proceed"
- exit
-fi
+export SETTINGS_FILE=${SETTINGS_FILE:-$HOME/.m2/settings.xml}
@@ -144,7 +141,7 @@ expand_templates()
VALUE=$(echo "$TEMPLATE" | cut -f2 -d'=')
VALUE2=$(echo "$TEMPLATE" | cut -f2 -d'=' |sed 's/\//\\\//g')
set +e
- FILES=$(grep -rl "$KEY")
+ FILES=$(grep -rl "$KEY" .)
set -e
if [ -z "$FILES" ]; then
@@ -167,8 +164,8 @@ expand_templates()
#if [ ! -z "$FILES" ]; then
# echo "====> Resolving template $VALUE to value $VALUE"
- # #CMD="grep -rl \"$VALUE\" | tr '\n' '\0' | xargs -0 sed -i \"s/{{[[:space:]]*$VALUE[[:space:]]*}}/$VALUE/g\""
- # grep -rl "$KEY" | tr '\n' '\0' | xargs -0 sed -i 's/$KEY/$VALUE2/g'
+ # #CMD="grep -rl \"$VALUE\" . | tr '\n' '\0' | xargs -0 sed -i \"s/{{[[:space:]]*$VALUE[[:space:]]*}}/$VALUE/g\""
+ # grep -rl "$KEY" . | tr '\n' '\0' | xargs -0 sed -i 's/$KEY/$VALUE2/g'
# #echo $CMD
# #eval $CMD
#fi