Book Reviews
This book review was submitted by a DenverJUG member as part of the Book Review Program.BOOK DETAILS
Java Development with Ant
Authors: Erik Hatcher, Steve Loughran Publisher: Manning Publications Co.
Publish Date: August 2002
Pages: 672
ISBN: 1930110588
Publisher's Book Description
Review Date: September, 2003
REVIEWER
Tom MarrsREVIEW
Java Development with Ant shows how to automate most of the drudgery involved with large Java projects. The authors included a lot of great examples and practical advice covering the essentials of Ant, building, testing, and running code. This should be required reading for all Java developers.Despite its size, the book is not full of endless code listings or mundane command references, which are available for Ant elsewhere anyway. They do include a brief (60 page) appendix (E) which is useful when you are reading away from your computer.
The first two chapters are great for a new Ant user. I had used other people's build files before reading this book, but had never created my own before. The first chapter told me want Ant is and the second helped me create my first build file.
Chapter 3 explains the nuts and bolts of Ant datatypes (fileset and path) and properties, which are crucial to creating manageable build files.
The next four chapters teach you how to integrate jUnit, run programs using Ant, package a JAR (or WAR, or EAR), and deploy it. Chapter 8 recaps everything from the first section with a reasonable sample project.
Part 2 is titled Applying Ant and includes many interesting chapters. Each chapter is like an article about a particular application of Ant such as XDoclet, XML, EJBs, Web Services, etc. These are great reads and work independently of one another, so you can skip around to what you are interested in. Chapter 9 was especially helpful to me because it how to set up a full-blown directory structure, Ant master build file and sub-project build files for an entire project. I successfully use this approach on my own projects.
Part 3 talks about Extending Ant by writing tasks, mappers, and filters. Here again, they avoid printing out the API by focusing on practical examples.
The appendices have good info as well. The installation section is nice and the XML primer might be helpful for a newbie. Appendix C gives a tour of a number of IDEs and their Ant integration.
Appendix D is a real gem. "The Elements of Ant Style" is a brief set of guidelines for the buildfile author. Not only does it provide recommendations, they even followed my favorite maxim from Strunk and White, "Omit needless words." The whole appendix is only 16 pages.
