The Maven team have released a set of Ant tasks for performing dependency management within your Ant scripts. This includes:
- Transitive dependencies
- Snapshot handling
- Scope tracking
- Deployment using SCP, SFTP, and file protocols
The tasks are based on the Maven 2.0 artifact handling code, so behave identically. The version included is slightly newer, from the upcoming alpha-2 release.
This gives you access to the more than 8500 artifacts available in the Maven central repository, and the ability to utilise the published artifacts from other Maven 1.0 or Maven 2.0 built applications.
An example use:
<artifact:dependencies pathId="dependency.classpath"> <dependency groupId="org.apache.maven.wagon" artifactId="wagon-provider-test" version="1.0-alpha-2"/> </artifact:dependencies>