Chapter 3. Automation
Ant
Now letâs dive into Ant, which stands for Another Neat Tool. Ant was actually created as a build scripting language for Java development, but because it can be easily extended, it can also be used for other languages. Ant can help you automate your daily development tasks, including but not limited to compiling, testing, packaging, deploying, and documenting. Everything you can do with the command lineâand moreâyou can do with Ant! You can also run Ant directly from the command line, but for the exercises in this book we will be running Ant only from within Eclipse.
Ant is a task-oriented build system, which means it allows you to create tasks and run them in a linear wayâi.e., one after another. But, of course, tasksâor targets, as Ant calls themâcan have dependencies on other tasks.
Before we can start playing around with Ant, we need to make sure we have all the JAR files in place and set up.
Note
JAR files are Java ARchives, a way to distribute source code or libraries. These files hold different files, ranging from source code to images and text files.
I have prepared a zip file with all the JAR files youâll need for this book. You can find it at http://book.funky-monkey.nl/. Just unpack this zip somewhere on your hard drive where you see fit.
Now open up Eclipseâs preferences and click on the Ant options on the left side. Select the checkbox for âAlways run new Ant config...â (Figure 3-1). Checking this option ensures that we donât ...
Get Automating ActionScript Projects with Eclipse and Ant 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.