You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by hi...@apache.org on 2012/03/15 01:09:55 UTC

svn commit: r1300792 - in /ant/ivy/ivyde/trunk: ./ build.properties build.xml

Author: hibou
Date: Thu Mar 15 00:09:54 2012
New Revision: 1300792

URL: http://svn.apache.org/viewvc?rev=1300792&view=rev
Log:
Make the dependencies retrieved in a dedicated folder and have some checksum done so partial download are retried

Modified:
    ant/ivy/ivyde/trunk/   (props changed)
    ant/ivy/ivyde/trunk/build.properties
    ant/ivy/ivyde/trunk/build.xml

Propchange: ant/ivy/ivyde/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Mar 15 00:09:54 2012
@@ -2,4 +2,4 @@ local.build.properties
 work
 updatesite
 dist
-
+dependencies

Modified: ant/ivy/ivyde/trunk/build.properties
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/build.properties?rev=1300792&r1=1300791&r2=1300792&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/build.properties (original)
+++ ant/ivy/ivyde/trunk/build.properties Thu Mar 15 00:09:54 2012
@@ -31,15 +31,21 @@ hudson.download.mirror.url=http://carrol
 hudson.download.mirror.id=546
 hudson.download.sdk.name=eclipse-SDK-3.7.1-win32
 hudson.download.sdk.dropdir=eclipse/downloads/drops/R-3.7.1-201109091335
+hudson.download.sdk.md5=078df5550176e176abdbac1f444725fe
 hudson.download.wtp.name=wtp-R-3.1.2-20100211202452
 hudson.download.wtp.dropdir=webtools/downloads/drops/R3.1.2/R-3.1.2-20100211202452
+hudson.download.wtp.md5=e2c17a1d8b475bca50ac9e96ce23564d
 hudson.download.emf.name=emf-runtime-2.5.0
 hudson.download.emf.dropdir=modeling/emf/emf/downloads/drops/2.5.0/R200906151043
+hudson.download.emf.md5=f12fe508ca23bb11a99d32e946de024f
 hudson.download.xsd.name=xsd-runtime-2.5.0
 hudson.download.xsd.dropdir=modeling/emf/emf/downloads/drops/2.5.0/R200906151043
+hudson.download.xsd.md5=e156ae7e25500603ddc3166b18bb7fb6
 hudson.download.gef.name=GEF-SDK-3.5.2
 hudson.download.gef.dropdir=tools/gef/downloads/drops/3.5.2/R201002241200
+hudson.download.gef.md5=e3aeb007140d5b37c91e8d3d82a37b7a
 hudson.download.zest.name=GEF-zest-3.6.2
 hudson.download.zest.dropdir=tools/gef/downloads/drops/3.6.2/R201102251600
+hudson.download.zest.md5=b7b6f7f07c876ebebdf987e0b3b758e1
 
 hudson.ivy.version=2.1.0

Modified: ant/ivy/ivyde/trunk/build.xml
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/build.xml?rev=1300792&r1=1300791&r2=1300792&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/build.xml (original)
+++ ant/ivy/ivyde/trunk/build.xml Thu Mar 15 00:09:54 2012
@@ -316,8 +316,8 @@ You have to specify the Ivy to install w
         </fail>
         <mkdir dir="${ivy.work.dir}/distrib" />
         <property name="ivy.zip.url" value="${mirror.url}/ant/ivy/${ivy.version}/apache-ivy-${ivy.version}-bin.zip" />
-        <get src="${ivy.zip.url}" usetimestamp="true" dest="${basedir}/apache-ivy-${ivy.version}-bin.zip" verbose="true" />
-        <unzip overwrite="true" src="${basedir}/apache-ivy-${ivy.version}-bin.zip" dest="${ivy.work.dir}/distrib" />
+        <get src="${ivy.zip.url}" usetimestamp="true" dest="${basedir}/dependencies/apache-ivy-${ivy.version}-bin.zip" verbose="true" />
+        <unzip overwrite="true" src="${basedir}/dependencies/apache-ivy-${ivy.version}-bin.zip" dest="${ivy.work.dir}/distrib" />
         <path id="ivy.jar.path">
             <first count="1">
                 <fileset dir="${ivy.work.dir}" includes="distrib/apache-ivy-*/ivy-*.jar" />
