diff options
author | Matthew Jason Benson <mbenson@apache.org> | 2006-06-23 22:16:41 +0000 |
---|---|---|
committer | Matthew Jason Benson <mbenson@apache.org> | 2006-06-23 22:16:41 +0000 |
commit | 68f12c8172394462a7dcd18c97492352983b67b5 (patch) | |
tree | eb03175b49a15cc28573fe53c5a232401ec5658e /fetch.xml | |
parent | 03ac32942c6ccf065b9fe140d29b9db850766db1 (diff) | |
download | ant-68f12c8172394462a7dcd18c97492352983b67b5.tar.gz |
Extracted get-m2.xml from fetch.xml; modified so that a single run is
sufficient even when DLing the m2 tasks.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@416828 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'fetch.xml')
-rw-r--r-- | fetch.xml | 61 |
1 files changed, 3 insertions, 58 deletions
@@ -48,6 +48,7 @@ <!-- load in our properties table --> <property file="${lib.dir}/libraries.properties"/> + <import file="get-m2.xml" /> <target name="pick-dest"> <condition property="dest.dir" @@ -75,60 +76,7 @@ </target> - <target name="probe-m2" depends="pick-dest"> - <!-- Look for M2 ant tasks in our classpath--> - <property name="m2.artifact" location="${dest.dir}/${m2.jar.name}"/> - <available property="m2.antlib.found" - resource="org/apache/maven/artifact/ant/antlib.xml" /> - <condition property="m2.antlib.typefound"> - <typefound name="antlib:org.apache.maven.artifact.ant:artifact" /> - </condition> - </target> - - - <target name="download-m2" depends="probe-m2,pick-dest" unless="m2.antlib.found"> - <!-- fetch M2 ant tasks into our repository, if it is not there--> - <get src="${m2.antlib.url}" - dest="${m2.artifact}" - verbose="true" - usetimestamp="false"/> - </target> - - <target name="dont-validate-m2-checksum" depends="probe-m2" - if="m2.antlib.found"> - <property name="checksum.equal" value="true" /> - </target> - - <target name="validate-m2-checksum" - depends="download-m2,dont-validate-m2-checksum" - if="m2.sha1.checksum" unless="m2.antlib.found"> - <checksum file="${m2.artifact}" - algorithm="SHA" - property="${m2.sha1.checksum}" - verifyProperty="checksum.equal"/> - </target> - - <target name="checksum-mismatch" depends="validate-m2-checksum" - unless="checksum.equal" if="m2.sha1.checksum"> - <delete file="${m2.artifact}"/> - <fail > - Failed to verify the downloaded file ${m2.antlib.url}" against the checksum - coded into libraries.properties. - The local copy has been deleted, for security reasons - </fail> - </target> - - <target name="checksum-match" depends="checksum-mismatch" - unless="checksum.equal"> - <fail status="0"> - The Maven2 JAR has been installed; rerun Ant to load it. - </fail> - </target> - - <target name="get-m2" depends="checksum-match" - description="Download the Maven2 Ant tasks"/> - - <target name="macros" depends="get-m2" + <target name="macros" depends="pick-dest,get-m2" xmlns:artifact="antlib:org.apache.maven.artifact.ant"> <macrodef name="f2"> @@ -160,10 +108,7 @@ <!-- any init stuff --> - <target name="init" depends="pick-dest,macros" > - - </target> - + <target name="init" depends="macros" /> <target name="diag" depends="init"> |