user manual

Chapter 28: Apache Ant and running BES examples 336
Building the example
For more information on the default values of these options, go to Chapter 29,
iastool command-line utility.
Multiple File Arguments
Many commands either act on multiple files or have options which can point to
multiple files. There are several ways to achieve this functionality in the
equivalent Ant task. For example, the iastool -merge command:
iastool -merge -target build\client.jar -type lib client\build\
local_client.jar build\local_stubs.jar
has the Ant equivalent:
<iasmerge target="${build.dir}/client.jar" type="lib" jars="client/build/
local_client.jar ;
build/local_stubs.jar" />
Note The files in the jars attribute must be separated by semi-colons (;) or colons (:)
- spaces and commas are not valid separators.
Ant provides a convenient <fileset> task to include multiple files:
<iasmerge target="build/client.jar" type="lib" >
<fileset dir="client/build" includes="local_client.jar" />
<fileset dir="build" includes="local_stubs.jar" />
</iasmerge>
The patternset feature of Ant can also be useful. The following alteration now
includes all of the jar files contained in the build directory and all of its sub-
directories:
<iasmerge target="${build.dir}/client.jar" type="lib" >
<fileset dir="${build.dir}" includes="**/*.jar" />
</iasmerge>
Class path attributes can include multiple paths separated by semicolons:
<iasverify src="cart_beans_client.jar" role="DEPLOYER"
classpath="alib.jar;blib.jar" />
or use the <classpath> element:
<iasverfify src="cart_beans_client.jar" role="DEPLOYER" >
<classpath>
<pathelement location="alib.jar" />
<pathelement location="blib.jar" />
</classpath>
Building the example
Note Many of the BES examples have their own readme.html files located in:
<install_dir>/examples
1 Open a command line window.