This example shows how to define your dependencies in your ant build script.
It also contains an example of doing the same thing in groovy using AntBuilder.