Official page for Maven-Ant-Tasks
One can use the get task of Ant to dynamically download the jar and then include it in the build:
verbose="true"
usetimestamp="true" />
A straight copy from above site:
<project ... xmlns:artifact="antlib:org.apache.maven.artifact.ant">
...
<path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks-2.1.3.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="antlib:org.apache.maven.artifact.ant"
classpathref="maven-ant-tasks.classpath" />
...
</project>
Once setup, declaring dependencies is very easy. Look at the usage page to know how to see how to configure repositories, reference your settings.xml from local maven install. But note that to use this task you do not need maven to be installed at all!! It downloads the artifacts to user.home/.m2 folder.
No comments:
Post a Comment