flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cza...@apache.org
Subject [31/41] git commit: removed jar and added download.xml to download dependencies (jar) during build process
Date Wed, 22 May 2013 13:50:51 GMT
removed jar and added download.xml to download dependencies (jar) during build process


Project: http://git-wip-us.apache.org/repos/asf/flex-flexunit/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-flexunit/commit/d4b628a5
Tree: http://git-wip-us.apache.org/repos/asf/flex-flexunit/tree/d4b628a5
Diff: http://git-wip-us.apache.org/repos/asf/flex-flexunit/diff/d4b628a5

Branch: refs/heads/makeFlexUnitApacheReady
Commit: d4b628a5cc76dbd783fe00a7a691d09164f97db2
Parents: 3b173d7
Author: cyrill.zadra <cyrill.zadra@gmail.com>
Authored: Sat May 18 21:35:56 2013 +0800
Committer: cyrill.zadra <cyrill.zadra@gmail.com>
Committed: Sat May 18 21:35:56 2013 +0800

----------------------------------------------------------------------
 FlexUnit4AntTasks/build.xml                  |    6 +-
 FlexUnit4AntTasks/downloads.xml              |  262 +++++++++++++++++++++
 FlexUnit4AntTasks/lib/ant-1.7.1.jar          |  Bin 1323005 -> 0 bytes
 FlexUnit4AntTasks/lib/ant-launcher-1.7.1.jar |  Bin 12143 -> 0 bytes
 FlexUnit4AntTasks/lib/ant-testutil-1.7.1.jar |  Bin 14941 -> 0 bytes
 FlexUnit4AntTasks/lib/dom4j-1.6.1.jar        |  Bin 313898 -> 0 bytes
 FlexUnit4AntTasks/lib/jaxen-1.1-beta-6.jar   |  Bin 244330 -> 0 bytes
 FlexUnit4AntTasks/lib/junit-3.8.1.jar        |  Bin 121070 -> 0 bytes
 8 files changed, 267 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/d4b628a5/FlexUnit4AntTasks/build.xml
----------------------------------------------------------------------
diff --git a/FlexUnit4AntTasks/build.xml b/FlexUnit4AntTasks/build.xml
index d41cf5d..7bb004e 100644
--- a/FlexUnit4AntTasks/build.xml
+++ b/FlexUnit4AntTasks/build.xml
@@ -38,6 +38,10 @@
    <target name="clean">
       <delete dir="${dist.loc}" />
    </target>
+   
+    <target name="prebuild">
+		<ant antfile="${basedir}/downloads.xml" dir="${basedir}" />
+    </target>
 
    <target name="init">
       <mkdir dir="${dist.loc}" />
@@ -46,7 +50,7 @@
       <mkdir dir="${doc.loc}" />
    </target>
 
-   <target name="compile" depends="init">
+   <target name="compile" depends="init, prebuild">
       <javac target="1.5" source="1.5" fork="true" memoryMaximumSize="256m" srcdir="${src.loc}"
failonerror="yes" verbose="false" nowarn="true" destdir="${bin.loc}">
          <classpath>
             <fileset dir="${lib.loc}">

