Home > Store

Ant Developer's Handbook

Register your product to gain access to bonus material or receive a coupon.

Ant Developer's Handbook


  • Sorry, this book is no longer in print.
Not for Sale


  • Copyright 2003
  • Dimensions: 7-1/4" x 9-1/4"
  • Pages: 456
  • Edition: 1st
  • Book
  • ISBN-10: 0-672-32426-1
  • ISBN-13: 978-0-672-32426-0

Ant has emerged as the preferred building tool for Java developers, automating tedious compilation, test, and code management. Many Java developers are aware of Ant but there is little documentation to assist in getting started with the Ant tool. Even experienced developers who already use some of the features of the Ant tool, struggle with the more advanced aspects. This book will educate those devlopers in these more advanced topics, and help them get more out of the tool. The Ant Developer's Handbook begins with a rapid introduction to obtaining, installing, and configuring Ant and covers all major feature sets and use practices.

Ant is a cross-platform build and configuration management tool. It is written in Java, and uses XML as its file format, thereby allowing entire development teams to share Ant build files, regardless of the operating system each developer is using. Ant can perform nearly any common configuration management function, including:

  • compiling application source code.
  • running test suites and building archive files.
  • moving/copying files to server machines.
  • interacting with source control systems.



All the examples developed in the book - 1,534 kb -- code.zip

Sample Content

Online Sample Chapters

Ant: Global Concepts

Global Concepts

Table of Contents

(NOTE: Each chapter concludes with a Summary.)

1. Introduction to Ant.

In the Beginning. The First Ant Project. Ant Terminology. Should I Use Ant?

2. Preliminaries.

How to Get Ant. How to Install Ant. A Tour of Ant with a Small Exercise.

3. Global Concepts.

Developing in a Standard Directory Tree. Creating Standard Ant Targets and What They Should Do. Exploring Ant Data Types. Listeners and Loggers. Predefined Properties. The Ant Command Line.

4. Built-In Tasks.

Common Attributes of All Tasks. <ant>. <antcall>. <antstructure>. <apply>/<execon>. <available>. <basename>. <buildnumber>. <Bunzip2>. <BZip2>. <checksum>. <chmod>. <concat>. <condition>. <Copy>. <copydir>. <copyfile>. <cvs>. <cvschangelog>. <cvspass>. <cvstagdiff>. <delete>. <deltree>. <dependset>. <dirname>. <ear>. <echo>. <exec>. <fail>. <filter>. <fixcrlf>. <genkey>. <get>. <gunzip>. <gzip>. <input>. <jar>. <java>. <javac>. <javadoc> and <javadoc2>. <loadFile>. <loadproperties>. <mail>. <manifest>. <mkdir>. <move>. <parallel> and <sequential>. <patch>. <pathconvert>. <property>. <record>. <rename>. <replace>. <rmic>. <sequential>. <signjar>. <sleep>. <sql>. <style>. <tar>. <taskdef>. <touch>. <tstamp>. <typedef>. <Unjar>, <Untar>, <Unwar>, <Unzip>. <uptodate>. <waitfor>. <war>. <xmlproperty>. <xslt>. <zip>.

5. Optional Tasks.

Additional Resources for Ant. ANTLR. <cab>. <depend>. <echoproperties>. <ftp>. <icontract>. <propertyfile>. <javacc>. <jjtree>. <javah>. <jspc>. <junit>. <junitreport>. <replaceregexp>. <setproxy>. <sound>. <splash>. <telnet>. <xmlvalidate>.

6. Extending Ant with Custom Tasks, Data Types, and Listeners.

Matching Class to Source. Life Cycle of a Task. An Informal Contract for a Custom Task. Requirements for ClassToSource. An Implementation for ClassToSource. Adding Nested Elements to a Custom Task. Custom DataTypes. A Custom DataType for ClassToSource. Using a Predefined Data Type. Custom Listeners.

7. Troubleshooting Ant Build Scripts.

Common Debugging Techniques. Syntax Errors. Semantic Errors. Programmatic Errors. Ant Message Levels. Using a Java Debugger. Support Resources and Rules of Engagement. Common Problems and Solutions.

8. Performing End to End Builds on a Nightly Basis.

What Is End to End Building? Targets for EtE Builds.

9. Ant in the Real World.

The Large Sample Application. A Standard Build Environment. Decomposing the Build. Ant Properties. Standard Build Targets. Building the Channel Component. Building the Common Layer. Building the Chat Server. Building the Chat Client. A One-Shot Build of the ChatRoom Application. Some Benefits of Chaining Builds.

10. The Future Direction of Ant.

Ant 2. What Can I Do to Help?

11. Tool Support for Ant.

Ant Farm for jEdit. AntRunner for JBuilder. Sun ONE Studio (AKA Forte for Java). Eclipse. CruiseControl. Control Center. IntelliJ IDEA 2.5.



Submit Errata

More Information

Unlimited one-month access with your purchase
Free Safari Membership