<?xml version="1.0"?>
<project name="maven-ant" basedir="." xmlns:artifact="urn:maven-artifact-ant">
  <property name="maven-ant.vers" value="2.1.1"/>
  <property name="maven-ant.dir" value="${user.home}/.m2/ant-support"/>
  <property name="maven-ant.jar" value="${maven-ant.dir}/maven-ant-tasks-${maven-ant.vers}.jar"/>
  <property name="maven-ant.url"
            value="http://mirrors.ibiblio.org/pub/mirrors/apache/maven/binaries"/>
  <condition property="maven-ant.exists"><available file="${maven-ant.jar}"/></condition>

  <target name="-download-maven-ant" unless="maven-ant.exists">
    <mkdir dir="${maven-ant.dir}"/>
    <get src="${maven-ant.url}/maven-ant-tasks-${maven-ant.vers}.jar"
         dest="${maven-ant.jar}" usetimestamp="true"/>
  </target>

  <target name="-init-maven-ant" depends="-download-maven-ant">
    <taskdef resource="org/apache/maven/artifact/ant/antlib.xml"
             uri="urn:maven-artifact-ant" classpath="${maven-ant.jar}"/>
  </target>
</project>

<?xml version="1.0"?>
<project name="maven-ant" basedir="." xmlns:artifact="urn:maven-artifact-ant">
  <property name="maven-ant.vers" value="2.1.3"/>
  <property name="maven-ant.dir" value="${user.home}/.m2/ant-support"/>
  <property name="maven-ant.jar" value="${maven-ant.dir}/maven-ant-tasks-${maven-ant.vers}.jar"/>
  <property name="maven-ant.url"
      value="http://mirrors.ibiblio.org/apache/maven/ant-tasks/${maven-ant.vers}/binaries/"/>
  <condition property="maven-ant.exists"><available file="${maven-ant.jar}"/></condition>

  <target name="-download-maven-ant" unless="maven-ant.exists">
    <mkdir dir="${maven-ant.dir}"/>
    <get src="${maven-ant.url}/maven-ant-tasks-${maven-ant.vers}.jar"
         dest="${maven-ant.jar}" usetimestamp="true"/>
  </target>

  <target name="-init-maven-ant" depends="-download-maven-ant">
    <taskdef resource="org/apache/maven/artifact/ant/antlib.xml"
             uri="urn:maven-artifact-ant" classpath="${maven-ant.jar}"/>
  </target>
</project>

Update the location and version of the maven ant task
Update the location and version of the maven ant task
