Blogs

Contact us

Do you have problems with site or you want to give us a feedback? Use our mailing list.
Projects‎ > ‎BIRT Ant Task‎ > ‎

Usage

Task Definition

To enable BIRT Ant Task to be used in Ant build script you have to define it for the project. Following example shows how to define the task and gives it "birtReport" name.
<?xml version="1.0"?>
<project name="birt-report" default="generate.reports">
  <taskdef name="birtReport"
           classname="org.dailydev.ant.birt.task.BirtTask"
           classpath="birt-ant-task.jar" />
  ...

</project>

The classname attribute value is fully qualified name of the task implementation class - you will never have to change it. The classpath attribute value should be absolute or relative path to the birt-ant-task.jar file which you downloaded and included into your build process.

Task Usage

When you have task defined you can simply use it within your targets like demonstrated in following simple example.

  ...

  <target name="generate.reports">
    <birtReport mode="runrender" outputdir="${basedir}/bin/reports" format="html">
      <input>
        <fileset dir="${basedir}/src/reports">
          <include name="**/*.rptdesign" />
        </fileset>
      </input>
      <param name="project.url" value="http://www.dailydev.org/p/birt-ant-task" />
    </birtReport>
  </target>

  ...

For more details about possible task configurations and more examples see Task Reference page.

Issue Tracking: Google Codes
Sources: Checkout, Browse
Mailing Lists: Users