Article Figure 1 Figure 2 Figure 3 Figure 4
Listing 1 Listing 2 sep2006.tar

Listing 1 CruiseControl’s configuration file

<cruisecontrol>

    <!-- Date: 2006-04-27
          Developer: Craig Caulfield
          Description: the definition of a CruiseControl build loop. -->
          
    <project name="SunDeveloper" buildafterfailed="true">
    
        <dateformat format="dd/MM/yyyy HH:mm:ss"/>
        
        <property name="CC.installation.dir" 
         value="/usr/local/cruisecontrol-2.4.1"/>
        <property name="maven.installation.dir" 
         value="/usr/local/maven-2.0"/>
        
        <!-- Bootstrappers are run every time the build runs, but before the 
         modifications checks. -->
        <bootstrappers/>            
        
        <plugin name="htmlemail" classname="net.sourceforge.cruisecontrol. \
          publishers.HTMLEmailPublisher"/>
        <plugin name="svn" 
         classname="net.sourceforge.cruisecontrol.sourcecontrols.SVN"/>
        
        <!-- Defines where cruise looks for changes to decide whether to run 
         the build. -->
        <modificationset quietperiod="30">
            <svn localWorkingCopy="checkout/${project.name}" 
                 repositoryLocation="http://snagglepuss/svn/DEVELOPER/ \
                   trunk/${project.name}" 
                 username="cruise" 
                 password="catbert"/>
        </modificationset>
        
        <!-- Configures the actual build loop: when and what. -->
        <schedule>        
            <maven2 mvnhome="${maven.installation.dir}" 
                    pomfile="checkout/${project.name}/pom.xml" 
                    goal="clean test install site-deploy" 
                    time="1200"/>
        </schedule>
        
        <!-- The place to write the logs and anything other reports that 
         will be merged. -->
        <log dir="logs/${project.name}">
            <merge dir="checkout/${project.name}/target/surefire-reports"/>
        </log>
        
        <listeners>
            <currentbuildstatuslistener file="logs/${project.name}/ \
             buildstatus.txt"/>
        </listeners>
        
        <!-- The publishers are run after a build completes. -->
        <publishers>
            
            <!-- Copy the Maven generated site to a place where it can be 
             accessed through the CruiseControl reporting application -->
            <artifactsPublisher dir="checkout/${project.name}/target/site" 
             dest="artifacts/${project.name}"/>
            
            <!-- Send out the e-mails to publicise the build results. -->
            <htmlemail mailhost="mail.bigpond.com" 
             returnaddress="cruise@snagglepuss" 
             buildresultsurl="http://snagglepuss/cruisecontrol/ \
             buildresults/SunDeveloper"  reportsuccess="fixes" 
             logdir="logs/${project.name}" spamwhilebroken="true" 
             css="${CC.installation.dir}/reporting/jsp/webcontent/ \
             css/cruisecontrol.css" xsldir="${CC.installation.dir}/ \
             reporting/jsp/webcontent/xsl">
                <!-- Who gets e-mailed when it works. -->
                <success address="cruise@snagglepuss"/>
                <!-- Who gets e-mailed when it fails. -->
                <failure address="craigc@snagglepuss"/>
                <!-- Who gets e-mailed regardless.  -->
                <always address="cruise@snagglepuss"/>
            </htmlemail>
            
        </publishers>
        
    </project>
    
    <!-- Add any more projects below here -->
    
</cruisecontrol>