To get the CVS file from CruiseControl, perform the following steps:
1. Modify Config. xml
<bootstrappers>
<cvsbootstrapper localWorkingCopy="projects/${project.name}" />
<antbootstrapper anthome="apache-ant-1.7.0" buildfile="projects/${project.name}/build.xml" target="clean" />
</bootstrappers>
<modificationset quietperiod="30">
<!-- touch any file in connectfour project to trigger a build -->
<cvs localWorkingCopy="projects/${project.name}"/>
<filesystem folder="projects/${project.name}"/>
</modificationset>
The complete Config. xml is as follows:
<cruisecontrol>
<project name="CVSProject">
<listeners>
<currentbuildstatuslistener file="logs/${project.name}/status.txt"/>
</listeners>
<bootstrappers>
<cvsbootstrapper localWorkingCopy="projects/${project.name}" />
<antbootstrapper anthome="apache-ant-1.7.0" buildfile="projects/${project.name}/build.xml" target="clean" />
</bootstrappers>
<modificationset quietperiod="30">
<!-- touch any file in connectfour project to trigger a build -->
<cvs localWorkingCopy="projects/${project.name}"/>
<filesystem folder="projects/${project.name}"/>
</modificationset>
<schedule interval="300">
<ant anthome="apache-ant-1.7.0" buildfile="projects/${project.name}/build.xml"/>
</schedule>
<log>
<merge dir="projects/${project.name}/target/test-results"/>
</log>
<publishers>
<onsuccess>
<artifactspublisher dest="artifacts/${project.name}" file="projects/${project.name}/target/${project.name}.jar"/>
</onsuccess>
</publishers>
</project>
</cruisecontrol>
2. Use the CVS client tool to Check Out your "CVSProject" to the projects folder and create a build in the "CVSProject" project. xml file. For details about the configuration file, see the previous chapter ("Ant for learning CruiseControl (build. xml).
Note: the second part is particularly important. If you do not manually Check Out to the project directory, Ant will not be able to work properly, because Ant needs to read various information about CVS (such as CVSROOT) from the local library of the existing CVS source code ).