Browse Source

Only DL if the _artifact_ was not found;

taskdef anytime the _antlib_ wasn't found.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@416831 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 19 years ago
parent
commit
3454a2bdc2
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      get-m2.xml

+ 4
- 3
get-m2.xml View File

@@ -58,9 +58,10 @@
<condition property="m2.antlib.typefound">
<typefound name="${m2.antlib.uri}:artifact" />
</condition>
<available property="m2.artifact.found" file="${m2.artifact}" type="file" />
</target>

<target name="download-m2" depends="probe-m2" unless="m2.antlib.found">
<target name="download-m2" depends="probe-m2" unless="m2.artifact.found">
<require property="m2.antlib.url" />
<echo>Downloading to ${m2.dest.dir}</echo>

@@ -73,13 +74,13 @@
</target>

<target name="dont-validate-m2-checksum" depends="probe-m2"
if="m2.antlib.found">
if="m2.artifact.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">
if="m2.sha1.checksum" unless="m2.artifact.found">
<checksum file="${m2.artifact}"
algorithm="SHA"
property="${m2.sha1.checksum}"


Loading…
Cancel
Save