Installing Ant

Last update : April 21 2002
Doc for : v1.3

About
  • What is Cactus ?
  • News
  • Changes
  • Features/Status
  • Goals
  • Roadmap/Todo
  • Contributors
  • Contributing
  • Cactus Users
  • Tested on ...
  • License


  • Downloads
  • Downloads


  • Documentation
  • How it works ?
  • Getting Started
  • Mock vs Container
  • Javadocs
  • FAQ


  • Howto Guides
  • Classpath Howto
  • Config Howto
  • Migration Howto
  • TestCase Howto
  • Security Howto
  • Ant Howto
  • HttpUnit Howto
  • Sample Howto
  • EJB Howto
  • IDE Howto
  • JUnitEE Howto


  • Support
  • Bug database
  • Mailing list


  • Misc.
  • Why the name ?
  • Logo Challenge
  • Resources
  • Stats


  • Developers
  • CVS
  • Coding Conventions
  • Build results


  • 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 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).
    • The checkstyle task : it is used only to buidl Cactus from the sources (i.e. not needed for building the Cactus sample application). The version of Checkstyle used is 2.2+.

    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.4.1 or above. Alternatively you can download the prepackaged Ant version, as mentioned 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, 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.

    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-2002 The Apache Software Foundation. All Rights Reserved.