http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/d4b628a5/FlexUnit4AntTasks/downloads.xml
----------------------------------------------------------------------
diff --git a/FlexUnit4AntTasks/downloads.xml b/FlexUnit4AntTasks/downloads.xml
new file mode 100644
index 0000000..1f6e26f
--- /dev/null
+++ b/FlexUnit4AntTasks/downloads.xml
@@ -0,0 +1,262 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+<project name="downloads" default="main" basedir=".">
+	
+    <pathconvert property="compiler.tests" dirsep="/">
+        <path location="${basedir}"/>
+    </pathconvert>
+
+    <property name="lib.dir" value="${compiler.tests}/lib"/>
+    
+	<property name="download.dir" value="${compiler.tests}/in"/>
+    
+	<!-- 
+	   Notes:
+	       For Apache, the JARS must be removed from the repository.
+	       
+	       Licenses:
+            JUnit (3.8.1) - CPL 1.0  
+			Ant (1.7.1) -  ?
+			Ant launcher (1.7.1) -  ?
+			Ant testutil (1.7.1) -  ?
+			dom4j (1.6.1) -  ?
+			jaxen (1.1) -  ?
+	-->
+		     
+    <!-- 
+        Because the downloads requires a network connection and the JARs don't change very
often, 
+        they are each downloaded only if they don't already exist. 
+    -->
+    
+	<target name="main" depends="prepare, junit-jar, ant-jar, ant-launcher-jar, ant-testutil-jar,
dom4j-jar, jaxen-jar"
+		    description="Downloads all the required thirdparty JARs"/>
+
+    <target name="prepare" >
+        <mkdir dir="${lib.dir}" />
+    </target>
+    
+    <!--
+		Cleanup
+	-->
+	
+    <target name="clean" 
+            description="Removes thirdparty downloads.">
+        <delete includeEmptyDirs="true" failonerror="false">
+            <fileset dir="${download.dir}">
+                <include name="junit*/**"/>
+				<include name="ant*/**"/>
+				<include name="dom4j*/**"/>
+				<include name="jaxen*/**"/>
+            </fileset>
+        </delete>
+    </target>
+    
+    <!--
+	    Download thirdparty JARs    
+	-->
+
+    <!--
+        Download a jar file and optionally verify the checksum.
+        If the checksum fails, this script fails.
+        
+        Params are:
+            srcUrl
+            srcJarFile
+            destJarFile
+            [md5]
+    -->
+    <target name="download-jar" 
+            description="Downloads jar, and optionally verifies checksum.">          
         
+        <get src="${srcUrl}/${srcJarFile}" dest="${destJarFile}"/>
+        <checksum file="${destJarFile}" algorithm="MD5" property="${we.failed}"/>
+        <antcall target="fail-with-message">
+            <param name="message" value="Checksum mismatch for ${destJarFile}"/>
+        </antcall>
+    </target>
+
+    <target name="fail-with-message" if="we.failed" 
+            description="Conditionally fails with the specified message">            
   
