Java Reference
In-Depth Information
before we start building. Otherwise, we waste the CPU power of our machine, knowing
for sure that we'll get the same results.
Now that we agree that we certainly need a tool to continuously integrate our proj-
ects, let's see which open source solutions we might want to use (there's no sense in
reinventing the wheel when there are good tools already made for us).
11.2
CruiseControl to the rescue
The first open source 2 project we're going to look at is called CruiseControl ( CC )
( http://cruisecontrol.sourceforge.net/ ) and is currently the de facto standard when it
comes to continuous build process. This project was created by a company called
ThoughtWorks and was the first continuous integration server available.
11.2.1
Getting started with CruiseControl
The first thing to do before we can start building our code continuously is to manage
our resources. By this we mean finding a suitable host machine for our CruiseControl
server. We need to manage the resources we have in such manner as to dedicate a sep-
arate machine to continuous integration. We may not need this at the beginning, but
with time our project will get bigger, and the CI build will take longer, so it's always
better to have a separate machine for the integration build.
Another good practice is to create an ad hoc user on the host machine for the CC
server. This user will have the right permissions to start the continuous server and exe-
cute the builds.
Once you find the host for the CruiseControl server, it's time to install it. The
installation procedure is pretty simple. You go to the CruiseControl website ( http://
cruisecontrol.sourceforge.net/) an d download the zip distribution of your choice. As
this topic is being written, the latest version of CruiseControl is 2.8.3, and we use the
binary distribution.
Once you download the distribution, you need to extract it into a folder (probably
the best place to extract the zip is in the home directory of the CC user you just cre-
ated), which from now on we refer to as $ CC_HOME . In the $ CC_HOME directory, you
should see the content we shown in table 11.1.
There are several things to notice in the folder structure within the $ CC_HOME
folder. As you can see, the CruiseControl package comes with an Apache Ant distribu-
tion. But this doesn't mean that you can't use Maven as a build system. You can use
whichever one you like best. We talk further on this topic later on.
Another thing that's worth mentioning is the projects folder. This folder is where
you store the projects you want to build continuously. If you look in that folder you'll
see a sample project called connectfour . This is a checked-out project, so before mov-
ing on it's good to take a brief look at it.
2
The CruiseControl framework is distributed under its own BSD-style license. The software is an OSI-certified
open source solution.
 
 
 
 
 
 
 
 
 
Search WWH ::




Custom Search