Continuous integration Java manual
First, concept
Martin Fowler's article: Continent Integration Chinese Translation: Continuous Integration
Second, tools
Traditional tools: JBuilder, VisualsourceSafe, Rational Clearcase
Auto Compilation Tool: Ant
Return test Tool: JUnit
Code Check Tool: Checkstyle
Continuous integration tool: CruiseControl
Third, step
CruiseControl monitoring changes in the remote version control system When the CruiseControl call compilation tool compiles (Ant, etc.) After the compilation is successful, call JUnit to return to the test. After successful, call CheckStyle to check the package, deploy, update the version control system, compile the results after completion , Test results, code check results are sent to developers, executive managers, and publish to websites, and even alarm
All this is automatically carried out according to the prepared script
Fourth, the implementation example
At present, we use ClearCase, the master software is CruiseControl, its script file is cccc.xml
Configure a remote version control system
modificationSet>
Configure compilation tool
schedule>
Configure test case (in Ant configuration file)
junit>
target>
Configuration report
htmlemail>
publishers>
Where CruiseControl has no support for code inspection tools, it is recommended to use Ant to call Checkstyle, and examples are as follows (no truly run):
claspath>
taskdef>
filterset>
copy>
checkstyle>
target>
Pack, deploy (in Ant configuration file)
jar>
jar>
target>
target>
Check OUT version Control tool (in Ant configuration file)
target>
Compress ZIP file (in Ant configuration file)
CHECK IN version control tool configuration item (in Ant configuration file)
target>
Five, some prompts
CruiseControl automatically controls remote VIEW monitoring remote VOB actually in addition to monitoring remote version control systems, CRUISECONTROL2.2 is only responsible for monitoring changes and calls Ant, CRUISECONTROL2.2, as if it cannot be in JDK5 .0 running, if you need to integrate JDK5.0, you need to specify Source and Target for the
log>
After the compilation failed, before checkin, it is generally not re-compiled. At this time, the "buildAfterfailed" property that can set
Sixth, reference materials
DailyBuild Raiders Draco.net continues to integrate .NET manual