ant-contrib is evil; write a custom ant task.
ant-contrib is evil because it tries to convert ant from a declarative style to an imperative style. But xml makes a crap programming language.
By contrast a custom ant task allows you to write in a real language (Java), with a real IDE, where you can write unit tests to make sure you have the behavior you want, and then make a clean declaration in your build script about the behavior you want.
This rant only matters if you care about writing maintainable ant scripts. If you don't care about maintainability by all means do whatever works. :)
Jtf