#!/bin/sh if mvn -f pom.xml clean install > build-war.log 2> build-war.err.log; then echo "success" cp target/*.war /tmp else echo "failure" exit 1 fi