Chapter 1. Introducing Ant
Listing 1.1. A typical scenario: compile, document, package, and deploy
Chapter 2. A first Ant build
Listing 2.1. Our first complete build file, including packaging and executing a Java program
Chapter 4. Testing with JUnit
Chapter 5. Packaging projects
Listing 5.1. Example target to generate Unix and Windows Readme files from the same original
Chapter 6. Executing programs
Chapter 7. Distributing our application
Listing 7.1. Uploading files to a Unix system
Listing 7.2. The offline probe from Ant’s own build file
Listing 7.3. Using <antcall> to manage a series of distribution actions
Chapter 8. Putting it all together
Listing 8.1. The entry-point targets for the build file
Listing 8.2. Setting Ant properties to the locations and values of the build file
Listing 8.4. Compiling the source and creating a JAR file
Listing 8.5. Running the unit tests and creating the reports
Listing 8.6. Preparing the documentation and scripts
Listing 8.7. Signing the JAR files
Listing 8.8. Creating the Zip files
Listing 8.9. The target to email the Zip file with a covering note
Listing 8.10. Targets to upload the files to a remote server
Chapter 9. Beyond Ant’s core tasks
Listing 9.1. Using <propertyfile> to capture build-time information
Listing 9.2. Using <propertyfile> to increment a build number and set a future date in the same file
Listing 9.3. Checkstyle.xml: checking our coding style standards
Chapter 10. Working with big projects
Listing 10.1. An initial set of entry-point targets
Chapter 11. Managing dependencies
Listing 11.1. The ivy.xml file for the diary-core module
Listing 11.2. The diary’s Ivy configuration file, diary/ivyconf.xml
Chapter 12. Developing for the Web
Listing 12.1. A servlet to publish events as an Atom feed
Listing 12.2. A JSP page, happy.jsp
Chapter 13. Working with XML
Listing 13.2. A modified XSD file to declare the schema for a single namespace
Listing 13.3. A <presetdef> to validate documents against the SOAP1.2 specifications
Listing 13.4. The DTD for our constants, in xml/format.dtd
Listing 13.6. The style sheet, toJava.xsl, which generates Java from the XML constants
Listing 13.7. The toHtml.xsl style sheet. It’s a lot easier to generate HTML than Java.
Chapter 14. Enterprise Java
Listing 14.1. The interface for the calendar session bean
Listing 14.2. An application.xml file targeting JBoss
Listing 14.3. A Cactus test case to run on the server
Listing 14.4. Targets to deploy the EAR file and run the Cactus test suite
Chapter 16. Deployment
Listing 16.1. A SmartFrog file to fetch and deploy the MySQL JDBC driver
Listing 16.2. How to compose a system from components
Listing 16.3. The SmartFrog deployment descriptor to deploy everything
Chapter 17. Writing Ant tasks
Listing 17.1. A task to set a property to the size of a file
Listing 17.2. The build file for the <filesize> task
Listing 17.3. Java enumerations can be used as task attributes.
Chapter 18. Extending Ant further
Listing 18.1. An inline BeanShell script
Listing 18.2. A task written in Jython, using <scriptdef>
Listing 18.3. A condition to test for a number being even
Listing 18.4. A custom resource to generate strongly random data
Listing 18.5. A mapper that converts filenames to uppercase
Listing 18.6. A custom filter to convert read text to uppercase