@@ -451,9 +451,7 @@ You have to specify the Ivy to install w
     <target name="hudson-prepare-eclipse" depends="hudson-get-eclipse,hudson-unzip-eclipse" />
 
     <target name="hudson-check-download-sdk">
-        <condition property="hudson.sdk.downloaded">
-            <available file="${hudson.download.sdk.name}.zip" />
-        </condition>
+        <check-eclipse-download name="${hudson.download.sdk.name}" property="hudson.sdk.downloaded" md5="${hudson.download.sdk.md5}" />
     </target>
 
     <target name="hudson-get-sdk" depends="hudson-check-download-sdk" unless="hudson.sdk.downloaded">
@@ -461,9 +459,7 @@ You have to specify the Ivy to install w
     </target>
 
     <target name="hudson-check-download-wtp">
-        <condition property="hudson.wtp.downloaded">
-            <available file="${hudson.download.wtp.name}.zip" />
-        </condition>
+        <check-eclipse-download name="${hudson.download.wtp.name}" property="hudson.wtp.downloaded" md5="${hudson.download.wtp.md5}" />
     </target>
 
     <target name="hudson-get-wtp" depends="hudson-check-download-wtp" unless="hudson.wtp.downloaded">
@@ -471,9 +467,7 @@ You have to specify the Ivy to install w
     </target>
 
     <target name="hudson-check-download-emf">
-        <condition property="hudson.emf.downloaded">
-            <available file="${hudson.download.emf.name}.zip" />
-        </condition>
+        <check-eclipse-download name="${hudson.download.emf.name}" property="hudson.emf.downloaded" md5="${hudson.download.emf.md5}" />
     </target>
 
     <target name="hudson-get-emf" depends="hudson-check-download-emf" unless="hudson.emf.downloaded">
@@ -481,9 +475,7 @@ You have to specify the Ivy to install w
     </target>
 
     <target name="hudson-check-download-xsd">
-        <condition property="hudson.xsd.downloaded">
-            <available file="${hudson.download.xsd.name}.zip" />
-        </condition>
+        <check-eclipse-download name="${hudson.download.xsd.name}" property="hudson.xsd.downloaded" md5="${hudson.download.xsd.md5}" />
     </target>
 
     <target name="hudson-get-xsd" depends="hudson-check-download-xsd" unless="hudson.xsd.downloaded">
@@ -491,9 +483,7 @@ You have to specify the Ivy to install w
     </target>
 
     <target name="hudson-check-download-gef">
-        <condition property="hudson.gef.downloaded">
-            <available file="${hudson.download.gef.name}.zip" />
-        </condition>
+        <check-eclipse-download name="${hudson.download.gef.name}" property="hudson.gef.downloaded" md5="${hudson.download.gef.md5}" />
     </target>
 
     <target name="hudson-get-gef" depends="hudson-check-download-gef" unless="hudson.gef.downloaded">
@@ -501,9 +491,7 @@ You have to specify the Ivy to install w
     </target>
 
     <target name="hudson-check-download-zest">
-        <condition property="hudson.zest.downloaded">
-            <available file="${hudson.download.zest.name}.zip" />
-        </condition>
+        <check-eclipse-download name="${hudson.download.zest.name}" property="hudson.zest.downloaded" md5="${hudson.download.zest.md5}" />
     </target>
 
     <target name="hudson-get-zest" depends="hudson-check-download-zest" unless="hudson.zest.downloaded">
@@ -513,39 +501,56 @@ You have to specify the Ivy to install w
     <target name="hudson-get-eclipse" depends="hudson-get-sdk,hudson-get-wtp,hudson-get-emf,hudson-get-xsd,hudson-get-gef,hudson-get-zest" />
 
     <!-- wrapper of eclipse download urls which have a common pattern -->
+    <macrodef name="check-eclipse-download">
+        <attribute name="property" />
+        <attribute name="name" />
+        <attribute name="md5" />
+        <sequential>
+            <echo file="${basedir}/dependencies/@{name}.zip.md5" message="@{md5}" />
+            <condition property="@{property}">
+                <and>
+                    <available file="${basedir}/dependencies/@{name}.zip" />
+                    <checksum file="${basedir}/dependencies/@{name}.zip" algorithm="MD5" />
+                </and>
+            </condition>
+        </sequential>
+    </macrodef>
     <macrodef name="eclipse-download">
         <attribute name="name" />
         <attribute name="dropdir" />
         <sequential>
