Using the compiler as Ant task is the recommended way in which to invoke it. Before it can be used in your build script you must define the rsp task for Ant. To do this you should put the following line in your build.xml build script near the beginning:
<taskdef name="rsp" classname="rsp.ANTTask"/>
This tells Ant that the rsp task is associated with the rsp.ANTTask class, which is assumed to be in your CLASSPATH or Ant's lib/ directory. From then on you can use the rsp task in your build script:
Example 2.1. Invoking the Compiler from Apache Ant
<?xml version="1.0"?> <project name="Example" default="php"> <taskdef name="rsp" classname="rsp.ANTTask"/> <target name="php"> <rsp flags="linenos" destdir="php" target="php" dependencies="php/dependencies.rspd"> <fileset dir="." includes="*.rsp"/> </rsp> </target> </project>