+        <fail message="${message}"/>
+    </target>
+        
+    <!--
+        junit
+    -->
+    
+    <target name="junit-jar-check" description="Checks if JUnit JAR exists.">
+    	<condition property="junit.jar.exists">
+    	    <and>
+    	        <available file="${lib.dir}/junit-3.8.1.jar"/>
+    	    </and>
+        </condition>
+    </target>
+    
+    <target name="junit-jar" depends="junit-jar-check" unless="junit.jar.exists"
+            description="Copies the JUnit JAR to the lib directory.">
+        <echo message="Obtaining lib/junit-3.8.1.jar"/>
+        <antcall target="junit-download-jar"/>
+    </target>
+    
+    <target name="junit-download-jar" depends="junit-jar-check" unless="junit.jar.exists"
+            description="Downloads the JUnit jar.">
+        <antcall target="download-jar">
+            <param name="srcUrl" value="http://search.maven.org/remotecontent?filepath=junit/junit/3.8.1"/>
+            <param name="srcJarFile" value="junit-3.8.1.jar"/>
+            <param name="destJarFile" value="${lib.dir}/junit-3.8.1.jar"/>
+        </antcall>
+    </target>
+	
+	<!--
+        ant
+    -->
+    
+    <target name="ant-jar-check" description="Checks if Ant JAR exists.">
+    	<condition property="ant.jar.exists">
+    	    <and>
+    	        <available file="${lib.dir}/ant-1.7.1.jar"/>
+    	    </and>
+        </condition>
+    </target>
+    
+    <target name="ant-jar" depends="ant-jar-check" unless="ant.jar.exists"
+            description="Copies the Ant JAR to the lib directory.">
+        <echo message="Obtaining lib/ant-1.7.1.jar"/>
+        <antcall target="ant-download-jar"/>
+    </target>
+    
+    <target name="ant-download-jar" depends="ant-jar-check" unless="ant.jar.exists"
+            description="Downloads the ant jar.">
+        <antcall target="download-jar">
+            <param name="srcUrl" value="http://search.maven.org/remotecontent?filepath=org/apache/ant/ant/1.7.1"/>
+            <param name="srcJarFile" value="ant-1.7.1.jar"/>
+            <param name="destJarFile" value="${lib.dir}/ant-1.7.1.jar"/>
+        </antcall>
+    </target>
+	
+	<!--
+        ant launcher
+    --> 	
+	
+	 <target name="ant-launcher-jar-check" description="Checks if Ant launcher JAR exists.">
+    	<condition property="ant.launcher.jar.exists">
+    	    <and>
+    	        <available file="${lib.dir}/ant-launcher-1.7.1.jar"/>
+    	    </and>
+        </condition>
+    </target>
+    
+    <target name="ant-launcher-jar" depends="ant-launcher-jar-check" unless="ant.launcher.jar.exists"
+            description="Copies the Ant launcher JAR to the lib directory.">
+        <echo message="Obtaining lib/ant-launcher-1.7.1.jar"/>
+        <antcall target="ant-launcher-download-jar"/>
+    </target>
+    
+    <target name="ant-launcher-download-jar" depends="ant-launcher-jar-check" unless="ant.launcher.jar.exists"
+            description="Downloads the ant launcher jar.">
+        <antcall target="download-jar">
+            <param name="srcUrl" value="http://search.maven.org/remotecontent?filepath=org/apache/ant/ant-launcher/1.7.1"/>
+            <param name="srcJarFile" value="ant-launcher-1.7.1.jar"/>
+            <param name="destJarFile" value="${lib.dir}/ant-launcher-1.7.1.jar"/>
+        </antcall>
+    </target>
+    
+	<!--
+		ant testutil
+    -->
+	
+	<target name="ant-testutil-jar-check" description="Checks if Ant testutil JAR exists.">
+    	<condition property="ant.testutil.jar.exists">
+    	    <and>
+    	        <available file="${lib.dir}/ant-testutil-1.7.1.jar"/>
+    	    </and>
+        </condition>
+    </target>
+    
+    <target name="ant-testutil-jar" depends="ant-testutil-jar-check" unless="ant.testutil.jar.exists"
+            description="Copies the Ant testutil JAR to the lib directory.">
+        <echo message="Obtaining lib/ant-testutil-1.7.1.jar"/>
+        <antcall target="ant-testutil-download-jar"/>
+    </target>
+    
+    <target name="ant-testutil-download-jar" depends="ant-testutil-jar-check" unless="ant.testutil.jar.exists"
+            description="Downloads the ant testutil jar.">
+        <antcall target="download-jar">
+            <param name="srcUrl" value="http://search.maven.org/remotecontent?filepath=org/apache/ant/ant-testutil/1.7.1"/>
+            <param name="srcJarFile" value="ant-testutil-1.7.1.jar"/>
+            <param name="destJarFile" value="${lib.dir}/ant-testutil-1.7.1.jar"/>
+        </antcall>
+    </target>
+	
+	<!--
+		dom4j
+    -->
+
+	<target name="dom4j-jar-check" description="Checks if dom4j JAR exists.">
+    	<condition property="dom4j.jar.exists">
+    	    <and>
+    	        <available file="${lib.dir}/dom4j-1.6.1.jar"/>
+    	    </and>
+        </condition>
+    </target>
+    
+    <target name="dom4j-jar" depends="dom4j-jar-check" unless="dom4j.jar.exists"
+            description="Copies the dom4j JAR to the lib directory.">
+        <echo message="Obtaining lib/dom4j-1.6.1.jar"/>
+        <antcall target="dom4j-download-jar"/>
+    </target>
+    
+    <target name="dom4j-download-jar" depends="dom4j-jar-check" unless="dom4j.jar.exists"
+            description="Downloads the dom4j jar.">
+        <antcall target="download-jar">
+            <param name="srcUrl" value="http://search.maven.org/remotecontent?filepath=dom4j/dom4j/1.6.1"/>
+            <param name="srcJarFile" value="dom4j-1.6.1.jar"/>
+            <param name="destJarFile" value="${lib.dir}/dom4j-1.6.1.jar"/>
+        </antcall>
+    </target>
+
+	<!--
+		jaxen-1.1-beta-6
+    -->
+	
+	<target name="jaxen-jar-check" description="Checks if jaxen JAR exists.">
+    	<condition property="jaxen.jar.exists">
+    	    <and>
+    	        <available file="${lib.dir}/jaxen-1.1-beta-6.jar"/>
+    	    </and>
+        </condition>
+    </target>
+    
+    <target name="jaxen-jar" depends="jaxen-jar-check" unless="jaxen.jar.exists"
+            description="Copies the jaxen JAR to the lib directory.">
+        <echo message="Obtaining lib/jaxen-1.1-beta-6.jar"/>
+        <antcall target="jaxen-download-jar"/>
+    </target>
+    
+    <target name="jaxen-download-jar" depends="jaxen-jar-check" unless="jaxen.jar.exists"
+            description="Downloads the jaxen jar.">
+        <antcall target="download-jar">
+            <param name="srcUrl" value="http://search.maven.org/remotecontent?filepath=jaxen/jaxen/1.1-beta-6"/>
+            <param name="srcJarFile" value="jaxen-1.1-beta-6.jar"/>
+            <param name="destJarFile" value="${lib.dir}/jaxen-1.1-beta-6.jar"/>
+        </antcall>
+    </target>
+	
+</project>

