1. cinfig.xml配置文件
<cruisecontrol>
  
<project name="hello"> 
   
<listeners>
     
<currentbuildstatuslistener file="logs/hello/status.txt" />
   
</listeners>
   
   
<bootstrappers>
     
<cvsbootstrapper localWorkingCopy="projects/hello" />
   
</bootstrappers>
   
<!—监控本地工作目录,如果在下面的目录中发生变化则自动执行下面的build.xml,没有变化则不再执行下面的构建工作 -->
   
<modificationset quietperiod="30" > <!—监控前的静默 -->
     
<cvs localWorkingCopy="projects/hello"/>
     
<cvs localWorkingCopy="projects/hello/main/src/java/com/test/qik"/>
   
</modificationset>
   
<!—计划时间间隔,单位秒 -->
   
<schedule interval="30" >
     
<ant anthome="apache-ant-1.6.3" 
       buildfile
="projects/hello/build.xml"
       target
="CI"/><!—构建时执行的build.xml -->
   
</schedule>
   
   
<log>
       
<merge dir="projects/hello/test-reports"/>
   
</log><!—记载日志报告的位置 -->
   
   
<publishers>
       
<artifactspublisher dest="artifacts" file="projects/hello/target/hello.jar"/>
   
</publishers><!—发布jar包的位置,我都是在build.xml中将jar包打好放在这个位置 -->
   
  
</project>
</cruisecontrol>

本人自己config.xml
<cruisecontrol>
    
<project name="CruiseControlTest" buildafterfailed="true"> 

        
<listeners>
            
<currentbuildstatuslistener file="logs/CruiseControlTest/status.txt"/>
        
</listeners>

        
<bootstrappers>
            
<antbootstrapper anthome="apache-ant-1.7.0" buildfile="projects/CruiseControlTest/build.xml" target="clean" />
            
<svnbootstrapper localWorkingCopy="projects/CruiseControlTest" />
        
</bootstrappers>

        
<modificationset quietperiod="30">
        
<!-- 系统自动检查版本库,如发生变化,这执行update-->
            
<svn LocalWorkingCopy="projects/CruiseControlTest"  username="XXX" password="XXX"/>
        
</modificationset>

        
<schedule interval="30">
            
<ant anthome="apache-ant-1.7.0" buildfile="projects/CruiseControlTest/build.xml"/>
        
</schedule>

        
<log>
        
<!-- 此处位置一定要配置正确,CC才能正确的显示测试结果,否则,CC只会用行测试用例,但是报告No Tests Run  
                 This project doesn't have any tests  
             
-->
            
<merge dir="projects/CruiseControlTest/target/test-results"/>
        
</log>

        
<publishers>
            
<onsuccess>
                
<artifactspublisher dest="artifacts/CruiseControlTest" file="projects/CruiseControlTest/target/CruiseControlTest.jar"/>
            
</onsuccess>
            
<email mailhost="example.cn" returnaddress="system@example.cn" 
                  skipusers
="true"   subjectprefix="[CruiseControl]" 
                  buildresultsurl
="http://localhost:8888/buildresults/CruiseControlTest" > 
                  
<failure address="system@example.cn" />  
                  
<success address="system@example.cn" />  
            
</email>
        
</publishers>

    
</project>
</cruisecontrol>