I was wondering if anybody has seen a technique for adding Maven dependencies to Ant. I thought that Ivy was meant to do this but then I realized that it is only an Ant-style tool for dependency management.
It seems to me that if somebody extended Ant to be able to reference Maven dependencies (perhaps only for open source libraries) Ant could piggyback at least one great feature of Maven without having to re-invent the wheel.
Any thoughts?
The Maven application has a set of Ant tasks that can be downloaded and placed in your Ant lib directory. After that, you can declare a classpath in Ant that is defined by the dependencies in your POM. This is an example of what you can declare in your build.xml.
<artifact:dependencies filesetId="deps.fileset" type="jar">
<pom file="mypom.xml"/>
</artifact:dependencies>
More details can be found here and here.
2021 Update:
That said, stop using Ant. It's an archaic build tool that is much better being replaced by Maven, Gradle, or any of their descendants.