Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (28 sloc) 1.09 KB
#!/bin/sh
# Formatting constants
BLACK=`tput setaf 0`
RED=`tput setaf 1`
GREEN=`tput setaf 2`
YELLOW=`tput setaf 3`
BLUE=`tput setaf 4`
MAGENTA=`tput setaf 5`
CYAN=`tput setaf 6`
WHITE=`tput setaf 7`
RESET=`tput sgr0`
mvn $@ | grep -v "^\[debug\] execute contextualize$" | \
sed \
-e "s/\[ERROR\]\(.*\/\)\(.*\.scala:[0-9]*\)\(.*\)/${RED}\1${BLUE}\2${RED}\3${RESET}/g" \
-e "s/\(\[ERROR\].*$\)/${RED}\1${RESET}/g" \
-e "s/\(Errors: [1-9][0-9]*\)/${RED}\1${RESET}/g" \
-e "s/\(Failures: [1-9][0-9]*\)/${RED}\1${RESET}/g" \
-e "s/\(\[WARNING\].*$\)/${YELLOW}\1${RESET}/g" \
-e "s/\(Skipped: [1-9][0-9]*\)/${YELLOW}\1${RESET}/g" \
-e "s/\(BUILD FAILURE\)/${RED}\1${RESET}/g" \
-e "s/\(FAILURE\)/${RED}\1${RESET}/g" \
-e "s/\(SKIPPED\)/${BLUE}\1${RESET}/g" \
-e "s/\(BUILD SUCCESS\)/${GREEN}\1${RESET}/g" \
-e "s/\(SUCCESS\)/${GREEN}\1${RESET}/g" \
-e "s/\(run: [1-9][0-9]*\)/${GREEN}\1${RESET}/g" \
-e "s/\[INFO\] \(Building .*$\)/\[INFO\] ${BLUE}\1${RESET}/g" \
-e "s/\[INFO\] \(------------------------------------------------------------------------\)/\[INFO\] ${BLUE}\1${RESET}/g"
echo ''