-            <get src="${hudson.download.baseurl}?file=/@{dropdir}/@{name}.zip&amp;url=${hudson.download.mirror.url}/@{dropdir}/@{name}.zip&amp;mirror_id=${hudson.download.mirror.id}" dest="@{name}.zip" verbose="yes" />            
+            <mkdir dir="${basedir}/dependencies" />
+            <delete file="${basedir}/dependencies/@{name}.zip" failonerror="false" />
+            <get src="${hudson.download.baseurl}?file=/@{dropdir}/@{name}.zip&amp;url=${hudson.download.mirror.url}/@{dropdir}/@{name}.zip&amp;mirror_id=${hudson.download.mirror.id}" dest="${basedir}/dependencies/@{name}.zip" verbose="yes" />
+            <checksum file="${basedir}/dependencies/@{name}.zip" algorithm="MD5" />
         </sequential>
     </macrodef>
 
     <target name="hudson-check-unzip-eclipse">
         <condition property="hudson.eclipse.unzipped">
-            <available file="${hudson.download.sdk.name}" />
+            <available file="${basedir}/dependencies/${hudson.download.sdk.name}" />
         </condition>
     </target>
 
     <target name="hudson-unzip-eclipse" depends="hudson-check-unzip-eclipse" unless="hudson.eclipse.unzipped">
-        <unzip src="${hudson.download.sdk.name}.zip" dest="${basedir}" />
-        <unzip src="${hudson.download.wtp.name}.zip" dest="${basedir}" />
-        <unzip src="${hudson.download.emf.name}.zip" dest="${basedir}" />
-        <unzip src="${hudson.download.xsd.name}.zip" dest="${basedir}" />
-        <unzip src="${hudson.download.gef.name}.zip" dest="${basedir}" />
-        <unzip src="${hudson.download.zest.name}.zip" dest="${basedir}" />
-        <move file="eclipse" tofile="${hudson.download.sdk.name}" />
+        <unzip src="${basedir}/dependencies/${hudson.download.sdk.name}.zip" dest="${basedir}/dependencies/" />
+        <unzip src="${basedir}/dependencies/${hudson.download.wtp.name}.zip" dest="${basedir}/dependencies/" />
+        <unzip src="${basedir}/dependencies/${hudson.download.emf.name}.zip" dest="${basedir}/dependencies/" />
+        <unzip src="${basedir}/dependencies/${hudson.download.xsd.name}.zip" dest="${basedir}/dependencies/" />
+        <unzip src="${basedir}/dependencies/${hudson.download.gef.name}.zip" dest="${basedir}/dependencies/" />
+        <unzip src="${basedir}/dependencies/${hudson.download.zest.name}.zip" dest="${basedir}/dependencies/" />
+        <move file="${basedir}/dependencies/eclipse" tofile="${basedir}/dependencies/${hudson.download.sdk.name}" />
     </target>
 
     <target name="hudson-prepare-properties">
         <tstamp />
-        <property name="baseLocation" value="${basedir}/${hudson.eclipse.name}" />
+        <property name="baseLocation" value="${basedir}/dependencies/${hudson.eclipse.name}" />
         <condition property="hudson.version.qualifier" value="${DSTAMP}${TSTAMP}-hudson-${env.BUILD_NUMBER}">
             <length string="${version.qualifier}" trim="true" length="0" />
         </condition>
         <property name="hudson.version.qualifier" value="${version.qualifier}-${DSTAMP}${TSTAMP}-hudson-${env.BUILD_NUMBER}" />
         <echo file="local.build.properties">
-baseLocation=${basedir}/${hudson.download.sdk.name}
+baseLocation=${basedir}/dependencies/${hudson.download.sdk.name}
 forceContextQualifier=${hudson.version.qualifier}
 </echo>
     </target>
@@ -553,7 +558,7 @@ forceContextQualifier=${hudson.version.q
     <target name="hudson-install-ivy">
         <ant antfile="build.xml" target="install-ivy">
             <property name="ivy.version" value="${hudson.ivy.version}" />
-            <property name="baseLocation" location="${basedir}/${hudson.download.sdk.name}" />
+            <property name="baseLocation" location="${basedir}/dependencies/${hudson.download.sdk.name}" />
         </ant>
     </target>