diff --git a/Jenkinsfile b/Jenkinsfile index 342ab28077f..ff9c4fd23bd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -56,7 +56,7 @@ try { def testReports = '**/target/surefire-reports/TEST-*.xml' def warFiles = '**/target/*.war' sh "shopt -s globstar && rm -f $testReports $warFiles" - sh """./mvnw clean package \ + sh """./run-clean.sh ./mvnw clean package \ --batch-mode \ --settings .travis-settings.xml \ --update-snapshots \ @@ -232,7 +232,7 @@ void integrationTests(def appserver) { xvfb { withPorts { // Run the maven build - sh """./mvnw verify \ + sh """./run-clean.sh ./mvnw verify \ --batch-mode \ --settings .travis-settings.xml \ -DstaticAnalysis=false \ diff --git a/run-clean.sh b/run-clean.sh new file mode 100755 index 00000000000..0d75f21c19b --- /dev/null +++ b/run-clean.sh @@ -0,0 +1,5 @@ +#!/bin/bash -eu +Cmd=$1 +shift +$Cmd ${@-} +pkill -P $$