Dashboard > CruiseControl.NET > ... > Using CruiseControl.NET with other applications > Using CruiseControl.NET with Ant
Using CruiseControl.NET with Ant Log In View a printable version of the current page.  
CruiseControl.NET documentation for latest CI builds
Added by Mike Roberts , last edited by Mike Roberts on Oct 31, 2005  (view change)

The following sections show you how to setup CruiseControl.NET to build a project using Ant as its build tool. This page was written testing against Ant version 1.6.5 .

Setting up the Build Server

At the present time, CruiseControl.NET does not have an Ant-specific task but using the <exec> task is sufficient. An example is as below:

<exec 
    executable="ant.bat" 
    buildArgs="-logger org.apache.tools.ant.XmlLogger -logfile build_log.xml build" 
/>

This example presumes the following:

  • ant.bat is in your path
  • Your project working directory contains your build.xml ant script, and that is also the directory you would normally run Ant in.

If either of these are not true adapt your call to <exec> as necessary.

If you use the ant.bat file to call Ant, make sure you edit the file to return to correct exit code. A simple way to do this is too add the following line to the end of the ant.bat file:
  • exit %ERRORLEVEL%

Assuming you are using Ant's XML output (as the example above does) you'll also need to merge the xml output. A typical example is as follows:

<publishers>
    <merge>
        <files>
            <file>build_log.xml</file>
        </files>
    </merge>
    <xmllogger />
</publishers>

Setting up the Dashboard

Assuming you are using Ant's XML output you can setup a XSL Report Build Plugin. An example for your dashboard.config is as below:

<xslReportBuildPlugin description="Ant Output" actionName="AntBuildReport" xslFileName="xsl\ant.xsl" />

Powered by a free Atlassian Confluence Open Source Project / Non-profit License granted to ThoughtWorks, Inc.. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators