diff --git a/releng/scripts/check_mvn_plugin_versions.sh b/releng/scripts/check_mvn_plugin_versions.sh index e167d8899c0..60e2aec0868 100755 --- a/releng/scripts/check_mvn_plugin_versions.sh +++ b/releng/scripts/check_mvn_plugin_versions.sh @@ -1,6 +1,6 @@ #!/bin/bash ############################################################################### -# Copyright (c) 2015, 2017 Ericsson, EfficiOS Inc. and others +# Copyright (c) 2015, 2019 Ericsson, EfficiOS Inc. and others # # # This program and the accompanying materials @@ -16,12 +16,19 @@ # Marc-André Laperle - Copied to CDT ############################################################################### +set -u # run with unset flag error so that missing parameters cause build failure +set -e # error out on any failed commands +set -x # echo all commands used for debugging purposes + # Point ourselves to the script's directory (so it can be run "out-of-tree") DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -output=`mvn versions:display-plugin-updates -U -f $DIR/../../pom.xml` +output="$(mktemp /tmp/check_mvn_plugin_versions.output.XXXXXX)" +${MVN:-mvn} versions:display-plugin-updates -P build-standalone-debugger-rcp -U -B -f $DIR/../../pom.xml | tee $output #filter only updates and show unique -summary=`echo "${output}" | grep "\\->" | sort | uniq` +# XXX: Jonah added the exclusion for sonar-maven-plugin as Eclipse's SonarQube installation is not new enough +# XXX: see https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Maven#AnalyzingwithSonarQubeScannerforMaven-Compatibility +summary=`cat $output | grep "\\->" | grep -v "org.codehaus.mojo:sonar-maven-plugin" | sort | uniq` echo -e "Summary:\n${summary}" #remove empty lines and count lines