Chapter 0. Introduction to the Second Edition

Welcome to Ant in Action

We took a rest after the first edition of this book, Java Development with Ant. Erik went on to work on Lucene in Action, (Manning Publications Co., 2005) exploring the index/search tool in wonderful detail. Steve returned to HP Laboratories, in the UK, getting into the problem of grid-scale deployment.

In the meantime, Ant 1.6 shipped, not breaking anything in the first edition, but looking slightly clunky. There were easier ways to do some of the things we described, especially in the area of big projects. We finally sat down and began an update while Ant 1.7 was under development.

Starting the update brought it home to us how much had changed while we weren’t paying attention. Nearly every popular task has had some tweak to it, from a bit of minor tuning to something more fundamental. Along with Ant’s evolution, many of the technologies that we covered evolved while we weren’t looking—even the Java language itself has changed.

We had to carefully choose which technologies to cover with this book. We’ve put the effort into coverage of state-of-the-art build techniques, including library management, continuous integration, and automated deployment.

We also changed the name to Ant in Action. Without the wonderful response to the first edition, we would never have written it. And we can say that without the wonderful tools at our disposal—Ant, JUnit, IntelliJ IDEA, jEdit, and Eclipse—we wouldn’t have been able to write it so well. We owe something to everyone who has worked on those projects. If you’re one of those people, remind us of this fact if you ever happen to meet us, and we shall honor our debt in some way.

The Application: A Diary

We’re going to write a diary application. It will store appointments and allow all events on a given day/range to be retrieved. It will not be very useful, but we can use it to explore many features of a real application and the build process to go with it: persistence, server-side operation, RSS feeds, and whatever else we see fit. We’re writing this Extreme Programming-style, adding features on demand and writing the tests as we do so. We’re also going to code in an order that matches the book’s chapters. That’s the nice thing about XP: you can put off features until you need them, or, more importantly, until you know exactly what you need.

All the examples in the book are hosted on SourceForge in the project antbook and are available for download from http://antbook.org/. Everything is Apache licensed; do with it what you want.

What’s changed since the first edition? The first edition of this book, Java Development with Ant, was written against the version of Ant then in development, Ant 1.5. This version, Ant in Action, was written against Ant 1.7. If you have an older version, upgrade now, as the build files in this book are valid only in Ant 1.7 or later.

To show experienced Ant users when features of Ant 1.6 and 1.7 are being introduced, we mark the appropriate paragraph. Here’s an example:

The spawn attribute of the <java> task lets you start a process that will outlive the Ant run, letting you use Ant as a launcher of applications.

If you’ve been using Ant already, all your existing build files should still work. Ant is developed by a rigorous process and a wide beta test program. That’s one of the virtues of a software build tool as an open source project: it’s well engineered by its end users, and it’s tested in the field long before a product ships. Testing is something that Ant holds dear.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset