#!/bin/bash
#===============================================================================
#
#          FILE:  cruise.sh
# 
#         USAGE:  cruise.sh [ant-targets]
# 
#   DESCRIPTION:  Run ant cruise teeing into ant-log.txt
#===============================================================================

LOGFILE=ant-log.txt
rm -f ${LOGFILE}
ARGS=cruise
[ x"$*" = x ] || ARGS=$*
(ant ${ARGS} ; ant java-test-reports) 2>&1 |tee ${LOGFILE}

echo
echo
echo Cruised... exceptions, errors and warning were:
echo
(grep Exception ${LOGFILE} && egrep -i 'error|warn' ${LOGFILE}) | \
egrep -v 'Errors: 0|javadoc]|groovydoc]|Deprecation|auth.login_error=1|testing errors|yam-errors|omitted|%%%% errors and'
echo
