Installing Ant

Last update : September 25 2001

About
  • What is Cactus ?
  • Features/Status
  • Goals
  • News/Changes
  • Roadmap/Todo
  • Contributors
  • Contributing
  • License
  • Feedback


  • Downloads
  • Downloads


  • Documentation
  • How it works ?
  • Getting Started
  • Mock vs Container
  • API Reference


  • Howto Guides
  • Config Howto
  • TestCase Howto
  • Ant Howto
  • HttpUnit Howto
  • Sample Howto
  • EJB Howto
  • IDE Howto


  • Support
  • Bug database
  • Mailing list
  • FAQ


  • Misc.
  • Why the name ?
  • Resources


  • Developers
  • CVS
  • Coding Conventions


  • Forewords

    Note 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 stylebook task : it is used to build the Cactus web site and Cactus documentation. The Stylebook version required by the Cactus build is the Stylebook 1.0b3 for Xalan2 (named stylebook-1.0-b3_xalan-2.jar) which needs the Xalan 2.0 jar and the Xerces 1.3 jar. The stylebook task is not used by the Cactus Sample application build process, so it is only needed if you're building from the Cactus sources. This task is normally found in the optional.jar Ant jar.
    • 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).

    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 :

    1. Download Jakarta Ant (jakarta-ant-<version>-bin.zip) from here. I recommend version 1.3 or above. Alternatively you can download the prepackaged Ant version, as mentionned above.
    2. Unzip it in a directory. Let's call this directory antroot,
    3. Create an environment variable named ANT_HOME that points to the antroot directory,
    4. 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,
    5. 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,
    6. 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 and the latest JUnit jars. You'll also need to ensure that you use a JAXP 1.1 parser (Ant 1.3 comes with a JAXP 1.0 parser only, called parser.jar. Ant 1.4 already bundles a JAXP 1.1 parser, called crimson.jar). You can download one (crimson) from here. Put all these jars in %ANT_HOME%\lib.

    Note You should ensure that the Ant optional jar that you download contains the <stylebook> and <junit> tasks. Alternatively you can download the prepackaged Ant zip as mentionned above.




    Copyright © 2000-2001 The Apache Software Foundation. All Rights Reserved.