Forewords
You need to have a good understanding of Ant before
reading this tutorial. If you don't, I suggest you read the
Ant User Manual first.
This tutorial explains how to install Ant properly to be able to
run the Sample application provided with the Cactus distribution and
also build the Cactus distribution from the sources.
Ant tasks needed by Cactus
Cactus uses the following optional tasks of Ant:
-
The
junit task: it is used to run
the unit tests of Cactus itself and the Cactus unit tests of the
Sample application. This task is
normally found in the optional.jar Ant jar.
-
The Cactus Sample application uses some Ant custom tasks provided
by Cactus in the
cactus-ant.jar jar file (
found in the lib/ directory where you unpacked the
Cactus distribution).
-
The
checkstyle task: it is used only
to build Cactus from the sources (i.e. not needed for building the
Cactus sample application). The version of
Checkstyle used is 3.0+.
In order to simplify the installation of Ant and the gathering of
the required Ant tasks as described above, we provide a
prepackaged zip containing everything needed. This is available from
the downloads section.
Installing Ant on Windows systems
Follow the steps below to install Ant:
-
Download Jakarta Ant
(
jakarta-ant-<version>-bin.zip ) from
here. We recommend version 1.5.3 or
above. Alternatively you can download the
prepackaged Ant version, as mentioned above.
-
Unzip it in a directory. Let's call this directory
antroot ,
-
Create an environment variable named
ANT_HOME that
points to the antroot directory,
-
Modify the
PATH environment variable to include the
%ANT_HOME%\bin directory (so that you'll be able to type
ant in a DOS shell, in whatever directory and it will
call the %ANT_HOME%\bin\ant.bat script,
-
Download the Ant optional task jar
(
jakarta-ant-<version>-optional.jar ) from
here
and put it in %ANT_HOME%\lib . Note that this step
is needed only if you haven't downloaded the prepackaged zip,
-
If you haven't downloaded the prepackaged Ant zip, you'll need to
download the Stylebook 1.0b3 for Xalan 2 jar, the latest
Xalan, the latest
Xerces, the
latest JUnit and the latest
Checkstyle jars. You'll
also need to ensure that you use a JAXP 1.1 parser. You can download
one (crimson) from
here. Put
all these jars in
%ANT_HOME%\lib .
|