The integration phase can reveal errors and incompatibilities of different parts of a project, made by each developer on the team.
Cruise Control is a continuous integration server, to automate the integration phase according to the succession of the following tasks:
The recovery of files from the SCM (Source Code Management)
Compilation of source code
Creation of the application archive (Ear, Jar, War, ...)
Deployment of archive
Execution of tests (Junit)
Result notification (mail, rss, ...)
We'll start by explaining what continuous integration is and then how to configure CruiseControl.
Continuous integration is a development/project management technique which involves the frequent integratation of the work of all the team members. Then, an automatic compilation process must be launched to check for any compilation errors of the project. Tests can also be launched!
Specifically, continuous integration is the process of automating compilations of the source code (including the latest changes made by different members of the team). Most continuous integration tools are able to perform the following action:
Proceed to the integration of the code based on a defined period of time (every hour, for example).
Update code from a source control.
Compilation of source code.
Launch unit tests.
Automatic sending emails to people involved (the developper who made the error, will receive the mail).
Sending a mail (report).
Deployment on a test server.
In reality, most of the continuous integration servers based on ANT or MAVEN (or both), provide an almost infinite list of possible actions.
The benefits of continuous integration are undeniable, it verifies gradually work of the whole team, to detect errors much faster and ensuring the consistency of the application.
Of course, the use of a continuous integration server implies several constraints:
The compilation should be automated (ANT, Maven, ...), no human intervention is needed to have a successful compilation.
Regular commit of the source code must be made by the team
Automatic testing must be launched (e.g JUnit, ANT or MAVEN)
An official shall receive the reports and ensure that people receiving errors are correcting