jenkis 部署eclipse 项目时使用ant打包,处理ant打包出错
获取ant 打包的返回的code,然后根据code来处理逻辑
cd $PROJECT_PATH/ && ant -buildfile jenkins_build.xml war antReturnCode=$? echo "ANT: Return code is: \""$antReturnCode"\"" if [ $antReturnCode -ne 0 ];then echo "ant deploy failed!" exit 1; else echo "ant deploy success!" fi