CI持续集成服务器如何发现失败/成功的Build?

这是来自Apache Mavan Continuum 的Coutinuum Faq的一段,主要是说明如何配置CI持续集成服务器如何发现失败/成功的Build:

Why Maven doesn't detect my failed builds?
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%
       If your bat file contains an exit /B at the end, this line must be inserted before it.

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?
Continuum uses the command line return code for detecting a successful or failed execution.

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.

 

 

你可能感兴趣的:(java,CI)