使用版本 cruisecontrol-bin-2.8.1
一、config.xml文件如下
<project forceBuildNewProject="false" name="XXXX">
<property name="warcopy" value="D:/cruisecontrol-bin-2.8.1"/>
<property name="cvsroot" value=":pserver:xxx:xxx@10.10.4.*:/cvs"/>
<property name="module" value="XXXX -r xxxxxx xxxx"/>
第一个xxxx是cvs下载后的存储文件夹名称。
第二个xxxxxx是cvs分支版本的路径
第三个 xxxx 是 cvs分支对应的主干名称,这样就可以找到分支进行下载,另外就是 -r 必须填写。
<listeners>
<currentbuildstatuslistener file="logs/${project.name}/status.txt"/>
</listeners>
<!--
<bootstrappers>
<antbootstrapper anthome="apache-ant-1.7.0" buildfile="projects/fi_config.xml" target="init" />
</bootstrappers>
<schedule interval="60" >
-->
<modificationset requiremodification="false">
<compound includeTriggerChanges="true">
<triggers>
<filesystem folder="projects/${project.name}"/>
</triggers>
<targets>
<cvs cvsroot="${cvsroot}" module="co -d ${module}"/>
</targets>
</compound>
</modificationset>
<schedule>
<ant anthome="apache-ant-1.7.0" buildfile="projects/fi_config.xml" time="2300"/>
<!--pause starttime="0800" endtime="1800"/-->
</schedule>
<publishers>
<onsuccess>
<artifactspublisher dest="${warcopy}/artifacts/${project.name}" file="${warcopy}/projects/${project.name}/AntBuild/war/finance.war"/>
</onsuccess>
</publishers>
</project>
二、fi_config.xml文件
<project name="xxxx" default="main" basedir=".">
<description>
finance-build
</description>
<property name="cvsroot" value=":pserver:xxx:xxx@10.10.4.*:/cvs"/>
<property name="module" value="xxx -r xxxxxxxx xxxx"/>
<property name="project.name" value="xxxx"/>
<target name="init">
<echo>___________this is start init_______________</echo>
<mkdir dir="${project.name}" />
<echo>___________this is end init_______________</echo>
</target>
<target name="cvs">
<echo>----------this is start cvs ----------</echo>
<cvs cvsroot="${cvsroot}" quiet="true" command="co -d ${module}" dest="."/>
<echo>----------this end cvs ----------</echo>
</target>
<target name="main">
<antcall target="cvs"/>
<echo>***********start xxxx build.xml***************</echo>
<ant antfile="${basedir}/xxxx-build.xml"/>
<echo>***********end xxxx build.xml***************</echo>
</target>
</project>
三、xxxx-build.xml 就是对应的build文件,注意改动里面的存储路径即可了。