From 92254990bce62d0731cd312d038fa0b6871b0d2d Mon Sep 17 00:00:00 2001 From: Craig Bryant Date: Thu, 19 Feb 2015 12:49:24 -0700 Subject: [PATCH] Fail main maven build if java maven build fails Java maven sub build could fail and main maven build still succeed because of the shell script in between. Pass the maven exit code back Change-Id: I4df4ee7d782db21c89c49b0ee0a4741cbfa97edb --- run_maven.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/run_maven.sh b/run_maven.sh index 8793c596..f5bf3b32 100755 --- a/run_maven.sh +++ b/run_maven.sh @@ -14,9 +14,11 @@ shift # Invoke the maven 3 on the real pom.xml ( cd java; ${MVN} $* ) +RC=$? # Copy the jars where the publisher will find them mkdir -p target cp java/*/target/*.jar target rm -fr apache-maven-3.2.1* +exit $RC