-mvn --fail-at-end site-deploy
-if [ $? != "0" ] ; then
- mail -s "SiteGeneration@$HOSTNAME FAILURE - $DATE - $BUILD_DIR" $TO < pom.xml
+/usr/local/bin/mvn -up --fail-at-end site-deploy $PROFILES 2>&1 | tee siteGeneration.log
+if [ $PIPESTATUS -eq 0 ]
+then
+ echo No need to send email for successful site generation