现在的位置: 首页 > 综合 > 正文

CruiseControl学习之CVS

2012年02月11日 ⁄ 综合 ⁄ 共 1577字 ⁄ 字号 评论关闭

若要让CruiseControl获取CVS的文件,需要以下几个步骤:

1、修改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>

完整的Config.xml如下:

<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、用CVS客户端工具将你的"CVSProject" Check Out到projects文件夹下,并在"CVSProject"项目中创建build.xml文件,该配置文件内容参见上一章(《CruiseControl学习之Ant(build.xml)》)。


 

Note:第二部尤为重要,如果没有手动Check Out到project目录的话,Ant便无法正常工具,因为Ant需要通过已存在的CVS源代码本地库中读取CVS的各种信息(例如CVSROOT)。

抱歉!评论已关闭.