Ant offers some XML features like the xslt task, which transforms XML files into other files. But unfortunately, with Ant you can’t make simple XPath Queries on a specific XML file.
Luckily, there is a nice open source solution called XmlTask, which offers many possibilities to work with XML files.
- Download the latest version of XmlTask from http://xmltask.sf.net

Java
ant, Java, XML
There are some kind of tasks, which Ant won’t do. One of them is the loop. There is no simple way to implement a dynamic for or while loop in Ant. What do i mean with dynamic? Let me make an example. Ant reads out a number of iterations from a property file (we call it the number x) and should perform a loop x-times to call another Ant task. And this can only hardly be done with Ant.
But fortunately, there is Groovy. Groovy is a scripting language, which runs in a Java Virtual Machine. And because of that, it can be easily integrated with Ant.

Java
ant, Groovy, Java
Have you ever used your own custom ant task in the eclipse environment. Well – I have written some ant tasks and they are being used by all developers in our company. But there’s the annoying thing that I always have to add the libs containing my tasks to the classpath. Nothing easier than this you might be thinking. Add it to ants classpath in the eclipse preferences. This works on my machine but what about all other developers? What about updates to the libs?
I guess I found the perfect solution for this problem. Write an eclipse plug-in that adds all libraries to ants classpath using the extension point of the ant plug-in and put the plug-in on an eclipse site so all developers can get it automatically.
That’s easy to say but how? Lets get our hands dirty…

Java
ant, eclipse, eclipse-plugin, Java, task, update-site