Chapter 11. Integrating Ant with Eclipse

Ant is the premiere build tool for Java developers, and Eclipse is the premiere integrated development environment (IDE) for Java programmers. Eclipse is great at visual development, and Ant is great for builds. For that reason, the latest Eclipse version (3.0) comes with Ant 1.6.1 (the version of Ant this book was written with), and there's an extensive Ant interface in Eclipse.

Tip

Doesn't Ant have its own IDE? Well, sort of. Antidote, started in 2000, was supposed to have been the Ant IDE; see http://ant.apache.org/projects/antidote/index.html. Unfortunately, that project appears to be more or less moribund, largely because the big guys behind Eclipse have been integrating Ant into their IDE now.

Introducing Eclipse

If you're a Java developer, you know how finicky Java can feel at times. Missed import statements, forgotten variable declarations, omitted semi-colons, garbled syntax, and typos will cause the Java command-line compiler, javac, to cough and display pages of error messages.

The error messages tell you that javac knows what the error is, so why doesn't it just fix the problem and let you continue developing? javac can't fix the problem; to do that, you can use an IDE, which will catch errors before you compile and suggest solutions. Java is badly in need of a good IDE, and the premiere Java IDE these days is Eclipse. You can see what it looks like in Figure 11-1.

Figure 11-1. Eclipse

Eclipse is free for the downloading, like ...

Get Ant: The Definitive Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.