Ounce/Ant and Apache/Ant integration
The steps outlined in this task topic are necessary to integrate Ounce/Ant into the Apache/Ant build environment.
Procedure
- Copy the ounceant.jar file and, optionally, ant-contrib-1.0b3.jar to
the ant lib directory.
The AppScan® Source installation places ounceant.jar and ant-contrib-1.0b3.jar in <install_dir>\lib (where <install_dir> is the location of your AppScan Source installation).
- Optional: Override the
build.compiler
property.See Creating projects for more information about overriding
build.compiler
.)Override this property using one of the following methods:
- Use a property tag in the build.xml file.
<property name="build.compiler" value="com.ouncelabs.ounceant.OunceCompilerAdapter"/>
- Specify the value for
build.compiler
on the command line when invoking Ant using the-D
option.ant -Dbuild.compiler= com.ouncelabs.ounceant.OunceCompilerAdapter
- Include the value for
build.compiler
in a text file and instruct Ant to load the properties in that file using theproperties
option as described in the Ant documentation.
- Use a property tag in the build.xml file.
- Create
taskdefs
.To use Ounce/Ant tasks, you must reference ounceant.jar in a
taskdef
task. For example,<taskdef resource="com/ouncelabs/ounceant/task/ounce.xml" classpath="ounceant.jar"/>
To use the
var
task, ant-contrib-1.0b3.jar must reference thetaskdef
task as follows:<taskdef resource="net/sf/antcontrib/antlib.xml"/>