CruiseControl has integrated Ant. The CC integration version of 2.8.4 is 1.7.0, not the latest Ant.
Ant scripts are written in an xml file. The default file name is build. xml, which can be customized.
CC provides us with a simple Ant script, as shown below:
<project name="connectfour" default="all">
<target name="all" depends="clean, compile, sleep, test, jar"/>
<target name="clean">
<delete dir="target" quiet="true" />
</target>
<target name="compile">
<mkdir dir="target/classes"/>
<javac srcdir="src" destdir="target/classes"/>
</target>
<target name="sleep">
<echo message="Sleeping for a while so you can see the build in the new dashboard" />
<sleep seconds="60" />
</target>
<target name="test" depends="compile">
<mkdir dir="target/test-classes"/>
<javac srcdir="test" destdir="target/test-classes">
<classpath>
<pathelement location="target/classes"/>
<pathelement location="lib/junit.jar"/>
</classpath>
</javac>
<mkdir dir="target/test-results"/>
<junit haltonfailure="no" printsummary="on">
<classpath >
<pathelement location="target/classes"/>
<pathelement location="lib/junit.jar"/>
<pathelement location="target/test-classes"/>
</classpath>
<formatter type="brief" usefile="false"/>
<formatter type="xml" />
<batchtest todir="target/test-results" >
<fileset dir="target/test-classes" includes="**/*Test.class"/>
</batchtest>
</junit>
</target>
<target name="jar" depends="compile">
<jar jarfile="target/connectfour.jar" basedir="target/classes"/>
</target>
</project>
If you do not know Ant script, you can learn through the following url: http://ant.apache.org/manual/index.html