ANT Fundamentals Training

Course #:WA1784

ANT Fundamentals Training

This course is aimed at students looking to learn the ANT build tool. Students will first be taken through the fundamentals of building an ANT script by examining the structure of an ANT file, and seeing how to use properties. Following that, the student will be taken through several common scenarios where ANT is used (e.g. building Java code, deploying/testing, co-ordinating with CVS, etc) and learn what tasks are available in each appropriate case, writing scripts as necessary. Finally, advanced topics such as integrating ANT with Eclipse and even extending ANT will be discussed.

  • ANT Overview
  • Common ANT Usage Scenarios
  • Integrating ANT with Eclipse
  • Extending ANT
What you will learn  

After completing this course, the student should be able to:

  • Understand the structure of an ANT script
  • Know how to create an ANT script to:
    • Build Java Code
    • Deploy Java Code
    • Test Java Code with JUnit
    • Check code into/out of CVS
  • Write Custom ANT tasks

Java Developers/QA members/Administrators interested in how to understand/write ANT scripts.


Students should have a cursory [non-developer] understanding of Java code and XML.

  Two Days.

Outline of ANT Fundamentals Training

1. ANT Overview

  • History of ANT
  • The Build File
  • Running Ant

2. Properties and Types

  • Using Properties from Tasks
  • Property Files
  • Property Typing

3. Building Java Code With ANT

  • The javac task
  • User input and calling other tasks
  • Creating JAR files
  • Build Numbers and Timestamps

4. Deploying With ANT

  • Creating TAR and ZIP files
  • Deploying by Copying/Moving/FTP
  • Automatic Builds

5. JUnit Testing With ANT

  • JUnit overview
  • Running tests
  • Running test batches

6. Using CVS With ANT

  • The cvs task
  • Connecting to and working with a CVS server
  • Version control with ANT
  • Change tracking

7. Running Additional Code

  • Executing Java code from ANT
  • Executing external programs from ANT
  • Batch execution and execution order

8. ANT and JEE

  • WAR files
  • CAB files
  • Using ANT with Tomcat
  • Deploying EJBs

9. ANT and XML

  • Reading properties from XML
  • Creating DTDs for ANT tasks
  • XSLT
  • XDoclet
  • EJB deployment descriptors

10. Optional Tasks

  • Sound Effects
  • Text subsitution
  • Dependencies

11. ANT and Eclipse

  • Running ANT scripts
  • Changing ANT version
  • The ANT view

12. Extending ANT

  • Creating A Custom Task
  • Extending Task
  • Creating Listeners
  • Creating Loggers
  • Creating Filters
  • Creating Selectors
  • Creating Additional Types
We regularly offer classes in these and other cities. Atlanta, Austin, Baltimore, Calgary, Chicago, Cleveland, Dallas, Denver, Detroit, Houston, Jacksonville, Miami, Montreal, New York City, Orlando, Ottawa, Philadelphia, Phoenix, Pittsburgh, Seattle, Toronto, Vancouver, Washington DC.