http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/d4b628a5/FlexUnit4AntTasks/lib/ant-1.7.1.jar
----------------------------------------------------------------------
diff --git a/FlexUnit4AntTasks/lib/ant-1.7.1.jar b/FlexUnit4AntTasks/lib/ant-1.7.1.jar
deleted file mode 100644
index 7047177..0000000
Binary files a/FlexUnit4AntTasks/lib/ant-1.7.1.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/d4b628a5/FlexUnit4AntTasks/lib/ant-launcher-1.7.1.jar
----------------------------------------------------------------------
diff --git a/FlexUnit4AntTasks/lib/ant-launcher-1.7.1.jar b/FlexUnit4AntTasks/lib/ant-launcher-1.7.1.jar
deleted file mode 100644
index 7c8f849..0000000
Binary files a/FlexUnit4AntTasks/lib/ant-launcher-1.7.1.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/d4b628a5/FlexUnit4AntTasks/lib/ant-testutil-1.7.1.jar
----------------------------------------------------------------------
diff --git a/FlexUnit4AntTasks/lib/ant-testutil-1.7.1.jar b/FlexUnit4AntTasks/lib/ant-testutil-1.7.1.jar
deleted file mode 100644
index 10f5230..0000000
Binary files a/FlexUnit4AntTasks/lib/ant-testutil-1.7.1.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/d4b628a5/FlexUnit4AntTasks/lib/dom4j-1.6.1.jar
----------------------------------------------------------------------
diff --git a/FlexUnit4AntTasks/lib/dom4j-1.6.1.jar b/FlexUnit4AntTasks/lib/dom4j-1.6.1.jar
deleted file mode 100644
index c8c4dbb..0000000
Binary files a/FlexUnit4AntTasks/lib/dom4j-1.6.1.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/d4b628a5/FlexUnit4AntTasks/lib/jaxen-1.1-beta-6.jar
----------------------------------------------------------------------
diff --git a/FlexUnit4AntTasks/lib/jaxen-1.1-beta-6.jar b/FlexUnit4AntTasks/lib/jaxen-1.1-beta-6.jar
deleted file mode 100644
index 6cef35d..0000000
Binary files a/FlexUnit4AntTasks/lib/jaxen-1.1-beta-6.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/flex-flexunit/blob/d4b628a5/FlexUnit4AntTasks/lib/junit-3.8.1.jar
----------------------------------------------------------------------
diff --git a/FlexUnit4AntTasks/lib/junit-3.8.1.jar b/FlexUnit4AntTasks/lib/junit-3.8.1.jar
deleted file mode 100644
index 674d71e..0000000
Binary files a/FlexUnit4AntTasks/lib/junit-3.8.1.jar and /dev/null differ


Mime
View raw message