harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r450435 - /incubator/harmony/enhanced/classlib/trunk/make/depends.xml
Date Wed, 27 Sep 2006 13:22:07 GMT
Author: hindessm
Date: Wed Sep 27 06:22:06 2006
New Revision: 450435

URL: http://svn.apache.org/viewvc?view=rev&rev=450435
Log:
Workaround issue with jars (such as yoko.jar from issues.apache.org)
being downloaded every time from servers that don't support
If-Modified-Since HTTP headers.

Since we are downloading to path/file names with versions in then
downloading more than once never makes sense.  This change means we
now only download if the file doesn't exist locally.

Modified:
    incubator/harmony/enhanced/classlib/trunk/make/depends.xml

Modified: incubator/harmony/enhanced/classlib/trunk/make/depends.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/make/depends.xml?view=diff&rev=450435&r1=450434&r2=450435
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/depends.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/depends.xml Wed Sep 27 06:22:06 2006
@@ -144,9 +144,13 @@
         <attribute name="dest" />
         <attribute name="md5" />
         <sequential>
-            <echo>Fetching @{dest}</echo>
-	    <get src="@{src}" dest="@{dest}" usetimestamp="true"
-                 verbose="true" />
+            <echo>Checking @{dest}</echo>
+	    <available file="@{dest}" type="file"
+                       property="@{dest}.exists" />
+            <antcall target="-really-download">
+                <param name="src" value="@{src}" />
+                <param name="dest" value="@{dest}" />
+            </antcall>
             <checksum file="@{dest}" property="new.md5" />
             <condition property="md5.verified" value="true">
                 <equals arg1="${new.md5}" arg2="@{md5}" />
@@ -166,6 +170,11 @@
             <echo>Checksum verified (${md5.verified})</echo>
         </sequential>
     </macrodef>
+
+    <target name="-really-download" unless="${dest}.exists">
+        <echo>Fetching ${dest}</echo>
+	<get src="${src}" dest="${dest}" usetimestamp="true" verbose="true" />
+    </target>
 
     <target name="-remove-file-if-bad" unless="md5.verified">
         <delete file="${dest}" />



Mime
View raw message