Chapter 18. Extending Ant further
This chapter covers:
We’ve just been extending Ant with custom tasks in Java. Is that all that can be done to adapt it to a project? No, not at all! Some of the other ways that Ant can be extended are by
- Writing tasks using scripting languages with the <script> and <scriptdef> tasks
- Writing new conditions for use in <condition>, <fail>, and other tasks
- Writing custom resources, filters, selectors, and mappers
- Monitoring the build process with custom build listeners and loggers
- Embedding Ant inside your own program
We’re going to go through all these extension mechanisms in turn to see what they are and how to write, test, and use them.
In the previous chapter, we looked at writing an Ant task and the Ant API. Although we are extending Ant in different ways in this chapter, everything covered in the previous chapter about Ant’s Java API and how to test tasks is still essential. If you haven’t already done so, read chapter 17.