CI持续集成服务器如何发现失败/成功的Build?
这是来自Apache Mavan Continuum 的Coutinuum Faq的一段,主要是说明如何配置CI持续集成服务器如何发现失败/成功的Build:
mvn.bat distributed with Maven 2.0.7 doesn't set correctly the exit code. The fixed version is available here.
--------------------------------------------------------------------------------
How does Continuum detect a successful build with ANT?
Continuum uses the command line return code for detecting a successful or failed execution.
If you use ant, you need to add the following lines at the end of ant.bat : if "%MAVEN_TERMINATE_CMD%" == "on" exit %ANT_ERROR% exit /B %ANT_ERROR% The code above is for ANT 1.7, you can download fixed scripts for older ANT here. How does Continuum detect a successful build with a SHELL script? You need to add the following lines at the end of script : if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
If your bat file contains an exit /B at the end, this line must be inserted before it.
--------------------------------------------------------------------------------
Continuum uses the command line return code for detecting a successful or failed execution.
If your bat file contains an exit /B at the end, this line must be inserted before it.