Skip to content

Instantly share code, notes, and snippets.

@staslev
staslev / mvn-color-bashrc.sh
Last active January 3, 2016 00:29 — forked from wadouk/bashrc.sh
Make your maven output colorful to easily identify FAILURES and look a bit easier on the eye.
PURPLE=$(echo -en "\033[35m")
GREEN=$(echo -en "\033[32m")
RED=$(echo -en "\033[31m")
BLUE=$(echo -e "\033[1;34m")
NORMAL=$(echo -e "\033[0m")
mvn2() {
mvn $* | sed \
-e "
s/^\(Failed tests:.*\)$/$RED\1$NORMAL/; # contains 'Failed tests:'