i'm writing a bash script to automate the build process. there are two major build blocks, one is an ant task and one is a plain old "mvn clean install". i want to do something when there are build error coming from either of this two build processes.
and the problem is, these builds will contain test failures or errors from time to time, but the end result is successful. and i believe that the status code ($?) return by these processes should be 0 no matter the build fail or succeed, i could be wrong.
so what is the best way for my script to detect the end result (build fail/succeed) without catching the false info during the mid build (test errors, etc) from them?