What s Inside

What's Inside

From cover to cover, this book is pure Ant, covering hundreds of topics and techniques. We start from the most basic Java© development up to extending Ant yourself; it's all here. Here are a few of the topics in this book:

  • Getting and installing Ant

  • Creating build files

  • Running a build

  • Handling build failures

  • Specifying build targets

  • Using property files

  • Handling datatypes and properties

  • Handling filesets

  • Using selectors, filtersets, and filter chains

  • Working with mappers

  • Creating conditional targets

  • Packaging applications

  • Moving, copying, and deleting files

  • Building documentation

  • Creating JAR files

  • Deploying applications

  • Using FTP

  • Handling remote deployment

  • Getting and installing JUnit

  • Using JUnit assertions

  • Creating a test case

  • Running a test case

  • Using CVS and Ant

  • Accessing CVS

  • Initializing CVS

  • Running external programs and continuous integration

  • Running code in a new JVM

  • Calling other programs

  • Setting environment variables

  • Scheduling Ant builds automatically

  • Scheduling builds in Unix and Windows

  • Using scripting

  • Using AntHill

  • Creating email notifications

  • Working with XDoclet and XML

  • Creating XML build logs

  • Handling web development

  • Compiling JSP pages

  • Using Ant's EJB tasks

  • Using XDoclet for EJB development

  • Connecting Ant to Eclipse

  • Configuring Ant in Eclipse

  • Writing Ant tasks

  • Handling errors

  • Writing custom filters and selectors

  • Writing custom Ant loggers and listeners

Here's an overview, chapter by chapter:

Chapter 1

This chapter is all about the basics, including all the details on how to create Ant build files and how to run them.

Chapter 2, Using Properties and Types

This chapter is about two central Ant topics: properties and types. Properties let you configure Ant tasks, and types hold data used by tasks.

Chapter 3, Building Java Code

This chapter focuses on the Java build process, from compiling Java code with the javac task through compressing and packaging the results with tasks such as jar.

Chapter 4, Deploying Builds

This chapter covers tasks to package applications for deployments such as tar, gzip, and zip; tasks to prepare directories for deployment such as delete and mkdir; and tasks to deploy applications such as copy and move for local and network deployment, as well as ftp, telent, sshexec, and mail for remote deployment.

Chapter 5, Testing Builds With JUnit

It doesn't make much sense to deploy code that has been broken by a new build. This chapter using the JUnit framework with Ant, during which you can run tests on your code and deploy it if it satisfies those tests.

Chapter 6, Getting Source Code from CVS Repositories

There's a lot of support built in for Concurrent Version System (CVS) in Ant, and this chapter is all about making code sharing in teams with CVS happen.

Chapter 7, Executing External Programs

Part of the build process involves testing what you've built, and an obvious way of doing that is to run the results of a build. Doing so from Ant involves using the major tasks in this chapter: java, exec, and apply.

Chapter 8, Developing for the Web

This chapter covers the tasks specifically designed for packaging web applications, such as war, cab, ear, and jspc, and for deploying them, such as get, serverdeploy, and scp. I'll also cover the custom Ant tasks targeted to specific servers such as deploy, reload, and undeploy.

Chapter 9, XML and XDoclet

You can validate XML documents using XML DTDs and schema using the xmlvalidate task. You can read properties from an XML document using xmlproperty. You can use the xslt/style task to transform XML documents using XSLT. In this chapter, I discuss XDoclet, an open source code generation engine designed to run in Ant. XDoclet can generate code, deployment descriptors such as web.xml, and other artifacts for web and EJB applications.

Chapter 10, Optional Tasks

Ant comes with a number of optional tasks, and this chapter covers the highlights, including tasks that create sounds to indicate where you are in a build, tasks that display splash screens, tasks that work with regular expressions to match text, and more.

Chapter 11, Integrating Ant with Eclipse

Eclipse is the premiere integrated development environment (IDE) for Java programmers. Eclipse is great at visual development, whereas Ant is great for builds. Eclipse comes with Ant built in, and there's an extensive Ant interface in Eclipse. The Ant/Eclipse connection is extremely useful to Java developers, and it's covered in this chapter.

Chapter 12, Extending Ant

This chapter covers how to create new Ant tasks, handle task attributes, access property values, work with nested text and elements, make builds fail, work with filesets, use custom tasks as wrappers for external programs, and more.

    Ant. The Definitive Guide
    Ant: The Definitive Guide, 2nd Edition
    ISBN: 0596006098
    EAN: 2147483647
    Year: 2003
    Pages: 115
    Authors: Steve Holzner

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net