You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2014/06/24 15:49:16 UTC

[1/7] git commit: [flex-falcon] [refs/heads/develop] - Cleanup

Repository: flex-falcon
Updated Branches:
  refs/heads/develop e69eb3ae5 -> aadd7dc5a


Cleanup

- fixed whitespace
- rearranged targets (put 'utilities' at bottom, so the actual good stuff is right on top)

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


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

Branch: refs/heads/develop
Commit: e1f043e83848ceb9344dc34e7293c6d6bbb786bd
Parents: e69eb3a
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Mon Jun 23 10:20:53 2014 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Mon Jun 23 10:20:53 2014 +0200

----------------------------------------------------------------------
 compiler.jx/downloads.xml | 734 ++++++++++++++++++++---------------------
 1 file changed, 356 insertions(+), 378 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e1f043e8/compiler.jx/downloads.xml
----------------------------------------------------------------------
diff --git a/compiler.jx/downloads.xml b/compiler.jx/downloads.xml
index b1bc70c..eb3184f 100644
--- a/compiler.jx/downloads.xml
+++ b/compiler.jx/downloads.xml
@@ -17,392 +17,370 @@
   limitations under the License.
 
 -->
-
 <project name="downloads" default="main" basedir=".">
 
-	<!-- this script supports the usingDownloadCache property and
-	     downloadCacheFolder property to cache downloads in the
-		 folder specified by downloadCacheFolder.  This can make
-		 a huge difference in future runs although there is some
-		 risk around caching bad downloads and/or needing to
-		 clean up the cache -->
-	
-	<property name="FALCONJX_HOME" location="."/>
-    <property name="lib.dir" value="${FALCONJX_HOME}/lib"/>    
-	<property name="download.dir" value="${FALCONJX_HOME}/in"/>
-    <property file="${basedir}/local.properties"/>
-    <property name="closure.download.server" value="http://search.maven.org" />
-    <property name="closure.download.folder" value="remotecontent?filepath=com/google/javascript/closure-compiler/v20131014" />
-    <property name="closure.download.filename" value="closure-compiler-v20131014.jar" />
-    <property name="closure.download.checksum" value="e9b4b20ef9ff13c13fb159a9efff33ea" />
-    
-    <property name="guava.name" value="guava-15.0"/>
-    
-	<!-- 
-	   Notes:
-	       For Apache, the JARS must be removed from the repository.
-	       
-	       Licenses:
-            commons-io (2.0.1) - Apache 2.0
-	        closure (9.2) - Apache 2.0
-	        
-	-->
-	
-    <property name="commons-io.name" value="commons-io-2.0.1"/>
-    <property name="closure.name" value="compiler"/>
-	
-    <!-- 
-        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, commons-io-jar-jx, closure-jar, guava-jar, args4j-jar, org.json-jar"
-		description="Downloads all the required thirdparty JARs"/>
+  <!-- 
+      Notes:
+          For Apache, the JARS must be removed from the repository.
 
-    <target name="prepare" >
-		<echo message="Making lib directory ${lib.dir}"/>
-        <mkdir dir="${lib.dir}" />
-    </target>
-	
-	
-    <!--
-	    Download thirdparty JARs    
-	-->
+          Licenses:
+              commons-io (2.0.1) - Apache 2.0
+              closure (9.2) - Apache 2.0
+  -->
 
+  <!-- this script supports the usingDownloadCache property and
+       downloadCacheFolder property to cache downloads in the
+       folder specified by downloadCacheFolder.  This can make
+       a huge difference in future runs although there is some
+       risk around caching bad downloads and/or needing to
+       clean up the cache -->
+
+  <property name="FALCONJX_HOME" location="."/>
+
+  <property name="lib.dir" value="${FALCONJX_HOME}/lib"/>
+  <property name="download.dir" value="${FALCONJX_HOME}/in"/>
+
+  <property file="${basedir}/local.properties"/>
+
+  <!--  args4j -->
+  <!--  closure -->
+  <property name="closure.name" value="compiler"/>
+  <property name="closure.download.server" value="http://search.maven.org"/>
+  <property name="closure.download.folder" value="remotecontent?filepath=com/google/javascript/closure-compiler/v20131014"/>
+  <property name="closure.download.filename" value="closure-compiler-v20131014.jar"/>
+  <property name="closure.download.checksum" value="e9b4b20ef9ff13c13fb159a9efff33ea"/>
+  <!--  commons-io -->
+  <property name="commons-io.name" value="commons-io-2.0.1"/>
+  <!--  guava -->
+  <property name="guava.name" value="guava-15.0"/>
+  <!--  org.json -->
+
+
+
+  <!-- 
+      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, commons-io-jar-jx, closure-jar, guava-jar, args4j-jar, org.json-jar" description="Downloads all the required thirdparty JARs"/>
+  
+  <target name="prepare">
+    <echo message="Making lib directory ${lib.dir}"/>
+    <mkdir dir="${lib.dir}"/>
+  </target>
+
+
+
+  <!--
+      Downloads
+  -->
+  
     <!--
-        Download a zip or gz file, extracts the jar file, and optionally copies the jar
-        file to a different location and optinally verifies the checksum and optionally
-		caches the file, and optionally pulls the file from the cache instead of downloading.  
-        If the checksum fails, this script fails.
-
-        Params are:
-            srcDomain - the domain
-			srcFolder - path to file
-            srcFile - a .gz file for untar with gzip, else unzip
-            [md5]
-            [srcJarPath] - both src and dest required for the copy
-            [destJarFile]
-
-        Note: This is purposely coded without <if><else><then> so that a dependency on
-        ant-contrib.jar isn't required.        
-    -->
-    
-    <target name="download-zip" depends="check-cache"
-        description="Downloads tar/zip, and optionally verifies checksum and copies extracted jar.">                
-        
-        <mkdir dir="${download.dir}"/>        
-    	
-        <antcall target="get-if-not-cached">
-			<param name="dest" value="${download.dir}/${srcFile}"/>
-            <param name="message" value="Checksum mismatch for ${download.dir}/${srcFile}"/>
-		</antcall>
-		<antcall target="copy-if-cached">
-			<param name="dest" value="${download.dir}/${srcFile}"/>
-		</antcall>
-        
-        <condition property="zip.compressed">
-            <matches string="${srcFile}" pattern="^*.zip$"/>      
-        </condition>
- 
-        <antcall target="untar-file"/>
-        <antcall target="unzip-file"/>
-        
-        <condition property="destination.known">
-            <and>
-                <isset property="srcJarPath"/>
-                <isset property="destJarFile"/>
-            </and>
-        </condition> 
-        <antcall target="copy-downloaded-jar"/>
-     </target>   	
-     
-    <target name="download-bz2" depends="check-cache"
-        description="Downloads bz2, and optionally verifies checksum and copies extracted jar.">                
-        
-        <mkdir dir="${download.dir}"/>        
-    	
-        <antcall target="get-if-not-cached">
-			<param name="dest" value="${download.dir}/${srcFile}"/>
-            <param name="message" value="Checksum mismatch for ${download.dir}/${srcFile}"/>
-		</antcall>
-		<antcall target="copy-if-cached">
-			<param name="dest" value="${download.dir}/${srcFile}"/>
-		</antcall>
-
-        <untar src="${download.dir}/${srcFile}" dest="${download.dir}/temp" compression="bzip2"/> 
-                
-        <condition property="destination.known">
-            <and>
-                <isset property="srcJarPath"/>
-                <isset property="destJarFile"/>
-            </and>
-        </condition> 
-        <antcall target="copy-downloaded-jar"/>
-     </target>   	
-     
-    <!--
-        Download a jar file and optionally verify the checksum.
-        If the checksum fails, this script fails.
-        
-        Params are:
-            srcDomain
-			srcFolder
-            srcFile
-            destJarFile
-            [md5]
+        args4j
     -->
-    <target name="download-jar" depends="check-cache"
-        description="Downloads jar, and optionally verifies checksum.">                
-     
-        <antcall target="get-if-not-cached">
-			<param name="dest" value="${destJarFile}"/>
-            <param name="message" value="Checksum mismatch for ${destJarFile}"/>
-		</antcall>
-		<antcall target="copy-if-cached">
-			<param name="dest" value="${destJarFile}"/>
-		</antcall>
-    </target>
-
-    <target name="untar-file" unless="zip.compressed" description="Untars zipFile">
-        <untar src="${download.dir}/${srcFile}" dest="${download.dir}/temp" compression="gzip"/> 
-    </target>
-    
-    <target name="unzip-file" if="zip.compressed" description="Unzips zipFile">
-        <unzip src="${download.dir}/${srcFile}" dest="${download.dir}/temp"/>    
-    </target>
-    
-    <target name="get-if-not-cached" unless="found-in-cache"> 
-        <get src="${srcDomain}/${srcFolder}/${srcFile}" dest="${dest}"/>
-        <antcall target="check-sum">
-			<param name="dest" value="${dest}" />
-            <param name="message" value="Checksum mismatch for ${dest}"/>
-        </antcall>
-		<antcall target="put-in-cache" />
-	</target>
-	
-    <target name="copy-if-cached" if="found-in-cache">
-		<!-- this string comes from the FlexJS en_US.properties because for now, this
-		     target won't get called unless this script is called from the FlexJS install -->
-		<echo>${INFO_USING_CACHED_FILE} ${downloadCacheFolder}/${srcFolder}/${srcFile}</echo>
-		<copy file="${downloadCacheFolder}/${srcFolder}/${srcFile}" tofile="${dest}" overwrite="true" />
-	</target> 
-	
-    <target name="check-cache" if="usingDownloadCache">
-		<available file="${downloadCacheFolder}/${srcFolder}/${srcFile}" property="found-in-cache" />
-	</target> 
-	
-    <target name="put-in-cache" if="usingDownloadCache">
-		<copy tofile="${downloadCacheFolder}/${srcFolder}/${srcFile}" file="${dest}" />
-	</target> 
-	
-    <target name="check-sum" if="md5" 
-        description="Verifies MD5 checksum, and fails if checksum doesn't match">
-        
-        <checksum file="${dest}" algorithm="MD5" verifyproperty="we.failed" property="${md5}" />
-        <fail message="${message}">
-			<condition>
-				<equals arg1="${we.failed}" arg2="false" />
-			</condition>
-		</fail>
-    </target>
-    
-    <target name="copy-downloaded-jar" if="destination.known">
-        <mkdir dir="${lib.dir}"/>
-        <copy file="${download.dir}/temp/${srcJarPath}" toFile="${destJarFile}" verbose="true"/>
-    </target>
-    
-    <target name="fail-with-message" if="we.failed" 
-        description="Conditionally fails with the specified message">                
-        <fail message="${message}"/>
-    </target>
-	
-	<!--
-	    closure - JS compiler, minimizer, etc.
-	-->
-	
-	<target name="closure-jar-check" description="Checks if closure jar exists.">
-	    <available file="${lib.dir}/google/closure-compiler/compiler.jar" property="closure.jar.exists" />
-	</target>
-	
-	<target name="closure-jar" depends="closure-jar-check" unless="closure.jar.exists" 
-	    description="Copies the closure build jars.">
-		<mkdir dir="${lib.dir}/google/closure-compiler" />
-        <antcall target="echo-closure-jar">
-            <param name="srcDomain" value="${closure.download.server}"/>
-            <param name="srcFolder" value="${closure.download.folder}"/>
-            <!--
-             erikdebruin: because of a dependency Falcon has on an old version of Guava,
-             any versions of the Closure compiler after sept. 17, 2012 cause exceptions
-             when doing a release build with FalconJx.
-             
-             Was: param name="zipFile" value="compiler-latest.zip"
-             -->
-            <param name="srcFile" value="${closure.download.filename}"/>
-        </antcall>
-	    <antcall target="download-jar">
-            <param name="srcDomain" value="${closure.download.server}"/>
-            <param name="srcFolder" value="${closure.download.folder}"/>
-	      <!-- 
-				erikdebruin: because of a dependency Falcon has on an old version of Guava, 
-				any versions of the Closure compiler after sept. 17, 2012 cause exceptions 
-				when doing a release build with FalconJx.
-				
-				Was: param name="zipFile" value="compiler-latest.zip"
-				-->
-	      <param name="srcFile" value="${closure.download.filename}"/>
-          <param name="cacheFolder" value="com/google/javascript/closure-compiler/v20131014"/>
-          <param name="destJarFile" value="${lib.dir}/google/closure-compiler/compiler.jar"/>
-          <param name="md5" value="${closure.download.checksum}"/>
-	    </antcall>
-	    <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/google/closure-compiler/closure-LICENSE.txt"/>
-	    <copy todir="${lib.dir}/google/closure-compiler">
-	        <fileset dir="${download.dir}/temp">
-	            <include name="${closure.name}.jar"/>
-	        </fileset>
-	    </copy>
-	    <delete includeemptydirs="true">
-	        <fileset dir="${download.dir}/temp" includes="**/*"/>
-	    </delete>    
-	</target>
-
-    <target name="echo-closure-jar" if="installer">
-        <echo file="${basedir}/closure.properties">closure.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-        <replace file="${basedir}/closure.properties" token="{0}" value="${srcFile}" />
-        <replace file="${basedir}/closure.properties" token="{1}" value="${srcDomain}/${srcFolder}" />
-        <property file="${basedir}/closure.properties" />
-        <delete file="${basedir}/closure.properties" />
-        <echo>${closure.echo}</echo>
-    </target>
-    
-	   <!--
-	        commons-io
-	    -->
-	    
-    <target name="commons-io-jar-check" description="Checks if commons-io.jar is in lib directory.">
-        <available file="${lib.dir}/commons-io.jar" property="commons.io.jar.exists"/>
-    </target>
-    
-    <target name="commons-io-jar-jx" depends="commons-io-jar-check" 
-        unless="commons.io.jar.exists" 
-        description="Copies commons-io.jar to the lib directory.">
-                
-        <antcall target="echo-commons-jar">
-            <param name="srcDomain" value="http://archive.apache.org"/>
-            <param name="srcFolder" value="dist/commons/io/binaries"/>
-            <param name="srcFile" value="${commons-io.name}-bin.tar.gz"/>
-        </antcall>
-        <antcall target="download-zip">
-          <param name="srcDomain" value="http://archive.apache.org"/>
-          <param name="srcFolder" value="dist/commons/io/binaries"/>
-          <param name="srcFile" value="${commons-io.name}-bin.tar.gz"/>
-          <param name="md5" value="4f2c26f9d80f89d15939619cc8524f78"/>
-          <param name="srcJarPath" value="${commons-io.name}/${commons-io.name}.jar"/>
-          <param name="destJarFile" value="${lib.dir}/commons-io.jar"/>
-        </antcall>
-        <copy todir="${lib.dir}">
-            <fileset dir="${download.dir}/temp/${commons-io.name}">
-                <include name="LICENSE.txt"/>
-            </fileset>            
-            <globmapper from="*" to="commons-io-*"/>
-        </copy>
-        <delete dir="${download.dir}/temp/${commons-io.name}"/>
-    </target>
-        
-    <target name="echo-commons-jar" if="installer">
-        <echo file="${basedir}/commons.properties">commons.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-        <replace file="${basedir}/commons.properties" token="{0}" value="${srcFile}" />
-        <replace file="${basedir}/commons.properties" token="{1}" value="${srcDomain}/${srcFolder}" />
-        <property file="${basedir}/commons.properties" />
-        <delete file="${basedir}/commons.properties" />
-        <echo>${commons.echo}</echo>
-    </target>
-    
-	<!--
-     guava - collections and other common constructs
-     -->
-    
-    <target name="guava-jar-check" description="Checks if guava.jar is in lib directory.">
-        <available file="${lib.dir}/guava.jar" property="guava.jar.exists"/>
-    </target>
-    
-    <target name="guava-jar" depends="guava-jar-check"
-        unless="guava.jar.exists"
-        description="Downloads and copies guava.jar to the lib directory.">
-        <echo file="${basedir}/guava.properties">guava.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-        <replace file="${basedir}/guava.properties" token="{0}" value="guava-15.0.jar" />
-        <replace file="${basedir}/guava.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=com/google/guava/guava/15.0" />
-        <property file="${basedir}/guava.properties" />
-        <delete file="${basedir}/guava.properties" />
-        <echo>${guava.echo}</echo>
-        <antcall target="download-jar">
-            <param name="srcDomain" value="http://search.maven.org"/>
-            <param name="srcFolder" value="remotecontent?filepath=com/google/guava/guava/15.0"/>
-            <param name="cacheFolder" value="com/google/guava/guava/15.0"/>
-            <param name="srcFile" value="guava-15.0.jar"/>
-            <param name="destJarFile" value="${lib.dir}/guava.jar"/>
-			<param name="md5" value="2c10bb2ca3ac8b55b0e77e54a7eb3744"/>
-        </antcall>
-        <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/guava-LICENSE.txt"/>
-    </target>
-    
     <target name="args4j-jar-check" description="Checks if args4j.jar is in lib directory.">
-        <available file="${lib.dir}/args4j.jar" property="args4j.jar.exists"/>
-    </target>
-    
-    <target name="args4j-jar" depends="args4j-jar-check"
-        unless="args4j.jar.exists"
-        description="Downloads and copies args4j.jar to the lib directory.">
-        <echo file="${basedir}/args4j.properties">args4j.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-        <replace file="${basedir}/args4j.properties" token="{0}" value="args4j-2.0.16.jar" />
-        <replace file="${basedir}/args4j.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=args4j/args4j/2.0.16" />
-        <property file="${basedir}/args4j.properties" />
-        <delete file="${basedir}/args4j.properties" />
-        <echo>${args4j.echo}</echo>
-        <antcall target="download-jar">
-            <param name="srcDomain" value="http://search.maven.org"/>
-            <param name="srcFolder" value="remotecontent?filepath=args4j/args4j/2.0.16"/>
-            <param name="cacheFolder" value="args4j/args4j/2.0.16"/>
-            <param name="srcFile" value="args4j-2.0.16.jar"/>
-            <param name="destJarFile" value="${lib.dir}/args4j.jar"/>
-			<param name="md5" value="6571d69d142dd2a003c4ffae6138f0ee"/>
-        </antcall>
-        <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/args4j-LICENSE.txt"/>
+      <available file="${lib.dir}/args4j.jar" property="args4j.jar.exists"/>
     </target>
-    
-    <target name="org.json-jar-check" description="Checks if org.json.jar is in lib directory.">
-        <available file="${lib.dir}/org.json.jar" property="org.json.jar.exists"/>
+    <target name="args4j-jar" depends="args4j-jar-check" unless="args4j.jar.exists" description="Downloads and copies args4j.jar to the lib directory.">
+      <echo file="${basedir}/args4j.properties">args4j.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
+      <replace file="${basedir}/args4j.properties" token="{0}" value="args4j-2.0.16.jar"/>
+      <replace file="${basedir}/args4j.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=args4j/args4j/2.0.16"/>
+      <property file="${basedir}/args4j.properties"/>
+      <delete file="${basedir}/args4j.properties"/>
+      <echo>${args4j.echo}</echo>
+      <antcall target="download-jar">
+        <param name="srcDomain" value="http://search.maven.org"/>
+        <param name="srcFolder" value="remotecontent?filepath=args4j/args4j/2.0.16"/>
+        <param name="cacheFolder" value="args4j/args4j/2.0.16"/>
+        <param name="srcFile" value="args4j-2.0.16.jar"/>
+        <param name="destJarFile" value="${lib.dir}/args4j.jar"/>
+        <param name="md5" value="6571d69d142dd2a003c4ffae6138f0ee"/>
+      </antcall>
+      <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/args4j-LICENSE.txt"/>
     </target>
-    
-    <target name="org.json-jar" depends="org.json-jar-check"
-        unless="org.json.jar.exists"
-        description="Downloads and copies org.json.jar to the lib directory.">
-        <echo file="${basedir}/org.json.properties">org.json.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-        <replace file="${basedir}/org.json.properties" token="{0}" value="org.json-20130213.jar" />
-        <replace file="${basedir}/org.json.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=org/codeartisans/org.json/20130213" />
-        <property file="${basedir}/org.json.properties" />
-        <delete file="${basedir}/org.json.properties" />
-        <echo>${org.json.echo}</echo>
-        <antcall target="download-jar">
-            <param name="srcDomain" value="http://search.maven.org"/>
-            <param name="srcFolder" value="remotecontent?filepath=org/codeartisans/org.json/20130213"/>
-            <param name="cacheFolder" value="org/codeartisans/org.json/20130213"/>
-            <param name="srcFile" value="org.json-20130213.jar"/>
-            <param name="destJarFile" value="${lib.dir}/org.json.jar"/>
-			<param name="md5" value="a865b42221d2687244a679fa4e5425d5"/>
-        </antcall>
-        <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/org.json-LICENSE.txt"/>
-    </target>
-    
-    <!--
-		Cleanup
-	-->
-	
-    <target name="clean" 
-        description="Removes thirdparty downloads.">
+
+  <!--
+      closure - JS compiler, minimizer, etc.
+  -->
+  <target name="closure-jar-check" description="Checks if closure jar exists.">
+    <available file="${lib.dir}/google/closure-compiler/compiler.jar" property="closure.jar.exists"/>
+  </target>
+  <target name="closure-jar" depends="closure-jar-check" unless="closure.jar.exists" description="Copies the closure build jars.">
+    <mkdir dir="${lib.dir}/google/closure-compiler"/>
+    <antcall target="echo-closure-jar">
+      <param name="srcDomain" value="${closure.download.server}"/>
+      <param name="srcFolder" value="${closure.download.folder}"/>
+      <!--
+          erikdebruin: because of a dependency Falcon has on an old version of Guava,
+          any versions of the Closure compiler after sept. 17, 2012 cause exceptions
+          when doing a release build with FalconJx.
+          
+          Was: param name="zipFile" value="compiler-latest.zip"
+      -->
+      <param name="srcFile" value="${closure.download.filename}"/>
+    </antcall>
+    <antcall target="download-jar">
+      <param name="srcDomain" value="${closure.download.server}"/>
+      <param name="srcFolder" value="${closure.download.folder}"/>
+      <!-- 
+          erikdebruin: because of a dependency Falcon has on an old version of Guava, 
+          any versions of the Closure compiler after sept. 17, 2012 cause exceptions 
+          when doing a release build with FalconJx.
+          
+          Was: param name="zipFile" value="compiler-latest.zip"
+        -->
+      <param name="srcFile" value="${closure.download.filename}"/>
+      <param name="cacheFolder" value="com/google/javascript/closure-compiler/v20131014"/>
+      <param name="destJarFile" value="${lib.dir}/google/closure-compiler/compiler.jar"/>
+      <param name="md5" value="${closure.download.checksum}"/>
+    </antcall>
+    <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/google/closure-compiler/closure-LICENSE.txt"/>
+    <copy todir="${lib.dir}/google/closure-compiler">
+      <fileset dir="${download.dir}/temp">
+        <include name="${closure.name}.jar"/>
+      </fileset>
+    </copy>
+    <delete includeemptydirs="true">
+      <fileset dir="${download.dir}/temp" includes="**/*"/>
+    </delete>
+  </target>
+  <target name="echo-closure-jar" if="installer">
+    <echo file="${basedir}/closure.properties">closure.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
+    <replace file="${basedir}/closure.properties" token="{0}" value="${srcFile}"/>
+    <replace file="${basedir}/closure.properties" token="{1}" value="${srcDomain}/${srcFolder}"/>
+    <property file="${basedir}/closure.properties"/>
+    <delete file="${basedir}/closure.properties"/>
+    <echo>${closure.echo}</echo>
+  </target>
+  
+  <!--
+      commons-io
+  -->
+  <target name="commons-io-jar-check" description="Checks if commons-io.jar is in lib directory.">
+    <available file="${lib.dir}/commons-io.jar" property="commons.io.jar.exists"/>
+  </target>
+  <target name="commons-io-jar-jx" depends="commons-io-jar-check" unless="commons.io.jar.exists" description="Copies commons-io.jar to the lib directory.">
+    <antcall target="echo-commons-jar">
+      <param name="srcDomain" value="http://archive.apache.org"/>
+      <param name="srcFolder" value="dist/commons/io/binaries"/>
+      <param name="srcFile" value="${commons-io.name}-bin.tar.gz"/>
+    </antcall>
+    <antcall target="download-zip">
+      <param name="srcDomain" value="http://archive.apache.org"/>
+      <param name="srcFolder" value="dist/commons/io/binaries"/>
+      <param name="srcFile" value="${commons-io.name}-bin.tar.gz"/>
+      <param name="md5" value="4f2c26f9d80f89d15939619cc8524f78"/>
+      <param name="srcJarPath" value="${commons-io.name}/${commons-io.name}.jar"/>
+      <param name="destJarFile" value="${lib.dir}/commons-io.jar"/>
+    </antcall>
+    <copy todir="${lib.dir}">
+      <fileset dir="${download.dir}/temp/${commons-io.name}">
+        <include name="LICENSE.txt"/>
+      </fileset>
+      <globmapper from="*" to="commons-io-*"/>
+    </copy>
+    <delete dir="${download.dir}/temp/${commons-io.name}"/>
+  </target>
+  <target name="echo-commons-jar" if="installer">
+    <echo file="${basedir}/commons.properties">commons.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
+    <replace file="${basedir}/commons.properties" token="{0}" value="${srcFile}"/>
+    <replace file="${basedir}/commons.properties" token="{1}" value="${srcDomain}/${srcFolder}"/>
+    <property file="${basedir}/commons.properties"/>
+    <delete file="${basedir}/commons.properties"/>
+    <echo>${commons.echo}</echo>
+  </target>
+  
+  <!--
+      guava - collections and other common constructs
+  -->
+  <target name="guava-jar-check" description="Checks if guava.jar is in lib directory.">
+    <available file="${lib.dir}/guava.jar" property="guava.jar.exists"/>
+  </target>
+  <target name="guava-jar" depends="guava-jar-check" unless="guava.jar.exists" description="Downloads and copies guava.jar to the lib directory.">
+    <echo file="${basedir}/guava.properties">guava.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
+    <replace file="${basedir}/guava.properties" token="{0}" value="guava-15.0.jar"/>
+    <replace file="${basedir}/guava.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=com/google/guava/guava/15.0"/>
+    <property file="${basedir}/guava.properties"/>
+    <delete file="${basedir}/guava.properties"/>
+    <echo>${guava.echo}</echo>
+    <antcall target="download-jar">
+      <param name="srcDomain" value="http://search.maven.org"/>
+      <param name="srcFolder" value="remotecontent?filepath=com/google/guava/guava/15.0"/>
+      <param name="cacheFolder" value="com/google/guava/guava/15.0"/>
+      <param name="srcFile" value="guava-15.0.jar"/>
+      <param name="destJarFile" value="${lib.dir}/guava.jar"/>
+      <param name="md5" value="2c10bb2ca3ac8b55b0e77e54a7eb3744"/>
+    </antcall>
+    <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/guava-LICENSE.txt"/>
+  </target>
+  
+  <!--
+      org.json
+  -->
+  <target name="org.json-jar-check" description="Checks if org.json.jar is in lib directory.">
+    <available file="${lib.dir}/org.json.jar" property="org.json.jar.exists"/>
+  </target>
+  <target name="org.json-jar" depends="org.json-jar-check" unless="org.json.jar.exists" description="Downloads and copies org.json.jar to the lib directory.">
+    <echo file="${basedir}/org.json.properties">org.json.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
+    <replace file="${basedir}/org.json.properties" token="{0}" value="org.json-20130213.jar"/>
+    <replace file="${basedir}/org.json.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=org/codeartisans/org.json/20130213"/>
+    <property file="${basedir}/org.json.properties"/>
+    <delete file="${basedir}/org.json.properties"/>
+    <echo>${org.json.echo}</echo>
+    <antcall target="download-jar">
+      <param name="srcDomain" value="http://search.maven.org"/>
+      <param name="srcFolder" value="remotecontent?filepath=org/codeartisans/org.json/20130213"/>
+      <param name="cacheFolder" value="org/codeartisans/org.json/20130213"/>
+      <param name="srcFile" value="org.json-20130213.jar"/>
+      <param name="destJarFile" value="${lib.dir}/org.json.jar"/>
+      <param name="md5" value="a865b42221d2687244a679fa4e5425d5"/>
+    </antcall>
+    <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/org.json-LICENSE.txt"/>
+  </target>
+
+
+
+  <!--
+      Utilities
+  -->
+
+  <!--
+      Download a zip or gz file, extracts the jar file, and optionally copies the jar
+      file to a different location and optinally verifies the checksum and optionally
+      caches the file, and optionally pulls the file from the cache instead of downloading.  
+      If the checksum fails, this script fails.
+
+      Params are:
+          srcDomain - the domain
+          srcFolder - path to file
+          srcFile - a .gz file for untar with gzip, else unzip
+          [md5]
+          [srcJarPath] - both src and dest required for the copy
+          [destJarFile]
+
+      Note: This is purposely coded without <if><else><then> so that a dependency on
+      ant-contrib.jar isn't required.        
+  -->
+  <target name="download-zip" depends="check-cache" description="Downloads tar/zip, and optionally verifies checksum and copies extracted jar.">
+    <mkdir dir="${download.dir}"/>
+    <antcall target="get-if-not-cached">
+      <param name="dest" value="${download.dir}/${srcFile}"/>
+      <param name="message" value="Checksum mismatch for ${download.dir}/${srcFile}"/>
+    </antcall>
+    <antcall target="copy-if-cached">
+      <param name="dest" value="${download.dir}/${srcFile}"/>
+    </antcall>
+    <condition property="zip.compressed">
+      <matches string="${srcFile}" pattern="^*.zip$"/>
+    </condition>
+    <antcall target="untar-file"/>
+    <antcall target="unzip-file"/>
+    <condition property="destination.known">
+      <and>
+        <isset property="srcJarPath"/>
+        <isset property="destJarFile"/>
+      </and>
+    </condition>
+    <antcall target="copy-downloaded-jar"/>
+  </target>
+
+  <target name="download-bz2" depends="check-cache" description="Downloads bz2, and optionally verifies checksum and copies extracted jar.">
+    <mkdir dir="${download.dir}"/>
+    <antcall target="get-if-not-cached">
+      <param name="dest" value="${download.dir}/${srcFile}"/>
+      <param name="message" value="Checksum mismatch for ${download.dir}/${srcFile}"/>
+    </antcall>
+    <antcall target="copy-if-cached">
+      <param name="dest" value="${download.dir}/${srcFile}"/>
+    </antcall>
+    <untar src="${download.dir}/${srcFile}" dest="${download.dir}/temp" compression="bzip2"/>
+    <condition property="destination.known">
+      <and>
+        <isset property="srcJarPath"/>
+        <isset property="destJarFile"/>
+      </and>
+    </condition>
+    <antcall target="copy-downloaded-jar"/>
+  </target>
+
+  <!--
+      Download a jar file and optionally verify the checksum.
+      If the checksum fails, this script fails.
         
-        <delete failonerror="false" includeEmptyDirs="true">
-            <fileset dir="${download.dir}" />
-        </delete>
-    </target>
-    
+      Params are:
+          srcDomain
+          srcFolder
+          srcFile
+          destJarFile
+          [md5]
+  -->
+  <target name="download-jar" depends="check-cache" description="Downloads jar, and optionally verifies checksum.">
+    <antcall target="get-if-not-cached">
+      <param name="dest" value="${destJarFile}"/>
+      <param name="message" value="Checksum mismatch for ${destJarFile}"/>
+    </antcall>
+    <antcall target="copy-if-cached">
+      <param name="dest" value="${destJarFile}"/>
+    </antcall>
+  </target>
+
+  <target name="untar-file" unless="zip.compressed" description="Untars zipFile">
+    <untar src="${download.dir}/${srcFile}" dest="${download.dir}/temp" compression="gzip"/>
+  </target>
+
+  <target name="unzip-file" if="zip.compressed" description="Unzips zipFile">
+    <unzip src="${download.dir}/${srcFile}" dest="${download.dir}/temp"/>
+  </target>
+
+  <target name="get-if-not-cached" unless="found-in-cache">
+    <get src="${srcDomain}/${srcFolder}/${srcFile}" dest="${dest}"/>
+    <antcall target="check-sum">
+      <param name="dest" value="${dest}"/>
+      <param name="message" value="Checksum mismatch for ${dest}"/>
+    </antcall>
+    <antcall target="put-in-cache"/>
+  </target>
+
+  <target name="copy-if-cached" if="found-in-cache">
+    <!-- this string comes from the FlexJS en_US.properties because for now, this
+         target won't get called unless this script is called from the FlexJS install -->
+    <echo>${INFO_USING_CACHED_FILE} ${downloadCacheFolder}/${srcFolder}/${srcFile}</echo>
+    <copy file="${downloadCacheFolder}/${srcFolder}/${srcFile}" tofile="${dest}" overwrite="true"/>
+  </target>
+
+  <target name="check-cache" if="usingDownloadCache">
+    <available file="${downloadCacheFolder}/${srcFolder}/${srcFile}" property="found-in-cache"/>
+  </target>
+
+  <target name="put-in-cache" if="usingDownloadCache">
+    <copy tofile="${downloadCacheFolder}/${srcFolder}/${srcFile}" file="${dest}"/>
+  </target>
+
+  <target name="check-sum" if="md5" description="Verifies MD5 checksum, and fails if checksum doesn't match">
+    <checksum file="${dest}" algorithm="MD5" verifyproperty="we.failed" property="${md5}"/>
+    <fail message="${message}">
+      <condition>
+        <equals arg1="${we.failed}" arg2="false"/>
+      </condition>
+    </fail>
+  </target>
+
+  <target name="copy-downloaded-jar" if="destination.known">
+    <mkdir dir="${lib.dir}"/>
+    <copy file="${download.dir}/temp/${srcJarPath}" toFile="${destJarFile}" verbose="true"/>
+  </target>
+
+  <target name="fail-with-message" if="we.failed" description="Conditionally fails with the specified message">
+    <fail message="${message}"/>
+  </target>
+
+
+
+  <!--
+      Cleanup
+  -->
+  <target name="clean" description="Removes thirdparty downloads.">
+    <delete failonerror="false" includeEmptyDirs="true">
+      <fileset dir="${download.dir}"/>
+    </delete>
+  </target>
 </project>


[3/7] git commit: [flex-falcon] [refs/heads/develop] - # is the new @

Posted by er...@apache.org.
# is the new @

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


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

Branch: refs/heads/develop
Commit: 57f963669a72652c1ac0500ba8bd2855ae637c2d
Parents: 53d0bd4
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Mon Jun 23 16:39:28 2014 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Mon Jun 23 16:39:28 2014 +0200

----------------------------------------------------------------------
 .../flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/57f96366/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
index 01b52f2..24e2f01 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
@@ -195,7 +195,7 @@ public class JSGoogPublisher extends JSPublisher implements IJSPublisher
             throws IOException
     {
         StringBuilder appendString = new StringBuilder();
-        appendString.append("\n//@ sourceMappingURL=./"
+        appendString.append("\n//# sourceMappingURL=./"
                 + projectName + ".js.map");
         writeFile(path, appendString.toString(), true);
     }


[6/7] git commit: [flex-falcon] [refs/heads/develop] - New downloads.xml: - updated dependencies - fixed whitespace - fixed maintainability

Posted by er...@apache.org.
New downloads.xml:
- updated dependencies
- fixed whitespace
- fixed maintainability

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


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

Branch: refs/heads/develop
Commit: ac765e63b6cece27ef5b83a29d6125512836b4fe
Parents: cdd4111
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Tue Jun 24 15:46:08 2014 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Tue Jun 24 15:46:08 2014 +0200

----------------------------------------------------------------------
 compiler.jx/downloads.xml | 746 +++++++++++++++++------------------
 compiler/downloads.xml    | 877 +++++++++++++++++++----------------------
 2 files changed, 778 insertions(+), 845 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/ac765e63/compiler.jx/downloads.xml
----------------------------------------------------------------------
diff --git a/compiler.jx/downloads.xml b/compiler.jx/downloads.xml
index b1bc70c..628a70a 100644
--- a/compiler.jx/downloads.xml
+++ b/compiler.jx/downloads.xml
@@ -17,392 +17,378 @@
   limitations under the License.
 
 -->
-
 <project name="downloads" default="main" basedir=".">
 
-	<!-- this script supports the usingDownloadCache property and
-	     downloadCacheFolder property to cache downloads in the
-		 folder specified by downloadCacheFolder.  This can make
-		 a huge difference in future runs although there is some
-		 risk around caching bad downloads and/or needing to
-		 clean up the cache -->
-	
-	<property name="FALCONJX_HOME" location="."/>
-    <property name="lib.dir" value="${FALCONJX_HOME}/lib"/>    
-	<property name="download.dir" value="${FALCONJX_HOME}/in"/>
-    <property file="${basedir}/local.properties"/>
-    <property name="closure.download.server" value="http://search.maven.org" />
-    <property name="closure.download.folder" value="remotecontent?filepath=com/google/javascript/closure-compiler/v20131014" />
-    <property name="closure.download.filename" value="closure-compiler-v20131014.jar" />
-    <property name="closure.download.checksum" value="e9b4b20ef9ff13c13fb159a9efff33ea" />
-    
-    <property name="guava.name" value="guava-15.0"/>
-    
-	<!-- 
-	   Notes:
-	       For Apache, the JARS must be removed from the repository.
-	       
-	       Licenses:
-            commons-io (2.0.1) - Apache 2.0
-	        closure (9.2) - Apache 2.0
-	        
-	-->
-	
-    <property name="commons-io.name" value="commons-io-2.0.1"/>
+  <!-- 
+      Notes:
+          For Apache, the JARS must be removed from the repository.
+
+          Licenses:
+              commons-io (2.0.1) - Apache 2.0
+              closure (9.2) - Apache 2.0
+  -->
+
+  <!-- this script supports the usingDownloadCache property and
+       downloadCacheFolder property to cache downloads in the
+       folder specified by downloadCacheFolder.  This can make
+       a huge difference in future runs although there is some
+       risk around caching bad downloads and/or needing to
+       clean up the cache -->
+
+  <property name="FALCONJX_HOME" location="."/>
+
+  <property name="lib.dir" value="${FALCONJX_HOME}/lib"/>
+  <property name="download.dir" value="${FALCONJX_HOME}/in"/>
+
+  <property file="${basedir}/local.properties"/>
+
+  <property name="maven.search.url" value="http://search.maven.org/remotecontent?filepath="/>
+
+
+
+  <!-- 
+      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, all" description="Downloads all the required thirdparty JARs"/>
+  
+  <target name="prepare">
+    <echo message="Making lib directory ${lib.dir}"/>
+    <mkdir dir="${lib.dir}"/>
+  </target>
+
+
+
+  <!--
+      Downloads
+  -->
+
+  <target name="all" description="Downloads and copies all dependencies to the lib directory.">
+    <!--  args4j -->
+    <property name="args4j.name" value="args4j"/>
+    <property name="args4j.version" value="2.0.28"/>
+    <!-- property name="args4j.version" value="2.0.16"/ -->
+    <antcall target="download-dependency">
+      <param name="name" value="${args4j.name}"/>
+      <param name="src.server" value="${maven.search.url}"/>
+      <param name="src.folder" value="args4j/args4j/${args4j.version}"/>
+      <param name="src.filename" value="args4j-${args4j.version}.jar"/>
+      <param name="src.checksum" value="e0593b60af743a63f9678399d275272a"/>
+      <!-- param name="src.checksum" value="6571d69d142dd2a003c4ffae6138f0ee"/ --><!-- version 2.0.16 -->
+      <param name="dest.folder" value=""/>
+      <param name="dest.filename" value="${args4j.name}.jar"/>
+    </antcall>
+
+    <!--  closure -->
     <property name="closure.name" value="compiler"/>
-	
-    <!-- 
-        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, commons-io-jar-jx, closure-jar, guava-jar, args4j-jar, org.json-jar"
-		description="Downloads all the required thirdparty JARs"/>
-
-    <target name="prepare" >
-		<echo message="Making lib directory ${lib.dir}"/>
-        <mkdir dir="${lib.dir}" />
-    </target>
-	
-	
-    <!--
-	    Download thirdparty JARs    
-	-->
-
-    <!--
-        Download a zip or gz file, extracts the jar file, and optionally copies the jar
-        file to a different location and optinally verifies the checksum and optionally
-		caches the file, and optionally pulls the file from the cache instead of downloading.  
-        If the checksum fails, this script fails.
-
-        Params are:
-            srcDomain - the domain
-			srcFolder - path to file
-            srcFile - a .gz file for untar with gzip, else unzip
-            [md5]
-            [srcJarPath] - both src and dest required for the copy
-            [destJarFile]
-
-        Note: This is purposely coded without <if><else><then> so that a dependency on
-        ant-contrib.jar isn't required.        
-    -->
-    
-    <target name="download-zip" depends="check-cache"
-        description="Downloads tar/zip, and optionally verifies checksum and copies extracted jar.">                
-        
-        <mkdir dir="${download.dir}"/>        
-    	
-        <antcall target="get-if-not-cached">
-			<param name="dest" value="${download.dir}/${srcFile}"/>
-            <param name="message" value="Checksum mismatch for ${download.dir}/${srcFile}"/>
-		</antcall>
-		<antcall target="copy-if-cached">
-			<param name="dest" value="${download.dir}/${srcFile}"/>
-		</antcall>
-        
-        <condition property="zip.compressed">
-            <matches string="${srcFile}" pattern="^*.zip$"/>      
-        </condition>
- 
-        <antcall target="untar-file"/>
-        <antcall target="unzip-file"/>
-        
-        <condition property="destination.known">
-            <and>
-                <isset property="srcJarPath"/>
-                <isset property="destJarFile"/>
-            </and>
-        </condition> 
-        <antcall target="copy-downloaded-jar"/>
-     </target>   	
-     
-    <target name="download-bz2" depends="check-cache"
-        description="Downloads bz2, and optionally verifies checksum and copies extracted jar.">                
-        
-        <mkdir dir="${download.dir}"/>        
-    	
-        <antcall target="get-if-not-cached">
-			<param name="dest" value="${download.dir}/${srcFile}"/>
-            <param name="message" value="Checksum mismatch for ${download.dir}/${srcFile}"/>
-		</antcall>
-		<antcall target="copy-if-cached">
-			<param name="dest" value="${download.dir}/${srcFile}"/>
-		</antcall>
-
-        <untar src="${download.dir}/${srcFile}" dest="${download.dir}/temp" compression="bzip2"/> 
-                
-        <condition property="destination.known">
-            <and>
-                <isset property="srcJarPath"/>
-                <isset property="destJarFile"/>
-            </and>
-        </condition> 
-        <antcall target="copy-downloaded-jar"/>
-     </target>   	
-     
-    <!--
-        Download a jar file and optionally verify the checksum.
-        If the checksum fails, this script fails.
-        
-        Params are:
-            srcDomain
-			srcFolder
-            srcFile
-            destJarFile
-            [md5]
-    -->
-    <target name="download-jar" depends="check-cache"
-        description="Downloads jar, and optionally verifies checksum.">                
-     
-        <antcall target="get-if-not-cached">
-			<param name="dest" value="${destJarFile}"/>
-            <param name="message" value="Checksum mismatch for ${destJarFile}"/>
-		</antcall>
-		<antcall target="copy-if-cached">
-			<param name="dest" value="${destJarFile}"/>
-		</antcall>
-    </target>
-
-    <target name="untar-file" unless="zip.compressed" description="Untars zipFile">
-        <untar src="${download.dir}/${srcFile}" dest="${download.dir}/temp" compression="gzip"/> 
-    </target>
-    
-    <target name="unzip-file" if="zip.compressed" description="Unzips zipFile">
-        <unzip src="${download.dir}/${srcFile}" dest="${download.dir}/temp"/>    
-    </target>
-    
-    <target name="get-if-not-cached" unless="found-in-cache"> 
-        <get src="${srcDomain}/${srcFolder}/${srcFile}" dest="${dest}"/>
-        <antcall target="check-sum">
-			<param name="dest" value="${dest}" />
-            <param name="message" value="Checksum mismatch for ${dest}"/>
-        </antcall>
-		<antcall target="put-in-cache" />
-	</target>
-	
-    <target name="copy-if-cached" if="found-in-cache">
-		<!-- this string comes from the FlexJS en_US.properties because for now, this
-		     target won't get called unless this script is called from the FlexJS install -->
-		<echo>${INFO_USING_CACHED_FILE} ${downloadCacheFolder}/${srcFolder}/${srcFile}</echo>
-		<copy file="${downloadCacheFolder}/${srcFolder}/${srcFile}" tofile="${dest}" overwrite="true" />
-	</target> 
-	
-    <target name="check-cache" if="usingDownloadCache">
-		<available file="${downloadCacheFolder}/${srcFolder}/${srcFile}" property="found-in-cache" />
-	</target> 
-	
-    <target name="put-in-cache" if="usingDownloadCache">
-		<copy tofile="${downloadCacheFolder}/${srcFolder}/${srcFile}" file="${dest}" />
-	</target> 
-	
-    <target name="check-sum" if="md5" 
-        description="Verifies MD5 checksum, and fails if checksum doesn't match">
-        
-        <checksum file="${dest}" algorithm="MD5" verifyproperty="we.failed" property="${md5}" />
-        <fail message="${message}">
-			<condition>
-				<equals arg1="${we.failed}" arg2="false" />
-			</condition>
-		</fail>
-    </target>
-    
-    <target name="copy-downloaded-jar" if="destination.known">
-        <mkdir dir="${lib.dir}"/>
-        <copy file="${download.dir}/temp/${srcJarPath}" toFile="${destJarFile}" verbose="true"/>
-    </target>
-    
-    <target name="fail-with-message" if="we.failed" 
-        description="Conditionally fails with the specified message">                
-        <fail message="${message}"/>
-    </target>
-	
-	<!--
-	    closure - JS compiler, minimizer, etc.
-	-->
-	
-	<target name="closure-jar-check" description="Checks if closure jar exists.">
-	    <available file="${lib.dir}/google/closure-compiler/compiler.jar" property="closure.jar.exists" />
-	</target>
-	
-	<target name="closure-jar" depends="closure-jar-check" unless="closure.jar.exists" 
-	    description="Copies the closure build jars.">
-		<mkdir dir="${lib.dir}/google/closure-compiler" />
-        <antcall target="echo-closure-jar">
-            <param name="srcDomain" value="${closure.download.server}"/>
-            <param name="srcFolder" value="${closure.download.folder}"/>
-            <!--
-             erikdebruin: because of a dependency Falcon has on an old version of Guava,
-             any versions of the Closure compiler after sept. 17, 2012 cause exceptions
-             when doing a release build with FalconJx.
-             
-             Was: param name="zipFile" value="compiler-latest.zip"
-             -->
-            <param name="srcFile" value="${closure.download.filename}"/>
-        </antcall>
-	    <antcall target="download-jar">
-            <param name="srcDomain" value="${closure.download.server}"/>
-            <param name="srcFolder" value="${closure.download.folder}"/>
-	      <!-- 
-				erikdebruin: because of a dependency Falcon has on an old version of Guava, 
-				any versions of the Closure compiler after sept. 17, 2012 cause exceptions 
-				when doing a release build with FalconJx.
-				
-				Was: param name="zipFile" value="compiler-latest.zip"
-				-->
-	      <param name="srcFile" value="${closure.download.filename}"/>
-          <param name="cacheFolder" value="com/google/javascript/closure-compiler/v20131014"/>
-          <param name="destJarFile" value="${lib.dir}/google/closure-compiler/compiler.jar"/>
-          <param name="md5" value="${closure.download.checksum}"/>
-	    </antcall>
-	    <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/google/closure-compiler/closure-LICENSE.txt"/>
-	    <copy todir="${lib.dir}/google/closure-compiler">
-	        <fileset dir="${download.dir}/temp">
-	            <include name="${closure.name}.jar"/>
-	        </fileset>
-	    </copy>
-	    <delete includeemptydirs="true">
-	        <fileset dir="${download.dir}/temp" includes="**/*"/>
-	    </delete>    
-	</target>
-
-    <target name="echo-closure-jar" if="installer">
-        <echo file="${basedir}/closure.properties">closure.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-        <replace file="${basedir}/closure.properties" token="{0}" value="${srcFile}" />
-        <replace file="${basedir}/closure.properties" token="{1}" value="${srcDomain}/${srcFolder}" />
-        <property file="${basedir}/closure.properties" />
-        <delete file="${basedir}/closure.properties" />
-        <echo>${closure.echo}</echo>
-    </target>
-    
-	   <!--
-	        commons-io
-	    -->
-	    
-    <target name="commons-io-jar-check" description="Checks if commons-io.jar is in lib directory.">
-        <available file="${lib.dir}/commons-io.jar" property="commons.io.jar.exists"/>
-    </target>
-    
-    <target name="commons-io-jar-jx" depends="commons-io-jar-check" 
-        unless="commons.io.jar.exists" 
-        description="Copies commons-io.jar to the lib directory.">
-                
-        <antcall target="echo-commons-jar">
-            <param name="srcDomain" value="http://archive.apache.org"/>
-            <param name="srcFolder" value="dist/commons/io/binaries"/>
-            <param name="srcFile" value="${commons-io.name}-bin.tar.gz"/>
-        </antcall>
-        <antcall target="download-zip">
-          <param name="srcDomain" value="http://archive.apache.org"/>
-          <param name="srcFolder" value="dist/commons/io/binaries"/>
-          <param name="srcFile" value="${commons-io.name}-bin.tar.gz"/>
-          <param name="md5" value="4f2c26f9d80f89d15939619cc8524f78"/>
-          <param name="srcJarPath" value="${commons-io.name}/${commons-io.name}.jar"/>
-          <param name="destJarFile" value="${lib.dir}/commons-io.jar"/>
-        </antcall>
-        <copy todir="${lib.dir}">
-            <fileset dir="${download.dir}/temp/${commons-io.name}">
-                <include name="LICENSE.txt"/>
-            </fileset>            
-            <globmapper from="*" to="commons-io-*"/>
-        </copy>
-        <delete dir="${download.dir}/temp/${commons-io.name}"/>
-    </target>
-        
-    <target name="echo-commons-jar" if="installer">
-        <echo file="${basedir}/commons.properties">commons.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-        <replace file="${basedir}/commons.properties" token="{0}" value="${srcFile}" />
-        <replace file="${basedir}/commons.properties" token="{1}" value="${srcDomain}/${srcFolder}" />
-        <property file="${basedir}/commons.properties" />
-        <delete file="${basedir}/commons.properties" />
-        <echo>${commons.echo}</echo>
-    </target>
-    
-	<!--
-     guava - collections and other common constructs
-     -->
-    
-    <target name="guava-jar-check" description="Checks if guava.jar is in lib directory.">
-        <available file="${lib.dir}/guava.jar" property="guava.jar.exists"/>
-    </target>
-    
-    <target name="guava-jar" depends="guava-jar-check"
-        unless="guava.jar.exists"
-        description="Downloads and copies guava.jar to the lib directory.">
-        <echo file="${basedir}/guava.properties">guava.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-        <replace file="${basedir}/guava.properties" token="{0}" value="guava-15.0.jar" />
-        <replace file="${basedir}/guava.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=com/google/guava/guava/15.0" />
-        <property file="${basedir}/guava.properties" />
-        <delete file="${basedir}/guava.properties" />
-        <echo>${guava.echo}</echo>
-        <antcall target="download-jar">
-            <param name="srcDomain" value="http://search.maven.org"/>
-            <param name="srcFolder" value="remotecontent?filepath=com/google/guava/guava/15.0"/>
-            <param name="cacheFolder" value="com/google/guava/guava/15.0"/>
-            <param name="srcFile" value="guava-15.0.jar"/>
-            <param name="destJarFile" value="${lib.dir}/guava.jar"/>
-			<param name="md5" value="2c10bb2ca3ac8b55b0e77e54a7eb3744"/>
-        </antcall>
-        <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/guava-LICENSE.txt"/>
-    </target>
-    
-    <target name="args4j-jar-check" description="Checks if args4j.jar is in lib directory.">
-        <available file="${lib.dir}/args4j.jar" property="args4j.jar.exists"/>
-    </target>
+    <property name="closure.version" value="20140508"/>
+    <property name="closure.dest.folder" value="google/closure-compiler"/>
+    <property name="closure.dest.filename" value="${closure.name}.jar"/>
+    <antcall target="download-dependency-closure">
+      <param name="name" value="${closure.name}"/>
+      <param name="src.server" value="https://github.com"/>
+      <param name="src.folder" value="google/closure-compiler/archive"/>
+      <param name="src.filename" value="v${closure.version}.zip"/>
+      <param name="src.checksum" value="b4e4e20f32730b2aeb220e306f605236"/>
+      <param name="dest.folder" value="${closure.dest.folder}"/>
+      <param name="dest.filename" value="${closure.dest.filename}"/>
+    </antcall>
     
-    <target name="args4j-jar" depends="args4j-jar-check"
-        unless="args4j.jar.exists"
-        description="Downloads and copies args4j.jar to the lib directory.">
-        <echo file="${basedir}/args4j.properties">args4j.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-        <replace file="${basedir}/args4j.properties" token="{0}" value="args4j-2.0.16.jar" />
-        <replace file="${basedir}/args4j.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=args4j/args4j/2.0.16" />
-        <property file="${basedir}/args4j.properties" />
-        <delete file="${basedir}/args4j.properties" />
-        <echo>${args4j.echo}</echo>
-        <antcall target="download-jar">
-            <param name="srcDomain" value="http://search.maven.org"/>
-            <param name="srcFolder" value="remotecontent?filepath=args4j/args4j/2.0.16"/>
-            <param name="cacheFolder" value="args4j/args4j/2.0.16"/>
-            <param name="srcFile" value="args4j-2.0.16.jar"/>
-            <param name="destJarFile" value="${lib.dir}/args4j.jar"/>
-			<param name="md5" value="6571d69d142dd2a003c4ffae6138f0ee"/>
-        </antcall>
-        <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/args4j-LICENSE.txt"/>
-    </target>
-    
-    <target name="org.json-jar-check" description="Checks if org.json.jar is in lib directory.">
-        <available file="${lib.dir}/org.json.jar" property="org.json.jar.exists"/>
-    </target>
+    <!--  commons-io -->
+    <property name="commons-io.name" value="commons-io"/>
+    <property name="commons-io.version" value="2.4"/>
+    <!-- property name="commons-io.version" value="2.0.1"/ -->
+    <antcall target="download-dependency">
+      <param name="name" value="${commons-io.name}"/>
+      <param name="src.server" value="http://archive.apache.org"/>
+      <param name="src.folder" value="dist/commons/io/binaries"/>
+      <param name="src.filename" value="${commons-io.name}-${commons-io.version}-bin.tar.gz"/>
+      <param name="src.checksum" value="50ce698bd6e33dc6f71570189df89c99"/>
+      <!-- param name="src.checksum" value="89fef81c2adfa9b50a64ed5cd5d8c155"/ --><!-- version 2.0.1 -->
+      <param name="src.jarPath" value="${commons-io.name}-${commons-io.version}/${commons-io.name}-${commons-io.version}.jar"/>
+      <param name="dest.jarPath" value="${lib.dir}/${commons-io.name}.jar"/>
+      <param name="dest.folder" value=""/>
+      <param name="dest.filename" value="${commons-io.name}.jar"/>
+    </antcall>
+    <copy todir="${lib.dir}" failonerror="false" quiet="true">
+      <fileset dir="${download.dir}/temp/${commons-io.name}-${commons-io.version}">
+        <include name="LICENSE.txt"/>
+      </fileset>
+      <globmapper from="*" to="commons-io-*"/>
+    </copy>
+
+    <!--  guava -->
+    <property name="guava.name" value="guava"/>
+    <property name="guava.version" value="17.0"/>
+    <!-- property name="guava.version" value="15.0"/ -->
+    <antcall target="download-dependency">
+      <param name="name" value="${guava.name}"/>
+      <param name="src.server" value="${maven.search.url}"/>
+      <param name="src.folder" value="com/google/guava/guava/${guava.version}"/>
+      <param name="src.filename" value="guava-${guava.version}.jar"/>
+      <param name="src.checksum" value="89fef81c2adfa9b50a64ed5cd5d8c155"/>
+      <!-- param name="src.checksum" value="e0593b60af743a63f9678399d275272a"/ --><!-- version 2.0.16 -->
+      <param name="dest.folder" value=""/>
+      <param name="dest.filename" value="${guava.name}.jar"/>
+    </antcall>
+
+    <!--  org.json -->
+    <property name="org.json.name" value="org.json"/>
+    <property name="org.json.version" value="20131017"/>
+    <!-- property name="org.json.version" value="20130213"/ -->
+    <antcall target="download-dependency">
+      <param name="name" value="${org.json.name}"/>
+      <param name="src.server" value="${maven.search.url}"/>
+      <param name="src.folder" value="org/codeartisans/org.json/${org.json.version}"/>
+      <param name="src.filename" value="org.json-${org.json.version}.jar"/>
+      <param name="src.checksum" value="f1aa9ffeda57b9117e79407acc860e74"/>
+      <!-- param name="src.checksum" value="e0593b60af743a63f9678399d275272a"/ --><!-- version 20130213 -->
+      <param name="dest.folder" value=""/>
+      <param name="dest.filename" value="${org.json.name}.jar"/>
+    </antcall>
+  </target>
+
+
+
+  <!--
+      Utilities
+  -->
+
+  <target name="check-dependency" description="Checks if project jar is in lib directory.">
+    <available file="${lib.dir}/${dest.folder}/${name}.jar" property="project.jar.exists"/>
+  </target>
+
+  <target name="echo-project-jar" if="installer">
+    <echo file="${basedir}/project.properties">project.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
+    <replace file="${basedir}/project.properties" token="{0}" value="${srcFile}"/>
+    <replace file="${basedir}/project.properties" token="{1}" value="${srcPath}"/>
+    <property file="${basedir}/project.properties"/>
+    <delete file="${basedir}/project.properties"/>
+    <echo>${project.echo}</echo>
+  </target>
+  
+  <target name="download-dependency" depends="check-dependency" unless="project.jar.exists" description="Downloads a jar + license to the lib directory.">
+    <antcall target="echo-project-jar">
+      <param name="srcDomain" value="${src.server}"/>
+      <param name="srcPath" value="${src.folder}/${src.filename}"/>
+    </antcall>
+    <mkdir dir="${lib.dir}/${dest.folder}"/>
+
+    <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/${dest.folder}/${name}-LICENSE.txt"/>
+
+    <condition property="project.download.jar" value="true" else="false">
+      <contains string="${src.filename}" substring=".jar" />
+    </condition>
     
-    <target name="org.json-jar" depends="org.json-jar-check"
-        unless="org.json.jar.exists"
-        description="Downloads and copies org.json.jar to the lib directory.">
-        <echo file="${basedir}/org.json.properties">org.json.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-        <replace file="${basedir}/org.json.properties" token="{0}" value="org.json-20130213.jar" />
-        <replace file="${basedir}/org.json.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=org/codeartisans/org.json/20130213" />
-        <property file="${basedir}/org.json.properties" />
-        <delete file="${basedir}/org.json.properties" />
-        <echo>${org.json.echo}</echo>
-        <antcall target="download-jar">
-            <param name="srcDomain" value="http://search.maven.org"/>
-            <param name="srcFolder" value="remotecontent?filepath=org/codeartisans/org.json/20130213"/>
-            <param name="cacheFolder" value="org/codeartisans/org.json/20130213"/>
-            <param name="srcFile" value="org.json-20130213.jar"/>
-            <param name="destJarFile" value="${lib.dir}/org.json.jar"/>
-			<param name="md5" value="a865b42221d2687244a679fa4e5425d5"/>
-        </antcall>
-        <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/org.json-LICENSE.txt"/>
-    </target>
+    <antcall target="download-dependency-jar">
+      <param name="server" value="${src.server}"/>
+      <param name="folder" value="${src.folder}"/>
+      <param name="srcFileName" value="${src.filename}"/>
+      <param name="destJarFileName" value="${lib.dir}/${dest.folder}/${dest.filename}"/>
+      <param name="checksum" value="${src.checksum}"/>
+    </antcall>
+
+    <antcall target="download-dependency-zip">
+      <param name="server" value="${src.server}"/>
+      <param name="folder" value="${src.folder}"/>
+      <param name="srcFileName" value="${src.filename}"/>
+      <param name="srcJarPath" value="${src.jarPath}"/>
+      <param name="destJarPath" value="${dest.jarPath}"/>
+      <param name="checksum" value="${src.checksum}"/>
+    </antcall>
+  </target>
+
+  <target name="download-dependency-closure" depends="check-dependency" unless="project.jar.exists" description="Downloads a jar + license to the lib directory.">
+    <antcall target="echo-project-jar">
+      <param name="srcDomain" value="${src.server}"/>
+      <param name="srcPath" value="${src.folder}/${src.filename}"/>
+    </antcall>
+    <mkdir dir="${lib.dir}/${dest.folder}"/>
+
+    <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/${dest.folder}/${name}-LICENSE.txt"/>
+
+    <antcall target="download-dependency-zip-closure">
+      <param name="server" value="${src.server}"/>
+      <param name="folder" value="${src.folder}"/>
+      <param name="srcFileName" value="${src.filename}"/>
+      <param name="checksum" value="${src.checksum}"/>
+    </antcall>
+
+    <ant dir="${download.dir}/temp/closure-compiler-${closure.version}" inheritAll="false" />
+
+    <copy file="${download.dir}/temp/closure-${closure.name}-${closure.version}/build/${closure.name}.jar" toFile="${lib.dir}/${closure.dest.folder}/${closure.dest.filename}" verbose="true"/>
+  </target>
+
+  <target name="download-dependency-jar" if="${project.download.jar}" description="Downloads a jar to the lib directory.">
+    <antcall target="download-jar">
+      <param name="srcDomain" value="${server}"/>
+      <param name="srcFolder" value="${folder}"/>
+      <param name="cacheFolder" value="${folder}"/>
+      <param name="srcFile" value="${srcFileName}"/>
+      <param name="destJarFile" value="${destJarFileName}"/>
+      <param name="md5" value="${checksum}"/>
+    </antcall>
+  </target>
+
+  <target name="download-dependency-zip" unless="${project.download.jar}" description="Downloads a zip to the lib directory.">
+    <antcall target="download-zip">
+      <param name="srcDomain" value="${server}"/>
+      <param name="srcFolder" value="${folder}"/>
+      <param name="srcFile" value="${srcFileName}"/>
+      <param name="srcJarPath" value="${srcJarPath}"/>
+      <param name="destJarFile" value="${destJarPath}"/>
+      <param name="md5" value="${checksum}"/>
+    </antcall>
+  </target>
+
+  <target name="download-dependency-zip-closure" unless="${project.download.jar}" description="Downloads a zip to the lib directory.">
+    <antcall target="download-zip">
+      <param name="srcDomain" value="${server}"/>
+      <param name="srcFolder" value="${folder}"/>
+      <param name="srcFile" value="${srcFileName}"/>
+      <param name="md5" value="${checksum}"/>
+    </antcall>
+  </target>
     
-    <!--
-		Cleanup
-	-->
-	
-    <target name="clean" 
-        description="Removes thirdparty downloads.">
+  <!--
+      Download a zip or gz file, extracts the jar file, and optionally copies the jar
+      file to a different location and optinally verifies the checksum and optionally
+      caches the file, and optionally pulls the file from the cache instead of downloading.  
+      If the checksum fails, this script fails.
+
+      Params are:
+          srcDomain - the domain
+          srcFolder - path to file
+          srcFile - a .gz file for untar with gzip, else unzip
+          [md5]
+          [srcJarPath] - both src and dest required for the copy
+          [destJarFile]
+
+      Note: This is purposely coded without <if><else><then> so that a dependency on
+      ant-contrib.jar isn't required.        
+  -->
+  <target name="download-zip" depends="check-cache" description="Downloads tar/zip, and optionally verifies checksum and copies extracted jar.">
+    <mkdir dir="${download.dir}"/>
+    <antcall target="get-if-not-cached">
+      <param name="dest" value="${download.dir}/${srcFile}"/>
+      <param name="message" value="Checksum mismatch for ${download.dir}/${srcFile}"/>
+    </antcall>
+    <antcall target="copy-if-cached">
+      <param name="dest" value="${download.dir}/${srcFile}"/>
+    </antcall>
+    <condition property="zip.compressed">
+      <matches string="${srcFile}" pattern="^*.zip$"/>
+    </condition>
+    <antcall target="untar-file"/>
+    <antcall target="unzip-file"/>
+    <condition property="destination.known">
+      <and>
+        <isset property="srcJarPath"/>
+        <isset property="destJarFile"/>
+      </and>
+    </condition>
+    <antcall target="copy-downloaded-jar"/>
+  </target>
+
+  <target name="download-bz2" depends="check-cache" description="Downloads bz2, and optionally verifies checksum and copies extracted jar.">
+    <mkdir dir="${download.dir}"/>
+    <antcall target="get-if-not-cached">
+      <param name="dest" value="${download.dir}/${srcFile}"/>
+      <param name="message" value="Checksum mismatch for ${download.dir}/${srcFile}"/>
+    </antcall>
+    <antcall target="copy-if-cached">
+      <param name="dest" value="${download.dir}/${srcFile}"/>
+    </antcall>
+    <untar src="${download.dir}/${srcFile}" dest="${download.dir}/temp" compression="bzip2"/>
+    <condition property="destination.known">
+      <and>
+        <isset property="srcJarPath"/>
+        <isset property="destJarFile"/>
+      </and>
+    </condition>
+    <antcall target="copy-downloaded-jar"/>
+  </target>
+
+  <!--
+      Download a jar file and optionally verify the checksum.
+      If the checksum fails, this script fails.
         
-        <delete failonerror="false" includeEmptyDirs="true">
-            <fileset dir="${download.dir}" />
-        </delete>
-    </target>
+      Params are:
+          srcDomain
+          srcFolder
+          srcFile
+          destJarFile
+          [md5]
+  -->
+  <target name="download-jar" depends="check-cache" description="Downloads jar, and optionally verifies checksum.">
+    <antcall target="get-if-not-cached">
+      <param name="dest" value="${destJarFile}"/>
+      <param name="message" value="Checksum mismatch for ${destJarFile}"/>
+    </antcall>
+    <antcall target="copy-if-cached">
+      <param name="dest" value="${destJarFile}"/>
+    </antcall>
+  </target>
+
+  <target name="untar-file" unless="zip.compressed" description="Untars zipFile">
+    <untar src="${download.dir}/${srcFile}" dest="${download.dir}/temp" compression="gzip"/>
+  </target>
+
+  <target name="unzip-file" if="zip.compressed" description="Unzips zipFile">
+    <unzip src="${download.dir}/${srcFile}" dest="${download.dir}/temp"/>
+  </target>
+
+  <target name="get-if-not-cached" unless="found-in-cache">
+    <get src="${srcDomain}/${srcFolder}/${srcFile}" dest="${dest}"/>
+    <antcall target="check-sum">
+      <param name="dest" value="${dest}"/>
+      <param name="message" value="Checksum mismatch for ${dest}"/>
+    </antcall>
+    <antcall target="put-in-cache"/>
+  </target>
+
+  <target name="copy-if-cached" if="found-in-cache">
+    <!-- this string comes from the FlexJS en_US.properties because for now, this
+         target won't get called unless this script is called from the FlexJS install -->
+    <echo>${INFO_USING_CACHED_FILE} ${downloadCacheFolder}/${srcFolder}/${srcFile}</echo>
+    <copy file="${downloadCacheFolder}/${srcFolder}/${srcFile}" tofile="${dest}" overwrite="true"/>
+  </target>
+
+  <target name="check-cache" if="usingDownloadCache">
+    <available file="${downloadCacheFolder}/${srcFolder}/${srcFile}" property="found-in-cache"/>
+  </target>
+
+  <target name="put-in-cache" if="usingDownloadCache">
+    <copy tofile="${downloadCacheFolder}/${srcFolder}/${srcFile}" file="${dest}"/>
+  </target>
+
+  <target name="check-sum" if="md5" description="Verifies MD5 checksum, and fails if checksum doesn't match">
+    <checksum file="${dest}" algorithm="MD5" verifyproperty="we.failed" property="${md5}"/>
+    <fail message="${message}">
+      <condition>
+        <equals arg1="${we.failed}" arg2="false"/>
+      </condition>
+    </fail>
+  </target>
+
+  <target name="copy-downloaded-jar" if="destination.known">
+    <mkdir dir="${lib.dir}"/>
+    <copy file="${download.dir}/temp/${srcJarPath}" toFile="${destJarFile}" verbose="true"/>
+  </target>
+
+  <target name="fail-with-message" if="we.failed" description="Conditionally fails with the specified message">
+    <fail message="${message}"/>
+  </target>
+
+
+
+  <!--
+      Cleanup
+  -->
+  <target name="clean" description="Removes thirdparty downloads.">
+    <delete failonerror="false" includeEmptyDirs="true">
+      <fileset dir="${download.dir}"/>
+    </delete>
+  </target>
     
 </project>

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/ac765e63/compiler/downloads.xml
----------------------------------------------------------------------
diff --git a/compiler/downloads.xml b/compiler/downloads.xml
index 1b25be9..bb02c0c 100644
--- a/compiler/downloads.xml
+++ b/compiler/downloads.xml
@@ -17,479 +17,426 @@
   limitations under the License.
 
 -->
-
 <project name="downloads" default="main" basedir=".">
-	<property name="FALCON_HOME" location="."/>
 
-	<!-- this script supports the usingDownloadCache property and
-	     downloadCacheFolder property to cache downloads in the
-		 folder specified by downloadCacheFolder.  This can make
-		 a huge difference in future runs although there is some
-		 risk around caching bad downloads and/or needing to
-		 clean up the cache -->
+  <!--
+      Notes:
+          For Apache, the JARS must be removed from the repository.
 
-	<!-- properties -->
-	<!--<property file="${FALCON_HOME}/build.properties"/>-->
+          Licenses:
+              antlr (3) - BSD
+              commons-cli (1.2) - Apache 2.0
+              commons-io (2.0.1) - Apache 2.0
+              guava (15.0) - Apache 2.0
+              JBurg (1.10.1) - CPL 1.0
+              lzma-sdk (9.2) - Public Domain
+  -->
 
-    <property name="lib.dir" value="${FALCON_HOME}/lib"/>
-    
-	<property name="download.dir" value="${FALCON_HOME}/in"/>
-    
-	<!-- 
-	   Notes:
-	       For Apache, the JARS must be removed from the repository.
-	       
-	       Licenses:
-            antlr (3) - BSD
-	        commons-cli (1.2) - Apache 2.0
-	        commons-io (2.0.1) - Apache 2.0
-	        guava (15.0) - Apache 2.0
-            JBurg (1.10.1) - CPL 1.0
-	        lzma-sdk (9.2) - Public Domain
-	        
-	-->
-	
+  <!-- this script supports the usingDownloadCache property and
+       downloadCacheFolder property to cache downloads in the
+       folder specified by downloadCacheFolder.  This can make
+       a huge difference in future runs although there is some
+       risk around caching bad downloads and/or needing to
+       clean up the cache -->
+
+  <property name="FALCONJX_HOME" location="."/>
+
+  <property name="lib.dir" value="${FALCONJX_HOME}/lib"/>
+  <property name="download.dir" value="${FALCONJX_HOME}/in"/>
+
+  <property file="${basedir}/local.properties"/>
+
+  <property name="maven.search.url" value="http://search.maven.org/remotecontent?filepath="/>
+
+
+
+  <!-- 
+      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, all" description="Downloads all the required thirdparty JARs"/>
+  
+  <target name="prepare">
+    <echo message="Making lib directory ${lib.dir}"/>
+    <mkdir dir="${lib.dir}"/>
+  </target>
+
+
+
+  <!--
+      Downloads
+  -->
+
+  <target name="all" description="Downloads and copies all dependencies to the lib directory.">
+
+    <!--  antlr -->
     <property name="antlr.name" value="antlr"/>
-    <property name="commons-cli.name" value="commons-cli-1.2"/>
-    <property name="commons-io.name" value="commons-io-2.0.1"/>	
-    <property name="guava.name" value="guava-15.0"/>
-    <property name="jflex.name" value="jflex-1.5.1"/>
-    <property name="jburg.name" value="jburg-1.10.1"/>
-    <property name="lzma.name" value="lzma-sdk-9.2"/>
-    <!--<property name="antlr.src.url" value="http://antlr3.org/download"/>-->
-    <!--<property name="antlr.src.file" value="antlr-3.3-complete.jar"/>-->
-    <property name="antlr.src.url" value="http://search.maven.org"/>
-    <property name="antlr.src.folder" value="remotecontent?filepath=org/antlr/antlr-complete/3.5.2"/>
-    <property name="antlr.cache.folder" value="org/antlr/antlr-complete/3.5.2"/>
-    <property name="antlr.src.file" value="antlr-complete-3.5.2.jar"/>
-	   
-    <property name="INFO_DOWNLOADING_FILE_FROM" value="Downloading {0} from: {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, antlr-jar, commons-jars, guava-jar, jflex-jar, jburg-jar, lzma-jar" 
-		description="Downloads all the required thirdparty JARs"/>
+    <property name="antlr.version" value="3.5.2"/>
+    <antcall target="download-dependency">
+      <param name="name" value="${antlr.name}"/>
+      <param name="src.server" value="${maven.search.url}"/>
+      <param name="src.folder" value="org/antlr/antlr-complete/${antlr.version}"/>
+      <param name="src.filename" value="antlr-complete-${antlr.version}.jar"/>
+      <param name="src.checksum" value="acfa69f928a0f1653555bda73091efca"/>
+      <param name="dest.folder" value=""/>
+      <param name="dest.filename" value="${antlr.name}.jar"/>
+      <param name="license.use.apache" value="false"/>
+      <param name="license.use.url" value="http://www.antlr.org/license.html"/>
+    </antcall>
 
-    <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="antlr*/**"/>
-                <include name="commons-cli*/**"/>
-                <include name="commons-io*/**"/>
-                <include name="guava*/**"/>
-                <include name="jflex*/**"/>
-                <include name="jburg*/**"/>
-                <include name="lzma*/**"/>
-            </fileset>
-        </delete>
-    </target>
-    
-    <!--
-	    Download thirdparty JARs    
-	-->
-
-    <!--
-        Download a zip or gz file, extracts the jar file, and optionally copies the jar
-        file to a different location and optinally verifies the checksum and optionally
-		caches the file, and optionally pulls the file from the cache instead of downloading.  
-        If the checksum fails, this script fails.
-
-        Params are:
-            srcDomain - the domain
-			srcFolder - path to file
-			cacheFolder - path to file in cache (usually srcFolder minus illegal characters)
-            srcFile - a .gz file for untar with gzip, else unzip
-            [md5]
-            [srcJarPath] - both src and dest required for the copy
-            [destJarFile]
-
-        Note: This is purposely coded without <if><else><then> so that a dependency on
-        ant-contrib.jar isn't required.        
-    -->
-    
-    <target name="download-zip" depends="check-cache"
-        description="Downloads tar/zip, and optionally verifies checksum and copies extracted jar.">                
-        
-        <mkdir dir="${download.dir}"/>        
-    	
-        <antcall target="get-if-not-cached">
-			<param name="dest" value="${download.dir}/${srcFile}"/>
-            <param name="message" value="Checksum mismatch for ${download.dir}/${srcFile}"/>
-		</antcall>
-		<antcall target="copy-if-cached">
-			<param name="dest" value="${download.dir}/${srcFile}"/>
-		</antcall>
-        
-        <condition property="zip.compressed">
-            <matches string="${srcFile}" pattern="^*.zip$"/>      
-        </condition>
- 
-        <antcall target="untar-file"/>
-        <antcall target="unzip-file"/>
-        
-        <condition property="destination.known">
-            <and>
-                <isset property="srcJarPath"/>
-                <isset property="destJarFile"/>
-            </and>
-        </condition> 
-        <antcall target="copy-downloaded-jar"/>
-     </target>   	
-     
-    <target name="download-bz2" depends="check-cache"
-        description="Downloads bz2, and optionally verifies checksum and copies extracted jar.">                
-        
-        <mkdir dir="${download.dir}"/>        
-    	
-        <antcall target="get-if-not-cached">
-			<param name="dest" value="${download.dir}/${srcFile}"/>
-            <param name="message" value="Checksum mismatch for ${download.dir}/${srcFile}"/>
-		</antcall>
-		<antcall target="copy-if-cached">
-			<param name="dest" value="${download.dir}/${srcFile}"/>
-		</antcall>
-
-        <untar src="${download.dir}/${srcFile}" dest="${download.dir}/temp" compression="bzip2"/> 
-                
-        <condition property="destination.known">
-            <and>
-                <isset property="srcJarPath"/>
-                <isset property="destJarFile"/>
-            </and>
-        </condition> 
-        <antcall target="copy-downloaded-jar"/>
-     </target>   	
-     
-    <!--
-        Download a jar file and optionally verify the checksum.
-        If the checksum fails, this script fails.
-        
-        Params are:
-            srcDomain
-			srcFolder
-            srcFile
-            destJarFile
-            [md5]
-    -->
-    <target name="download-jar" depends="check-cache"
-        description="Downloads jar, and optionally verifies checksum.">                
-     
-        <antcall target="get-if-not-cached">
-			<param name="dest" value="${destJarFile}"/>
-            <param name="message" value="Checksum mismatch for ${destJarFile}"/>
-		</antcall>
-		<antcall target="copy-if-cached">
-			<param name="dest" value="${destJarFile}"/>
-		</antcall>
-    </target>
-
-    <target name="untar-file" unless="zip.compressed" description="Untars zipFile">
-        <untar src="${download.dir}/${srcFile}" dest="${download.dir}/temp" compression="gzip"/> 
-    </target>
-    
-    <target name="unzip-file" if="zip.compressed" description="Unzips zipFile">
-        <unzip src="${download.dir}/${srcFile}" dest="${download.dir}/temp"/>    
-    </target>
-    
-    <target name="get-if-not-cached" unless="found-in-cache"> 
-        <get src="${srcDomain}/${srcFolder}/${srcFile}" dest="${dest}"/>
-        <antcall target="check-sum">
-			<param name="dest" value="${dest}" />
-            <param name="message" value="Checksum mismatch for ${dest}"/>
-        </antcall>
-		<antcall target="put-in-cache" />
-	</target>
-	
-    <target name="copy-if-cached" if="found-in-cache">
-		<!-- this string comes from the FlexJS en_US.properties because for now, this
-		     target won't get called unless this script is called from the FlexJS install -->
-		<echo>${INFO_USING_CACHED_FILE} ${downloadCacheFolder}/${cacheFolder}/${srcFile}</echo>
-		<copy file="${downloadCacheFolder}/${cacheFolder}/${srcFile}" tofile="${dest}" overwrite="true"/>
-	</target> 
-	
-    <target name="check-cache" if="usingDownloadCache">
-		<available file="${downloadCacheFolder}/${cacheFolder}/${srcFile}" property="found-in-cache" />
-	</target> 
-	
-    <target name="put-in-cache" if="usingDownloadCache">
-		<copy tofile="${downloadCacheFolder}/${cacheFolder}/${srcFile}" file="${dest}" />
-	</target> 
-	
-    <target name="check-sum" if="md5" 
-        description="Verifies MD5 checksum, and fails if checksum doesn't match">
-        
-        <checksum file="${dest}" algorithm="MD5" verifyproperty="we.failed" property="${md5}" />
-        <fail message="${message}">
-			<condition>
-				<equals arg1="${we.failed}" arg2="false" />
-			</condition>
-		</fail>
-    </target>
-        
-    <target name="copy-downloaded-jar" if="destination.known">
-        <mkdir dir="${lib.dir}"/>
-        <copy file="${download.dir}/temp/${srcJarPath}" toFile="${destJarFile}" verbose="true"/>
-    </target>
-    
-    <target name="fail-with-message" if="we.failed" 
-        description="Conditionally fails with the specified message">                
-        <fail message="${message}"/>
-    </target>
-        
-    <!--
-        antlr
-    -->
+    <!--  commons-cli -->
+    <property name="commons-cli.name" value="commons-cli"/>
+    <property name="commons-cli.version" value="1.2"/>
+    <antcall target="download-dependency">
+      <param name="name" value="${commons-cli.name}"/>
+      <param name="src.server" value="http://archive.apache.org"/>
+      <param name="src.folder" value="dist/commons/cli/binaries"/>
+      <param name="src.filename" value="${commons-cli.name}-${commons-cli.version}-bin.tar.gz"/>
+      <param name="src.checksum" value="a05956c9ac8bacdc2b8d07fb2cb331ce"/>
+      <param name="src.jarPath" value="${commons-cli.name}-${commons-cli.version}/${commons-cli.name}-${commons-cli.version}.jar"/>
+      <param name="dest.jarPath" value="${lib.dir}/${commons-cli.name}.jar"/>
+      <param name="dest.folder" value=""/>
+      <param name="dest.filename" value="${commons-cli.name}.jar"/>
+      <param name="license.use.apache" value="false"/>
+    </antcall>
+    <copy todir="${lib.dir}" failonerror="false" quiet="true">
+      <fileset dir="${download.dir}/temp/${commons-cli.name}-${commons-cli.version}">
+        <include name="LICENSE.txt"/>
+      </fileset>
+      <globmapper from="*" to="commons-cli-*"/>
+    </copy>
+
+    <!--  commons-io -->
+    <property name="commons-io.name" value="commons-io"/>
+    <property name="commons-io.version" value="2.4"/>
+    <!-- property name="commons-io.version" value="2.0.1"/ -->
+    <antcall target="download-dependency">
+      <param name="name" value="${commons-io.name}"/>
+      <param name="src.server" value="http://archive.apache.org"/>
+      <param name="src.folder" value="dist/commons/io/binaries"/>
+      <param name="src.filename" value="${commons-io.name}-${commons-io.version}-bin.tar.gz"/>
+      <param name="src.checksum" value="50ce698bd6e33dc6f71570189df89c99"/>
+      <!-- param name="src.checksum" value="89fef81c2adfa9b50a64ed5cd5d8c155"/ --><!-- version 2.0.1 -->
+      <param name="src.jarPath" value="${commons-io.name}-${commons-io.version}/${commons-io.name}-${commons-io.version}.jar"/>
+      <param name="dest.jarPath" value="${lib.dir}/${commons-io.name}.jar"/>
+      <param name="dest.folder" value=""/>
+      <param name="dest.filename" value="${commons-io.name}.jar"/>
+      <param name="license.use.apache" value="false"/>
+    </antcall>
+    <copy todir="${lib.dir}" failonerror="false" quiet="true">
+      <fileset dir="${download.dir}/temp/${commons-io.name}-${commons-io.version}">
+        <include name="LICENSE.txt"/>
+      </fileset>
+      <globmapper from="*" to="commons-io-*"/>
+    </copy>
+
+    <!--  guava -->
+    <property name="guava.name" value="guava"/>
+    <property name="guava.version" value="17.0"/>
+    <!-- property name="guava.version" value="15.0"/ -->
+    <antcall target="download-dependency">
+      <param name="name" value="${guava.name}"/>
+      <param name="src.server" value="${maven.search.url}"/>
+      <param name="src.folder" value="com/google/guava/guava/${guava.version}"/>
+      <param name="src.filename" value="guava-${guava.version}.jar"/>
+      <param name="src.checksum" value="89fef81c2adfa9b50a64ed5cd5d8c155"/>
+      <!-- param name="src.checksum" value="e0593b60af743a63f9678399d275272a"/ --><!-- version 2.0.16 -->
+      <param name="dest.folder" value=""/>
+      <param name="dest.filename" value="${guava.name}.jar"/>
+      <param name="license.use.apache" value="true"/>
+    </antcall>
+
+    <!--  jburg -->
+    <property name="jburg.name" value="jburg"/>
+    <!-- property name="jburg.version" value="1.22"/ -->
+    <property name="jburg.version" value="1.10.1"/>
+    <antcall target="download-dependency">
+      <param name="name" value="${jburg.name}"/>
+      <param name="src.server" value="http://downloads.sourceforge.net"/>
+      <param name="src.folder" value="project/jburg"/>
+      <param name="src.filename" value="${jburg.name}-${jburg.version}.tar.gz"/>
+      <!-- param name="src.checksum" value="5cd6bd4d66a6fec4cc2ddab5bb9f2e90"/ --><!-- version 1.22 -->
+      <param name="src.checksum" value="76830ee877cac40b981779325b3fa89f"/><!-- version 1.10.1 -->
+      <param name="src.jarPath" value="lib/${jburg.name}.jar"/>
+      <param name="dest.jarPath" value="${lib.dir}/${jburg.name}.jar"/>
+      <param name="dest.folder" value=""/>
+      <param name="dest.filename" value="${jburg.name}.jar"/>
+      <param name="license.use.apache" value="false"/>
+    </antcall>
+    <copy todir="${lib.dir}" failonerror="false" quiet="true">
+      <fileset dir="${download.dir}/temp">
+        <include name="LICENSE"/>
+      </fileset>
+      <globmapper from="*" to="jburg-*.txt"/>
+    </copy>
+
+    <!--  jflex -->
+    <property name="jflex.name" value="jflex"/>
+    <property name="jflex.version" value="1.6.0"/>
+    <!-- property name="jflex.version" value="1.5.1"/ -->
+    <antcall target="download-dependency">
+      <param name="name" value="${jflex.name}"/>
+      <param name="version" value="${jflex.version}"/>
+      <param name="src.server" value="http://jflex.de"/>
+      <param name="src.folder" value="."/>
+      <param name="src.filename" value="${jflex.name}-${jflex.version}.tar.gz"/>
+      <param name="src.checksum" value="df8cc9ca50b549bf705bd23479c100dc"/>
+      <!-- param name="src.checksum" value="c388c909eb0024d546489a89e608e096"/ --><!-- version 1.5.1 -->
+      <param name="src.jarPath" value="${jflex.name}-${jflex.version}/lib/${jflex.name}-${jflex.version}.jar"/>
+      <param name="dest.jarPath" value="${lib.dir}/${jflex.name}.jar"/>
+      <param name="dest.folder" value=""/>
+      <param name="dest.filename" value="${jflex.name}.jar"/>
+      <param name="license.use.apache" value="false"/>
+    </antcall>
+    <copy todir="${lib.dir}" failonerror="false" quiet="true">
+      <fileset dir="${download.dir}/temp/${jflex.name}-${jflex.version}">
+        <include name="COPYRIGHT"/>
+      </fileset>
+      <globmapper from="*" to="jflex-*"/>
+    </copy>
+
+    <!--  lzma -->
+    <property name="lzma.name" value="lzma"/>
+    <property name="lzma.version" value="9.20"/>
+    <antcall target="download-dependency">
+      <param name="name" value="${lzma.name}-sdk"/>
+      <param name="version" value="${lzma.version}"/>
+      <param name="src.server" value="http://www.java2s.com"/>
+      <param name="src.folder" value="Code/JarDownload/lzma"/>
+      <param name="src.filename" value="${lzma.name}-${lzma.version}.jar.zip"/>
+      <param name="src.checksum" value="d5f7343bbd03bf1c4a4806b372cc5354"/>
+      <param name="src.jarPath" value="${lzma.name}-${lzma.version}.jar"/>
+      <param name="dest.jarPath" value="${lib.dir}/${lzma.name}-sdk.jar"/>
+      <param name="dest.folder" value=""/>
+      <param name="dest.filename" value="${lzma.name}-sdk.jar"/>
+      <param name="license.use.apache" value="false"/>
+      <param name="license.use.url" value="http://www.7-zip.org/sdk.html"/>
+    </antcall>
     
-    <target name="antlr-jar-check" description="Checks if antlr jar exists.">
-    	<condition property="antlr.jar.exists">
-    	    <and>
-    	        <available file="${lib.dir}/antlr.jar"/>
-    	    </and>
-        </condition>
-    </target>
+  </target>
+
+
+
+  <!--
+      Utilities
+  -->
+
+  <target name="check-dependency" description="Checks if project jar is in lib directory.">
+    <available file="${lib.dir}/${dest.folder}/${name}.jar" property="project.jar.exists"/>
+  </target>
+
+  <target name="echo-project-jar" if="installer">
+    <echo file="${basedir}/project.properties">project.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
+    <replace file="${basedir}/project.properties" token="{0}" value="${srcFile}"/>
+    <replace file="${basedir}/project.properties" token="{1}" value="${srcPath}"/>
+    <property file="${basedir}/project.properties"/>
+    <delete file="${basedir}/project.properties"/>
+    <echo>${project.echo}</echo>
+  </target>
+  
+  <target name="download-dependency" depends="check-dependency" unless="project.jar.exists" description="Downloads a jar + license to the lib directory.">
+    <antcall target="echo-project-jar">
+      <param name="srcDomain" value="${src.server}"/>
+      <param name="srcPath" value="${src.folder}/${src.filename}"/>
+    </antcall>
+    <mkdir dir="${lib.dir}/${dest.folder}"/>
+
+    <antcall target="download-apache-license" />
+    <antcall target="download-other-license" />
+
+    <condition property="project.download.jar" value="false" else="true">
+      <or>
+        <contains string="${src.filename}" substring=".tar" />
+        <contains string="${src.filename}" substring=".zip" />
+      </or>
+    </condition>
     
-    <target name="antlr-jar" depends="antlr-jar-check" unless="antlr.jar.exists"
-        description="Copies the antlr jar to the lib directory.">
-        <echo file="${basedir}/antlr.properties">antlr.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-        <replace file="${basedir}/antlr.properties" token="{0}" value="${antlr.src.file}" />
-        <replace file="${basedir}/antlr.properties" token="{1}" value="${antlr.src.url}/${antlr.src.folder}" />
-        <property file="${basedir}/antlr.properties" />
-        <delete file="${basedir}/antlr.properties" />
-        <echo>${antlr.echo}</echo>
-        <antcall target="antlr-download-jar"/>
-        <echo file="${lib.dir}/antlr-LICENSE.TXT">http://www.antlr.org/license.html</echo> 
-    </target>
+    <antcall target="download-dependency-jar">
+      <param name="server" value="${src.server}"/>
+      <param name="folder" value="${src.folder}"/>
+      <param name="srcFileName" value="${src.filename}"/>
+      <param name="destJarFileName" value="${lib.dir}/${dest.folder}/${dest.filename}"/>
+      <param name="checksum" value="${src.checksum}"/>
+    </antcall>
+
+    <antcall target="download-dependency-zip">
+      <param name="server" value="${src.server}"/>
+      <param name="folder" value="${src.folder}"/>
+      <param name="srcFileName" value="${src.filename}"/>
+      <param name="srcJarPath" value="${src.jarPath}"/>
+      <param name="destJarPath" value="${dest.jarPath}"/>
+      <param name="checksum" value="${src.checksum}"/>
+    </antcall>
+  </target>
+
+  <target name="download-apache-license" if="${license.use.apache}" description="Downloads the Apache license to the lib directory.">
+    <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/${dest.folder}/${name}-LICENSE.html"/>
+  </target>
+  
+  <target name="download-other-license" if="license.use.url" description="Downloads a non-Apache license to the lib directory.">
+    <get src="${license.use.url}" dest="${lib.dir}/${dest.folder}/${name}-LICENSE.html"/>
+  </target>
+  
+  <target name="download-dependency-jar" if="${project.download.jar}" description="Downloads a jar to the lib directory.">
+    <antcall target="download-jar">
+      <param name="srcDomain" value="${server}"/>
+      <param name="srcFolder" value="${folder}"/>
+      <param name="cacheFolder" value="${folder}"/>
+      <param name="srcFile" value="${srcFileName}"/>
+      <param name="destJarFile" value="${destJarFileName}"/>
+      <param name="md5" value="${checksum}"/>
+    </antcall>
+  </target>
+
+  <target name="download-dependency-zip" unless="${project.download.jar}" description="Downloads a zip to the lib directory.">
+    <antcall target="download-zip">
+      <param name="srcDomain" value="${server}"/>
+      <param name="srcFolder" value="${folder}"/>
+      <param name="srcFile" value="${srcFileName}"/>
+      <param name="srcJarPath" value="${srcJarPath}"/>
+      <param name="destJarFile" value="${destJarPath}"/>
+      <param name="md5" value="${checksum}"/>
+    </antcall>
+  </target>
     
-    <target name="antlr-download-jar" depends="antlr-jar-check" unless="antlr.jar.exists"
-        description="Downloads the antlr jars.">
+  <!--
+      Download a zip or gz file, extracts the jar file, and optionally copies the jar
+      file to a different location and optinally verifies the checksum and optionally
+      caches the file, and optionally pulls the file from the cache instead of downloading.  
+      If the checksum fails, this script fails.
+
+      Params are:
+          srcDomain - the domain
+          srcFolder - path to file
+          srcFile - a .gz file for untar with gzip, else unzip
+          [md5]
+          [srcJarPath] - both src and dest required for the copy
+          [destJarFile]
+
+      Note: This is purposely coded without <if><else><then> so that a dependency on
+      ant-contrib.jar isn't required.        
+  -->
+  <target name="download-zip" depends="check-cache" description="Downloads tar/zip, and optionally verifies checksum and copies extracted jar.">
+    <mkdir dir="${download.dir}"/>
+    <antcall target="get-if-not-cached">
+      <param name="dest" value="${download.dir}/${srcFile}"/>
+      <param name="message" value="Checksum mismatch for ${download.dir}/${srcFile}"/>
+    </antcall>
+    <antcall target="copy-if-cached">
+      <param name="dest" value="${download.dir}/${srcFile}"/>
+    </antcall>
+    <condition property="zip.compressed">
+      <matches string="${srcFile}" pattern="^*.zip$"/>
+    </condition>
+    <antcall target="untar-file"/>
+    <antcall target="unzip-file"/>
+    <condition property="destination.known">
+      <and>
+        <isset property="srcJarPath"/>
+        <isset property="destJarFile"/>
+      </and>
+    </condition>
+    <antcall target="copy-downloaded-jar"/>
+  </target>
+
+  <target name="download-bz2" depends="check-cache" description="Downloads bz2, and optionally verifies checksum and copies extracted jar.">
+    <mkdir dir="${download.dir}"/>
+    <antcall target="get-if-not-cached">
+      <param name="dest" value="${download.dir}/${srcFile}"/>
+      <param name="message" value="Checksum mismatch for ${download.dir}/${srcFile}"/>
+    </antcall>
+    <antcall target="copy-if-cached">
+      <param name="dest" value="${download.dir}/${srcFile}"/>
+    </antcall>
+    <untar src="${download.dir}/${srcFile}" dest="${download.dir}/temp" compression="bzip2"/>
+    <condition property="destination.known">
+      <and>
+        <isset property="srcJarPath"/>
+        <isset property="destJarFile"/>
+      </and>
+    </condition>
+    <antcall target="copy-downloaded-jar"/>
+  </target>
+
+  <!--
+      Download a jar file and optionally verify the checksum.
+      If the checksum fails, this script fails.
         
-        <antcall target="download-jar">
-            <param name="srcDomain" value="${antlr.src.url}"/>
-            <param name="srcFolder" value="${antlr.src.folder}"/>
-            <param name="cacheFolder" value="${antlr.cache.folder}"/>
-            <param name="srcFile" value="${antlr.src.file}"/>
-            <param name="destJarFile" value="${lib.dir}/antlr.jar"/>
-            <param name="md5" value="acfa69f928a0f1653555bda73091efca"/>
-            <!--<param name="md5" value="238becce7da69f7be5c5b8a65558cf63"/>-->
-        </antcall>
-    </target>
-
-    <!--
-	    commons
-	-->
-	
-	<target name="commons-jars" depends="commons-cli-jar,commons-io-jar" />
-
-    <!--
-	    commons-cli
-	-->
-	
-    <target name="commons-cli-jar-check" description="Checks if common-cli.jar has been downloaded.">
-        <available file="${lib.dir}/commons-cli.jar" property="commons.cli.jar.exists"/>
-    </target>
-    
-    <target name="commons-cli-jar" depends="commons-cli-jar-check" unless="commons.cli.jar.exists" 
-        description="Downloads and copies common-cli.jar to the lib directory.">
-        <echo file="${basedir}/cli.properties">cli.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-        <replace file="${basedir}/cli.properties" token="{0}" value="${commons-cli.name}-bin.tar.gz" />
-        <replace file="${basedir}/cli.properties" token="{1}" value="http://archive.apache.org/dist/commons/cli/binaries" />
-        <property file="${basedir}/cli.properties" />
-        <delete file="${basedir}/cli.properties" />
-        <echo>${cli.echo}</echo>
-        <antcall target="download-zip">
-          <param name="srcDomain" value="http://archive.apache.org"/>
-          <param name="srcFolder" value="dist/commons/cli/binaries"/>
-          <param name="cacheFolder" value="dist/commons/cli/binaries"/>
-          <param name="srcFile" value="${commons-cli.name}-bin.tar.gz"/>
-          <param name="md5" value="a05956c9ac8bacdc2b8d07fb2cb331ce"/>
-          <param name="srcJarPath" value="${commons-cli.name}/${commons-cli.name}.jar"/>
-          <param name="destJarFile" value="${lib.dir}/commons-cli.jar"/>
-        </antcall>
-        <copy todir="${lib.dir}">
-            <fileset dir="${download.dir}/temp/${commons-cli.name}">
-                <include name="LICENSE.txt"/>
-            </fileset>            
-            <globmapper from="*" to="commons-cli-*"/>
-        </copy>
-        <delete dir="${download.dir}/temp/${commons-cli.name}"/>
-    </target>
-
-    <!--
-        commons-io
-    -->
-    
-    <target name="commons-io-jar-check" description="Checks if commons-io.jar is in lib directory.">
-        <available file="${lib.dir}/commons-io.jar" property="commons.io.jar.exists"/>
-    </target>
-    
-    <target name="commons-io-jar" depends="commons-io-jar-check" 
-        unless="commons.io.jar.exists" 
-        description="Copies commons-io.jar to the lib directory.">
-        <echo file="${basedir}/io.properties">io.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-        <replace file="${basedir}/io.properties" token="{0}" value="${commons-io.name}-bin.tar.gz" />
-        <replace file="${basedir}/io.properties" token="{1}" value="http://archive.apache.org/dist/commons/io/binaries" />
-        <property file="${basedir}/io.properties" />
-        <delete file="${basedir}/io.properties" />
-        <echo>${io.echo}</echo>
-        <antcall target="download-zip">
-          <param name="srcDomain" value="http://archive.apache.org"/>
-          <param name="cacheFolder" value="dist/commons/io/binaries"/>
-          <param name="srcFolder" value="dist/commons/io/binaries"/>
-          <param name="srcFile" value="${commons-io.name}-bin.tar.gz"/>
-          <param name="md5" value="4f2c26f9d80f89d15939619cc8524f78"/>
-          <param name="srcJarPath" value="${commons-io.name}/${commons-io.name}.jar"/>
-          <param name="destJarFile" value="${lib.dir}/commons-io.jar"/>
-        </antcall>
-        <copy todir="${lib.dir}">
-            <fileset dir="${download.dir}/temp/${commons-io.name}">
-                <include name="LICENSE.txt"/>
-            </fileset>            
-            <globmapper from="*" to="commons-io-*"/>
-        </copy>
-        <delete dir="${download.dir}/temp/${commons-io.name}"/>
-    </target>
-	
-
-	<!--
-        guava - collections and other common constructs
-    -->
-    
-    <target name="guava-jar-check" description="Checks if guava.jar is in lib directory.">
-        <available file="${lib.dir}/guava.jar" property="guava.jar.exists"/>
-    </target>
-    
-    <target name="guava-jar" depends="guava-jar-check" 
-        unless="guava.jar.exists" 
-        description="Downloads and copies guava.jar to the lib directory.">
-        <echo file="${basedir}/guava.properties">guava.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-        <replace file="${basedir}/guava.properties" token="{0}" value="guava-15.0.jar" />
-        <replace file="${basedir}/guava.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=com/google/guava/guava/15.0" />
-        <property file="${basedir}/guava.properties" />
-        <delete file="${basedir}/guava.properties" />
-        <echo>${guava.echo}</echo>
-        <antcall target="download-jar">
-            <param name="srcDomain" value="http://search.maven.org"/>
-            <param name="srcFolder" value="remotecontent?filepath=com/google/guava/guava/15.0"/>
-            <param name="cacheFolder" value="com/google/guava/guava/15.0"/>
-            <param name="srcFile" value="guava-15.0.jar"/>
-            <param name="destJarFile" value="${lib.dir}/guava.jar"/>
-			<param name="md5" value="2c10bb2ca3ac8b55b0e77e54a7eb3744"/>
-        </antcall>
-        <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/guava-LICENSE.txt"/>
-    </target>
-
-    <!--
-	    jflex
-	-->
-	
-    <target name="jflex-jar-check" description="Checks if jflex.jar has been downloaded.">
-        <available file="${lib.dir}/jflex.jar" property="jflex.jar.exists"/>
-    </target>
-    
-    <target name="jflex-jar" depends="jflex-jar-check" unless="jflex.jar.exists" 
-        description="Downloads and copies jflex.jar to the lib directory.">
-        <echo file="${basedir}/jflex.properties">jflex.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-        <replace file="${basedir}/jflex.properties" token="{0}" value="${jflex.name}.tar.gz" />
-        <replace file="${basedir}/jflex.properties" token="{1}" value="http://jflex.de" />
-        <property file="${basedir}/jflex.properties" />
-        <delete file="${basedir}/jflex.properties" />
-        <echo>${cli.echo}</echo>
-        <antcall target="download-zip">
-          <param name="srcDomain" value="http://jflex.de"/>
-          <param name="srcFolder" value="."/>
-          <param name="cacheFolder" value="."/>
-          <param name="srcFile" value="${jflex.name}.tar.gz"/>
-          <param name="md5" value="c388c909eb0024d546489a89e608e096"/>
-          <param name="srcJarPath" value="${jflex.name}/lib/${jflex.name}.jar"/>
-          <param name="destJarFile" value="${lib.dir}/JFlex.jar"/>
-        </antcall>
-        <copy todir="${lib.dir}">
-            <fileset dir="${download.dir}/temp/${jflex.name}">
-                <include name="LICENSE.txt"/>
-            </fileset>            
-            <globmapper from="*" to="JFlex-*"/>
-        </copy>
-        <delete dir="${download.dir}/temp/${jflex.name}"/>
-    </target>
-
-	<!--
-        jburg - for codegen of certain java source files
-    -->
-    
-    <target name="jburg-jar-check" description="Checks if jburg.jar is in lib directory.">
-        <available file="${lib.dir}/jburg.jar" property="jburg.jar.exists"/>
-    </target>
-    
-    <target name="jburg-jar" depends="jburg-jar-check" unless="jburg.jar.exists" 
-        description="Copies jburg.jar to the lib directory.">
-        <echo file="${basedir}/jburg.properties">jburg.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-        <replace file="${basedir}/jburg.properties" token="{0}" value="${jburg.name}.tar.gz" />
-        <replace file="${basedir}/jburg.properties" token="{1}" value="http://downloads.sourceforge.net/project/jburg" />
-        <property file="${basedir}/jburg.properties" />
-        <delete file="${basedir}/jburg.properties" />
-        <echo>${jburg.echo}</echo>
-        <antcall target="download-zip">
-          <param name="srcDomain" value="http://downloads.sourceforge.net"/>
-          <param name="srcFolder" value="project/jburg"/>
-          <param name="cacheFolder" value="project/jburg"/>
-          <param name="srcFile" value="${jburg.name}.tar.gz"/>
-          <param name="md5" value="76830ee877cac40b981779325b3fa89f"/>
-          <param name="srcJarPath" value="lib/jburg.jar"/>
-          <param name="destJarFile" value="${lib.dir}/jburg.jar"/>
-        </antcall>
-        <copy todir="${lib.dir}">
-            <fileset dir="${download.dir}/temp">
-                <include name="LICENSE"/>
-            </fileset>            
-            <globmapper from="*" to="jburg-*"/>
-        </copy>
-        <delete includeemptydirs="true">
-            <fileset dir="${download.dir}/temp" includes="**/*"/>
-        </delete>    
-    </target>
-    	
-    <!--
-        lzma - compression
-    -->
-    
-    <target name="lzma-jar-check" description="Checks if lzma jar exists.">
-        <available file="${lib.dir}/lzma-sdk.jar" property="lzma.jar.exists" />
-    </target>
-    
-	<target name="lzma-jar" depends="lzma-jar-check" unless="lzma.jar.exists" 
-        description="Copies the lzma build jars.">
-        <echo file="${basedir}/lzma.properties">lzma.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-        <replace file="${basedir}/lzma.properties" token="{0}" value="lzma-9.20.jar.zip" />
-        <replace file="${basedir}/lzma.properties" token="{1}" value="http://www.java2s.com/Code/JarDownload/lzma" />
-        <property file="${basedir}/lzma.properties" />
-        <delete file="${basedir}/lzma.properties" />
-        <echo>${lzma.echo}</echo>
-        <antcall target="download-zip">
-          <param name="srcDomain" value="http://www.java2s.com"/>
-          <param name="srcFolder" value="Code/JarDownload/lzma"/>
-          <param name="cacheFolder" value="Code/JarDownload/lzma"/>
-          <param name="srcFile" value="lzma-9.20.jar.zip"/>
-          <param name="md5" value="d5f7343bbd03bf1c4a4806b372cc5354"/>
-          <param name="srcJarPath" value="lzma-9.20.jar"/>
-          <param name="destJarFile" value="${lib.dir}/lzma-sdk.jar"/>
-        </antcall>
-        <echo file="${lib.dir}/lzma-sdk-LICENSE.TXT">http://www.7-zip.org/sdk.html</echo>
-        <delete includeemptydirs="true">
-            <fileset dir="${download.dir}/temp" includes="**/*"/>
-        </delete>    
-    </target>
-    
+      Params are:
+          srcDomain
+          srcFolder
+          srcFile
+          destJarFile
+          [md5]
+  -->
+  <target name="download-jar" depends="check-cache" description="Downloads jar, and optionally verifies checksum.">
+    <antcall target="get-if-not-cached">
+      <param name="dest" value="${destJarFile}"/>
+      <param name="message" value="Checksum mismatch for ${destJarFile}"/>
+    </antcall>
+    <antcall target="copy-if-cached">
+      <param name="dest" value="${destJarFile}"/>
+    </antcall>
+  </target>
+
+  <target name="untar-file" unless="zip.compressed" description="Untars zipFile">
+    <untar src="${download.dir}/${srcFile}" dest="${download.dir}/temp" compression="gzip"/>
+  </target>
+
+  <target name="unzip-file" if="zip.compressed" description="Unzips zipFile">
+    <unzip src="${download.dir}/${srcFile}" dest="${download.dir}/temp"/>
+  </target>
+
+  <target name="get-if-not-cached" unless="found-in-cache">
+    <get src="${srcDomain}/${srcFolder}/${srcFile}" dest="${dest}"/>
+    <antcall target="check-sum">
+      <param name="dest" value="${dest}"/>
+      <param name="message" value="Checksum mismatch for ${dest}"/>
+    </antcall>
+    <antcall target="put-in-cache"/>
+  </target>
+
+  <target name="copy-if-cached" if="found-in-cache">
+    <!-- this string comes from the FlexJS en_US.properties because for now, this
+         target won't get called unless this script is called from the FlexJS install -->
+    <echo>${INFO_USING_CACHED_FILE} ${downloadCacheFolder}/${srcFolder}/${srcFile}</echo>
+    <copy file="${downloadCacheFolder}/${srcFolder}/${srcFile}" tofile="${dest}" overwrite="true"/>
+  </target>
+
+  <target name="check-cache" if="usingDownloadCache">
+    <available file="${downloadCacheFolder}/${srcFolder}/${srcFile}" property="found-in-cache"/>
+  </target>
+
+  <target name="put-in-cache" if="usingDownloadCache">
+    <copy tofile="${downloadCacheFolder}/${srcFolder}/${srcFile}" file="${dest}"/>
+  </target>
+
+  <target name="check-sum" if="md5" description="Verifies MD5 checksum, and fails if checksum doesn't match">
+    <checksum file="${dest}" algorithm="MD5" verifyproperty="we.failed" property="${md5}"/>
+    <fail message="${message}">
+      <condition>
+        <equals arg1="${we.failed}" arg2="false"/>
+      </condition>
+    </fail>
+  </target>
+
+  <target name="copy-downloaded-jar" if="destination.known">
+    <mkdir dir="${lib.dir}"/>
+    <copy file="${download.dir}/temp/${srcJarPath}" toFile="${destJarFile}" verbose="true"/>
+  </target>
+
+  <target name="fail-with-message" if="we.failed" description="Conditionally fails with the specified message">
+    <fail message="${message}"/>
+  </target>
+
+
+
+  <!--
+      Cleanup
+  -->
+  <target name="clean" description="Removes thirdparty downloads.">
+    <delete failonerror="false" includeEmptyDirs="true">
+      <fileset dir="${download.dir}"/>
+    </delete>
+  </target>
 </project>


[5/7] git commit: [flex-falcon] [refs/heads/develop] - Revert "Update args4j to version 2.0.28 (from 2.0.16)"

Posted by er...@apache.org.
Revert "Update args4j to version 2.0.28 (from 2.0.16)"

This reverts commit 53d0bd4ebf8b7639d0f74cb0a11c134bbf59c108.


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

Branch: refs/heads/develop
Commit: 2a4006d78caf176b35f5d13dd3f09dcf9d69e331
Parents: 57f9636
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Tue Jun 24 15:13:22 2014 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Tue Jun 24 15:13:22 2014 +0200

----------------------------------------------------------------------
 compiler.jx/downloads.xml | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2a4006d7/compiler.jx/downloads.xml
----------------------------------------------------------------------
diff --git a/compiler.jx/downloads.xml b/compiler.jx/downloads.xml
index 52697a7..eb3184f 100644
--- a/compiler.jx/downloads.xml
+++ b/compiler.jx/downloads.xml
@@ -43,27 +43,16 @@
   <property file="${basedir}/local.properties"/>
 
   <!--  args4j -->
-  <!-- version 2.0.28 -->
-  <property name="args4j.version" value="2.0.28"/>
-  <property name="args4j.download.checksum" value="6571d69d142dd2a003c4ffae6138f0ee"/>
-  <!-- version 2.0.16 -->
-  <!--property name="args4j.version" value="2.0.16"/>
-  <property name="args4j.download.checksum" value="6571d69d142dd2a003c4ffae6138f0ee"/ -->
-  
   <!--  closure -->
   <property name="closure.name" value="compiler"/>
   <property name="closure.download.server" value="http://search.maven.org"/>
   <property name="closure.download.folder" value="remotecontent?filepath=com/google/javascript/closure-compiler/v20131014"/>
   <property name="closure.download.filename" value="closure-compiler-v20131014.jar"/>
   <property name="closure.download.checksum" value="e9b4b20ef9ff13c13fb159a9efff33ea"/>
-
   <!--  commons-io -->
   <property name="commons-io.name" value="commons-io-2.0.1"/>
-
   <!--  guava -->
-  <property name="guava.version" value="15.0"/>
   <property name="guava.name" value="guava-15.0"/>
-
   <!--  org.json -->
 
 
@@ -93,18 +82,18 @@
     </target>
     <target name="args4j-jar" depends="args4j-jar-check" unless="args4j.jar.exists" description="Downloads and copies args4j.jar to the lib directory.">
       <echo file="${basedir}/args4j.properties">args4j.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-      <replace file="${basedir}/args4j.properties" token="{0}" value="args4j-${args4j.version}.jar"/>
-      <replace file="${basedir}/args4j.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=args4j/args4j/${args4j.version}"/>
+      <replace file="${basedir}/args4j.properties" token="{0}" value="args4j-2.0.16.jar"/>
+      <replace file="${basedir}/args4j.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=args4j/args4j/2.0.16"/>
       <property file="${basedir}/args4j.properties"/>
       <delete file="${basedir}/args4j.properties"/>
       <echo>${args4j.echo}</echo>
       <antcall target="download-jar">
         <param name="srcDomain" value="http://search.maven.org"/>
-        <param name="srcFolder" value="remotecontent?filepath=args4j/args4j/${args4j.version}"/>
-        <param name="cacheFolder" value="args4j/args4j/${args4j.version}"/>
-        <param name="srcFile" value="args4j-${args4j.version}.jar"/>
+        <param name="srcFolder" value="remotecontent?filepath=args4j/args4j/2.0.16"/>
+        <param name="cacheFolder" value="args4j/args4j/2.0.16"/>
+        <param name="srcFile" value="args4j-2.0.16.jar"/>
         <param name="destJarFile" value="${lib.dir}/args4j.jar"/>
-        <param name="md5" value="${args4j.download.checksum}"/>
+        <param name="md5" value="6571d69d142dd2a003c4ffae6138f0ee"/>
       </antcall>
       <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/args4j-LICENSE.txt"/>
     </target>


[4/7] git commit: [flex-falcon] [refs/heads/develop] - Revert "Cleanup"

Posted by er...@apache.org.
Revert "Cleanup"

This reverts commit e1f043e83848ceb9344dc34e7293c6d6bbb786bd.


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

Branch: refs/heads/develop
Commit: cdd411105b141b53ffe62451bd3140d96425d80b
Parents: 2a4006d
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Tue Jun 24 15:13:22 2014 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Tue Jun 24 15:13:22 2014 +0200

----------------------------------------------------------------------
 compiler.jx/downloads.xml | 734 +++++++++++++++++++++--------------------
 1 file changed, 378 insertions(+), 356 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/cdd41110/compiler.jx/downloads.xml
----------------------------------------------------------------------
diff --git a/compiler.jx/downloads.xml b/compiler.jx/downloads.xml
index eb3184f..b1bc70c 100644
--- a/compiler.jx/downloads.xml
+++ b/compiler.jx/downloads.xml
@@ -17,370 +17,392 @@
   limitations under the License.
 
 -->
-<project name="downloads" default="main" basedir=".">
-
-  <!-- 
-      Notes:
-          For Apache, the JARS must be removed from the repository.
-
-          Licenses:
-              commons-io (2.0.1) - Apache 2.0
-              closure (9.2) - Apache 2.0
-  -->
-
-  <!-- this script supports the usingDownloadCache property and
-       downloadCacheFolder property to cache downloads in the
-       folder specified by downloadCacheFolder.  This can make
-       a huge difference in future runs although there is some
-       risk around caching bad downloads and/or needing to
-       clean up the cache -->
-
-  <property name="FALCONJX_HOME" location="."/>
-
-  <property name="lib.dir" value="${FALCONJX_HOME}/lib"/>
-  <property name="download.dir" value="${FALCONJX_HOME}/in"/>
-
-  <property file="${basedir}/local.properties"/>
-
-  <!--  args4j -->
-  <!--  closure -->
-  <property name="closure.name" value="compiler"/>
-  <property name="closure.download.server" value="http://search.maven.org"/>
-  <property name="closure.download.folder" value="remotecontent?filepath=com/google/javascript/closure-compiler/v20131014"/>
-  <property name="closure.download.filename" value="closure-compiler-v20131014.jar"/>
-  <property name="closure.download.checksum" value="e9b4b20ef9ff13c13fb159a9efff33ea"/>
-  <!--  commons-io -->
-  <property name="commons-io.name" value="commons-io-2.0.1"/>
-  <!--  guava -->
-  <property name="guava.name" value="guava-15.0"/>
-  <!--  org.json -->
 
+<project name="downloads" default="main" basedir=".">
 
+	<!-- this script supports the usingDownloadCache property and
+	     downloadCacheFolder property to cache downloads in the
+		 folder specified by downloadCacheFolder.  This can make
+		 a huge difference in future runs although there is some
+		 risk around caching bad downloads and/or needing to
+		 clean up the cache -->
+	
+	<property name="FALCONJX_HOME" location="."/>
+    <property name="lib.dir" value="${FALCONJX_HOME}/lib"/>    
+	<property name="download.dir" value="${FALCONJX_HOME}/in"/>
+    <property file="${basedir}/local.properties"/>
+    <property name="closure.download.server" value="http://search.maven.org" />
+    <property name="closure.download.folder" value="remotecontent?filepath=com/google/javascript/closure-compiler/v20131014" />
+    <property name="closure.download.filename" value="closure-compiler-v20131014.jar" />
+    <property name="closure.download.checksum" value="e9b4b20ef9ff13c13fb159a9efff33ea" />
+    
+    <property name="guava.name" value="guava-15.0"/>
+    
+	<!-- 
+	   Notes:
+	       For Apache, the JARS must be removed from the repository.
+	       
+	       Licenses:
+            commons-io (2.0.1) - Apache 2.0
+	        closure (9.2) - Apache 2.0
+	        
+	-->
+	
+    <property name="commons-io.name" value="commons-io-2.0.1"/>
+    <property name="closure.name" value="compiler"/>
+	
+    <!-- 
+        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, commons-io-jar-jx, closure-jar, guava-jar, args4j-jar, org.json-jar"
+		description="Downloads all the required thirdparty JARs"/>
 
-  <!-- 
-      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, commons-io-jar-jx, closure-jar, guava-jar, args4j-jar, org.json-jar" description="Downloads all the required thirdparty JARs"/>
-  
-  <target name="prepare">
-    <echo message="Making lib directory ${lib.dir}"/>
-    <mkdir dir="${lib.dir}"/>
-  </target>
-
-
+    <target name="prepare" >
+		<echo message="Making lib directory ${lib.dir}"/>
+        <mkdir dir="${lib.dir}" />
+    </target>
+	
+	
+    <!--
+	    Download thirdparty JARs    
+	-->
 
-  <!--
-      Downloads
-  -->
-  
     <!--
-        args4j
+        Download a zip or gz file, extracts the jar file, and optionally copies the jar
+        file to a different location and optinally verifies the checksum and optionally
+		caches the file, and optionally pulls the file from the cache instead of downloading.  
+        If the checksum fails, this script fails.
+
+        Params are:
+            srcDomain - the domain
+			srcFolder - path to file
+            srcFile - a .gz file for untar with gzip, else unzip
+            [md5]
+            [srcJarPath] - both src and dest required for the copy
+            [destJarFile]
+
+        Note: This is purposely coded without <if><else><then> so that a dependency on
+        ant-contrib.jar isn't required.        
     -->
+    
+    <target name="download-zip" depends="check-cache"
+        description="Downloads tar/zip, and optionally verifies checksum and copies extracted jar.">                
+        
+        <mkdir dir="${download.dir}"/>        
+    	
+        <antcall target="get-if-not-cached">
+			<param name="dest" value="${download.dir}/${srcFile}"/>
+            <param name="message" value="Checksum mismatch for ${download.dir}/${srcFile}"/>
+		</antcall>
+		<antcall target="copy-if-cached">
+			<param name="dest" value="${download.dir}/${srcFile}"/>
+		</antcall>
+        
+        <condition property="zip.compressed">
+            <matches string="${srcFile}" pattern="^*.zip$"/>      
+        </condition>
+ 
+        <antcall target="untar-file"/>
+        <antcall target="unzip-file"/>
+        
+        <condition property="destination.known">
+            <and>
+                <isset property="srcJarPath"/>
+                <isset property="destJarFile"/>
+            </and>
+        </condition> 
+        <antcall target="copy-downloaded-jar"/>
+     </target>   	
+     
+    <target name="download-bz2" depends="check-cache"
+        description="Downloads bz2, and optionally verifies checksum and copies extracted jar.">                
+        
+        <mkdir dir="${download.dir}"/>        
+    	
+        <antcall target="get-if-not-cached">
+			<param name="dest" value="${download.dir}/${srcFile}"/>
+            <param name="message" value="Checksum mismatch for ${download.dir}/${srcFile}"/>
+		</antcall>
+		<antcall target="copy-if-cached">
+			<param name="dest" value="${download.dir}/${srcFile}"/>
+		</antcall>
+
+        <untar src="${download.dir}/${srcFile}" dest="${download.dir}/temp" compression="bzip2"/> 
+                
+        <condition property="destination.known">
+            <and>
+                <isset property="srcJarPath"/>
+                <isset property="destJarFile"/>
+            </and>
+        </condition> 
+        <antcall target="copy-downloaded-jar"/>
+     </target>   	
+     
+    <!--
+        Download a jar file and optionally verify the checksum.
+        If the checksum fails, this script fails.
+        
+        Params are:
+            srcDomain
+			srcFolder
+            srcFile
+            destJarFile
+            [md5]
+    -->
+    <target name="download-jar" depends="check-cache"
+        description="Downloads jar, and optionally verifies checksum.">                
+     
+        <antcall target="get-if-not-cached">
+			<param name="dest" value="${destJarFile}"/>
+            <param name="message" value="Checksum mismatch for ${destJarFile}"/>
+		</antcall>
+		<antcall target="copy-if-cached">
+			<param name="dest" value="${destJarFile}"/>
+		</antcall>
+    </target>
+
+    <target name="untar-file" unless="zip.compressed" description="Untars zipFile">
+        <untar src="${download.dir}/${srcFile}" dest="${download.dir}/temp" compression="gzip"/> 
+    </target>
+    
+    <target name="unzip-file" if="zip.compressed" description="Unzips zipFile">
+        <unzip src="${download.dir}/${srcFile}" dest="${download.dir}/temp"/>    
+    </target>
+    
+    <target name="get-if-not-cached" unless="found-in-cache"> 
+        <get src="${srcDomain}/${srcFolder}/${srcFile}" dest="${dest}"/>
+        <antcall target="check-sum">
+			<param name="dest" value="${dest}" />
+            <param name="message" value="Checksum mismatch for ${dest}"/>
+        </antcall>
+		<antcall target="put-in-cache" />
+	</target>
+	
+    <target name="copy-if-cached" if="found-in-cache">
+		<!-- this string comes from the FlexJS en_US.properties because for now, this
+		     target won't get called unless this script is called from the FlexJS install -->
+		<echo>${INFO_USING_CACHED_FILE} ${downloadCacheFolder}/${srcFolder}/${srcFile}</echo>
+		<copy file="${downloadCacheFolder}/${srcFolder}/${srcFile}" tofile="${dest}" overwrite="true" />
+	</target> 
+	
+    <target name="check-cache" if="usingDownloadCache">
+		<available file="${downloadCacheFolder}/${srcFolder}/${srcFile}" property="found-in-cache" />
+	</target> 
+	
+    <target name="put-in-cache" if="usingDownloadCache">
+		<copy tofile="${downloadCacheFolder}/${srcFolder}/${srcFile}" file="${dest}" />
+	</target> 
+	
+    <target name="check-sum" if="md5" 
+        description="Verifies MD5 checksum, and fails if checksum doesn't match">
+        
+        <checksum file="${dest}" algorithm="MD5" verifyproperty="we.failed" property="${md5}" />
+        <fail message="${message}">
+			<condition>
+				<equals arg1="${we.failed}" arg2="false" />
+			</condition>
+		</fail>
+    </target>
+    
+    <target name="copy-downloaded-jar" if="destination.known">
+        <mkdir dir="${lib.dir}"/>
+        <copy file="${download.dir}/temp/${srcJarPath}" toFile="${destJarFile}" verbose="true"/>
+    </target>
+    
+    <target name="fail-with-message" if="we.failed" 
+        description="Conditionally fails with the specified message">                
+        <fail message="${message}"/>
+    </target>
+	
+	<!--
+	    closure - JS compiler, minimizer, etc.
+	-->
+	
+	<target name="closure-jar-check" description="Checks if closure jar exists.">
+	    <available file="${lib.dir}/google/closure-compiler/compiler.jar" property="closure.jar.exists" />
+	</target>
+	
+	<target name="closure-jar" depends="closure-jar-check" unless="closure.jar.exists" 
+	    description="Copies the closure build jars.">
+		<mkdir dir="${lib.dir}/google/closure-compiler" />
+        <antcall target="echo-closure-jar">
+            <param name="srcDomain" value="${closure.download.server}"/>
+            <param name="srcFolder" value="${closure.download.folder}"/>
+            <!--
+             erikdebruin: because of a dependency Falcon has on an old version of Guava,
+             any versions of the Closure compiler after sept. 17, 2012 cause exceptions
+             when doing a release build with FalconJx.
+             
+             Was: param name="zipFile" value="compiler-latest.zip"
+             -->
+            <param name="srcFile" value="${closure.download.filename}"/>
+        </antcall>
+	    <antcall target="download-jar">
+            <param name="srcDomain" value="${closure.download.server}"/>
+            <param name="srcFolder" value="${closure.download.folder}"/>
+	      <!-- 
+				erikdebruin: because of a dependency Falcon has on an old version of Guava, 
+				any versions of the Closure compiler after sept. 17, 2012 cause exceptions 
+				when doing a release build with FalconJx.
+				
+				Was: param name="zipFile" value="compiler-latest.zip"
+				-->
+	      <param name="srcFile" value="${closure.download.filename}"/>
+          <param name="cacheFolder" value="com/google/javascript/closure-compiler/v20131014"/>
+          <param name="destJarFile" value="${lib.dir}/google/closure-compiler/compiler.jar"/>
+          <param name="md5" value="${closure.download.checksum}"/>
+	    </antcall>
+	    <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/google/closure-compiler/closure-LICENSE.txt"/>
+	    <copy todir="${lib.dir}/google/closure-compiler">
+	        <fileset dir="${download.dir}/temp">
+	            <include name="${closure.name}.jar"/>
+	        </fileset>
+	    </copy>
+	    <delete includeemptydirs="true">
+	        <fileset dir="${download.dir}/temp" includes="**/*"/>
+	    </delete>    
+	</target>
+
+    <target name="echo-closure-jar" if="installer">
+        <echo file="${basedir}/closure.properties">closure.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
+        <replace file="${basedir}/closure.properties" token="{0}" value="${srcFile}" />
+        <replace file="${basedir}/closure.properties" token="{1}" value="${srcDomain}/${srcFolder}" />
+        <property file="${basedir}/closure.properties" />
+        <delete file="${basedir}/closure.properties" />
+        <echo>${closure.echo}</echo>
+    </target>
+    
+	   <!--
+	        commons-io
+	    -->
+	    
+    <target name="commons-io-jar-check" description="Checks if commons-io.jar is in lib directory.">
+        <available file="${lib.dir}/commons-io.jar" property="commons.io.jar.exists"/>
+    </target>
+    
+    <target name="commons-io-jar-jx" depends="commons-io-jar-check" 
+        unless="commons.io.jar.exists" 
+        description="Copies commons-io.jar to the lib directory.">
+                
+        <antcall target="echo-commons-jar">
+            <param name="srcDomain" value="http://archive.apache.org"/>
+            <param name="srcFolder" value="dist/commons/io/binaries"/>
+            <param name="srcFile" value="${commons-io.name}-bin.tar.gz"/>
+        </antcall>
+        <antcall target="download-zip">
+          <param name="srcDomain" value="http://archive.apache.org"/>
+          <param name="srcFolder" value="dist/commons/io/binaries"/>
+          <param name="srcFile" value="${commons-io.name}-bin.tar.gz"/>
+          <param name="md5" value="4f2c26f9d80f89d15939619cc8524f78"/>
+          <param name="srcJarPath" value="${commons-io.name}/${commons-io.name}.jar"/>
+          <param name="destJarFile" value="${lib.dir}/commons-io.jar"/>
+        </antcall>
+        <copy todir="${lib.dir}">
+            <fileset dir="${download.dir}/temp/${commons-io.name}">
+                <include name="LICENSE.txt"/>
+            </fileset>            
+            <globmapper from="*" to="commons-io-*"/>
+        </copy>
+        <delete dir="${download.dir}/temp/${commons-io.name}"/>
+    </target>
+        
+    <target name="echo-commons-jar" if="installer">
+        <echo file="${basedir}/commons.properties">commons.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
+        <replace file="${basedir}/commons.properties" token="{0}" value="${srcFile}" />
+        <replace file="${basedir}/commons.properties" token="{1}" value="${srcDomain}/${srcFolder}" />
+        <property file="${basedir}/commons.properties" />
+        <delete file="${basedir}/commons.properties" />
+        <echo>${commons.echo}</echo>
+    </target>
+    
+	<!--
+     guava - collections and other common constructs
+     -->
+    
+    <target name="guava-jar-check" description="Checks if guava.jar is in lib directory.">
+        <available file="${lib.dir}/guava.jar" property="guava.jar.exists"/>
+    </target>
+    
+    <target name="guava-jar" depends="guava-jar-check"
+        unless="guava.jar.exists"
+        description="Downloads and copies guava.jar to the lib directory.">
+        <echo file="${basedir}/guava.properties">guava.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
+        <replace file="${basedir}/guava.properties" token="{0}" value="guava-15.0.jar" />
+        <replace file="${basedir}/guava.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=com/google/guava/guava/15.0" />
+        <property file="${basedir}/guava.properties" />
+        <delete file="${basedir}/guava.properties" />
+        <echo>${guava.echo}</echo>
+        <antcall target="download-jar">
+            <param name="srcDomain" value="http://search.maven.org"/>
+            <param name="srcFolder" value="remotecontent?filepath=com/google/guava/guava/15.0"/>
+            <param name="cacheFolder" value="com/google/guava/guava/15.0"/>
+            <param name="srcFile" value="guava-15.0.jar"/>
+            <param name="destJarFile" value="${lib.dir}/guava.jar"/>
+			<param name="md5" value="2c10bb2ca3ac8b55b0e77e54a7eb3744"/>
+        </antcall>
+        <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/guava-LICENSE.txt"/>
+    </target>
+    
     <target name="args4j-jar-check" description="Checks if args4j.jar is in lib directory.">
-      <available file="${lib.dir}/args4j.jar" property="args4j.jar.exists"/>
+        <available file="${lib.dir}/args4j.jar" property="args4j.jar.exists"/>
     </target>
-    <target name="args4j-jar" depends="args4j-jar-check" unless="args4j.jar.exists" description="Downloads and copies args4j.jar to the lib directory.">
-      <echo file="${basedir}/args4j.properties">args4j.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-      <replace file="${basedir}/args4j.properties" token="{0}" value="args4j-2.0.16.jar"/>
-      <replace file="${basedir}/args4j.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=args4j/args4j/2.0.16"/>
-      <property file="${basedir}/args4j.properties"/>
-      <delete file="${basedir}/args4j.properties"/>
-      <echo>${args4j.echo}</echo>
-      <antcall target="download-jar">
-        <param name="srcDomain" value="http://search.maven.org"/>
-        <param name="srcFolder" value="remotecontent?filepath=args4j/args4j/2.0.16"/>
-        <param name="cacheFolder" value="args4j/args4j/2.0.16"/>
-        <param name="srcFile" value="args4j-2.0.16.jar"/>
-        <param name="destJarFile" value="${lib.dir}/args4j.jar"/>
-        <param name="md5" value="6571d69d142dd2a003c4ffae6138f0ee"/>
-      </antcall>
-      <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/args4j-LICENSE.txt"/>
+    
+    <target name="args4j-jar" depends="args4j-jar-check"
+        unless="args4j.jar.exists"
+        description="Downloads and copies args4j.jar to the lib directory.">
+        <echo file="${basedir}/args4j.properties">args4j.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
+        <replace file="${basedir}/args4j.properties" token="{0}" value="args4j-2.0.16.jar" />
+        <replace file="${basedir}/args4j.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=args4j/args4j/2.0.16" />
+        <property file="${basedir}/args4j.properties" />
+        <delete file="${basedir}/args4j.properties" />
+        <echo>${args4j.echo}</echo>
+        <antcall target="download-jar">
+            <param name="srcDomain" value="http://search.maven.org"/>
+            <param name="srcFolder" value="remotecontent?filepath=args4j/args4j/2.0.16"/>
+            <param name="cacheFolder" value="args4j/args4j/2.0.16"/>
+            <param name="srcFile" value="args4j-2.0.16.jar"/>
+            <param name="destJarFile" value="${lib.dir}/args4j.jar"/>
+			<param name="md5" value="6571d69d142dd2a003c4ffae6138f0ee"/>
+        </antcall>
+        <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/args4j-LICENSE.txt"/>
     </target>
-
-  <!--
-      closure - JS compiler, minimizer, etc.
-  -->
-  <target name="closure-jar-check" description="Checks if closure jar exists.">
-    <available file="${lib.dir}/google/closure-compiler/compiler.jar" property="closure.jar.exists"/>
-  </target>
-  <target name="closure-jar" depends="closure-jar-check" unless="closure.jar.exists" description="Copies the closure build jars.">
-    <mkdir dir="${lib.dir}/google/closure-compiler"/>
-    <antcall target="echo-closure-jar">
-      <param name="srcDomain" value="${closure.download.server}"/>
-      <param name="srcFolder" value="${closure.download.folder}"/>
-      <!--
-          erikdebruin: because of a dependency Falcon has on an old version of Guava,
-          any versions of the Closure compiler after sept. 17, 2012 cause exceptions
-          when doing a release build with FalconJx.
-          
-          Was: param name="zipFile" value="compiler-latest.zip"
-      -->
-      <param name="srcFile" value="${closure.download.filename}"/>
-    </antcall>
-    <antcall target="download-jar">
-      <param name="srcDomain" value="${closure.download.server}"/>
-      <param name="srcFolder" value="${closure.download.folder}"/>
-      <!-- 
-          erikdebruin: because of a dependency Falcon has on an old version of Guava, 
-          any versions of the Closure compiler after sept. 17, 2012 cause exceptions 
-          when doing a release build with FalconJx.
-          
-          Was: param name="zipFile" value="compiler-latest.zip"
-        -->
-      <param name="srcFile" value="${closure.download.filename}"/>
-      <param name="cacheFolder" value="com/google/javascript/closure-compiler/v20131014"/>
-      <param name="destJarFile" value="${lib.dir}/google/closure-compiler/compiler.jar"/>
-      <param name="md5" value="${closure.download.checksum}"/>
-    </antcall>
-    <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/google/closure-compiler/closure-LICENSE.txt"/>
-    <copy todir="${lib.dir}/google/closure-compiler">
-      <fileset dir="${download.dir}/temp">
-        <include name="${closure.name}.jar"/>
-      </fileset>
-    </copy>
-    <delete includeemptydirs="true">
-      <fileset dir="${download.dir}/temp" includes="**/*"/>
-    </delete>
-  </target>
-  <target name="echo-closure-jar" if="installer">
-    <echo file="${basedir}/closure.properties">closure.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-    <replace file="${basedir}/closure.properties" token="{0}" value="${srcFile}"/>
-    <replace file="${basedir}/closure.properties" token="{1}" value="${srcDomain}/${srcFolder}"/>
-    <property file="${basedir}/closure.properties"/>
-    <delete file="${basedir}/closure.properties"/>
-    <echo>${closure.echo}</echo>
-  </target>
-  
-  <!--
-      commons-io
-  -->
-  <target name="commons-io-jar-check" description="Checks if commons-io.jar is in lib directory.">
-    <available file="${lib.dir}/commons-io.jar" property="commons.io.jar.exists"/>
-  </target>
-  <target name="commons-io-jar-jx" depends="commons-io-jar-check" unless="commons.io.jar.exists" description="Copies commons-io.jar to the lib directory.">
-    <antcall target="echo-commons-jar">
-      <param name="srcDomain" value="http://archive.apache.org"/>
-      <param name="srcFolder" value="dist/commons/io/binaries"/>
-      <param name="srcFile" value="${commons-io.name}-bin.tar.gz"/>
-    </antcall>
-    <antcall target="download-zip">
-      <param name="srcDomain" value="http://archive.apache.org"/>
-      <param name="srcFolder" value="dist/commons/io/binaries"/>
-      <param name="srcFile" value="${commons-io.name}-bin.tar.gz"/>
-      <param name="md5" value="4f2c26f9d80f89d15939619cc8524f78"/>
-      <param name="srcJarPath" value="${commons-io.name}/${commons-io.name}.jar"/>
-      <param name="destJarFile" value="${lib.dir}/commons-io.jar"/>
-    </antcall>
-    <copy todir="${lib.dir}">
-      <fileset dir="${download.dir}/temp/${commons-io.name}">
-        <include name="LICENSE.txt"/>
-      </fileset>
-      <globmapper from="*" to="commons-io-*"/>
-    </copy>
-    <delete dir="${download.dir}/temp/${commons-io.name}"/>
-  </target>
-  <target name="echo-commons-jar" if="installer">
-    <echo file="${basedir}/commons.properties">commons.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-    <replace file="${basedir}/commons.properties" token="{0}" value="${srcFile}"/>
-    <replace file="${basedir}/commons.properties" token="{1}" value="${srcDomain}/${srcFolder}"/>
-    <property file="${basedir}/commons.properties"/>
-    <delete file="${basedir}/commons.properties"/>
-    <echo>${commons.echo}</echo>
-  </target>
-  
-  <!--
-      guava - collections and other common constructs
-  -->
-  <target name="guava-jar-check" description="Checks if guava.jar is in lib directory.">
-    <available file="${lib.dir}/guava.jar" property="guava.jar.exists"/>
-  </target>
-  <target name="guava-jar" depends="guava-jar-check" unless="guava.jar.exists" description="Downloads and copies guava.jar to the lib directory.">
-    <echo file="${basedir}/guava.properties">guava.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-    <replace file="${basedir}/guava.properties" token="{0}" value="guava-15.0.jar"/>
-    <replace file="${basedir}/guava.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=com/google/guava/guava/15.0"/>
-    <property file="${basedir}/guava.properties"/>
-    <delete file="${basedir}/guava.properties"/>
-    <echo>${guava.echo}</echo>
-    <antcall target="download-jar">
-      <param name="srcDomain" value="http://search.maven.org"/>
-      <param name="srcFolder" value="remotecontent?filepath=com/google/guava/guava/15.0"/>
-      <param name="cacheFolder" value="com/google/guava/guava/15.0"/>
-      <param name="srcFile" value="guava-15.0.jar"/>
-      <param name="destJarFile" value="${lib.dir}/guava.jar"/>
-      <param name="md5" value="2c10bb2ca3ac8b55b0e77e54a7eb3744"/>
-    </antcall>
-    <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/guava-LICENSE.txt"/>
-  </target>
-  
-  <!--
-      org.json
-  -->
-  <target name="org.json-jar-check" description="Checks if org.json.jar is in lib directory.">
-    <available file="${lib.dir}/org.json.jar" property="org.json.jar.exists"/>
-  </target>
-  <target name="org.json-jar" depends="org.json-jar-check" unless="org.json.jar.exists" description="Downloads and copies org.json.jar to the lib directory.">
-    <echo file="${basedir}/org.json.properties">org.json.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-    <replace file="${basedir}/org.json.properties" token="{0}" value="org.json-20130213.jar"/>
-    <replace file="${basedir}/org.json.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=org/codeartisans/org.json/20130213"/>
-    <property file="${basedir}/org.json.properties"/>
-    <delete file="${basedir}/org.json.properties"/>
-    <echo>${org.json.echo}</echo>
-    <antcall target="download-jar">
-      <param name="srcDomain" value="http://search.maven.org"/>
-      <param name="srcFolder" value="remotecontent?filepath=org/codeartisans/org.json/20130213"/>
-      <param name="cacheFolder" value="org/codeartisans/org.json/20130213"/>
-      <param name="srcFile" value="org.json-20130213.jar"/>
-      <param name="destJarFile" value="${lib.dir}/org.json.jar"/>
-      <param name="md5" value="a865b42221d2687244a679fa4e5425d5"/>
-    </antcall>
-    <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/org.json-LICENSE.txt"/>
-  </target>
-
-
-
-  <!--
-      Utilities
-  -->
-
-  <!--
-      Download a zip or gz file, extracts the jar file, and optionally copies the jar
-      file to a different location and optinally verifies the checksum and optionally
-      caches the file, and optionally pulls the file from the cache instead of downloading.  
-      If the checksum fails, this script fails.
-
-      Params are:
-          srcDomain - the domain
-          srcFolder - path to file
-          srcFile - a .gz file for untar with gzip, else unzip
-          [md5]
-          [srcJarPath] - both src and dest required for the copy
-          [destJarFile]
-
-      Note: This is purposely coded without <if><else><then> so that a dependency on
-      ant-contrib.jar isn't required.        
-  -->
-  <target name="download-zip" depends="check-cache" description="Downloads tar/zip, and optionally verifies checksum and copies extracted jar.">
-    <mkdir dir="${download.dir}"/>
-    <antcall target="get-if-not-cached">
-      <param name="dest" value="${download.dir}/${srcFile}"/>
-      <param name="message" value="Checksum mismatch for ${download.dir}/${srcFile}"/>
-    </antcall>
-    <antcall target="copy-if-cached">
-      <param name="dest" value="${download.dir}/${srcFile}"/>
-    </antcall>
-    <condition property="zip.compressed">
-      <matches string="${srcFile}" pattern="^*.zip$"/>
-    </condition>
-    <antcall target="untar-file"/>
-    <antcall target="unzip-file"/>
-    <condition property="destination.known">
-      <and>
-        <isset property="srcJarPath"/>
-        <isset property="destJarFile"/>
-      </and>
-    </condition>
-    <antcall target="copy-downloaded-jar"/>
-  </target>
-
-  <target name="download-bz2" depends="check-cache" description="Downloads bz2, and optionally verifies checksum and copies extracted jar.">
-    <mkdir dir="${download.dir}"/>
-    <antcall target="get-if-not-cached">
-      <param name="dest" value="${download.dir}/${srcFile}"/>
-      <param name="message" value="Checksum mismatch for ${download.dir}/${srcFile}"/>
-    </antcall>
-    <antcall target="copy-if-cached">
-      <param name="dest" value="${download.dir}/${srcFile}"/>
-    </antcall>
-    <untar src="${download.dir}/${srcFile}" dest="${download.dir}/temp" compression="bzip2"/>
-    <condition property="destination.known">
-      <and>
-        <isset property="srcJarPath"/>
-        <isset property="destJarFile"/>
-      </and>
-    </condition>
-    <antcall target="copy-downloaded-jar"/>
-  </target>
-
-  <!--
-      Download a jar file and optionally verify the checksum.
-      If the checksum fails, this script fails.
+    
+    <target name="org.json-jar-check" description="Checks if org.json.jar is in lib directory.">
+        <available file="${lib.dir}/org.json.jar" property="org.json.jar.exists"/>
+    </target>
+    
+    <target name="org.json-jar" depends="org.json-jar-check"
+        unless="org.json.jar.exists"
+        description="Downloads and copies org.json.jar to the lib directory.">
+        <echo file="${basedir}/org.json.properties">org.json.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
+        <replace file="${basedir}/org.json.properties" token="{0}" value="org.json-20130213.jar" />
+        <replace file="${basedir}/org.json.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=org/codeartisans/org.json/20130213" />
+        <property file="${basedir}/org.json.properties" />
+        <delete file="${basedir}/org.json.properties" />
+        <echo>${org.json.echo}</echo>
+        <antcall target="download-jar">
+            <param name="srcDomain" value="http://search.maven.org"/>
+            <param name="srcFolder" value="remotecontent?filepath=org/codeartisans/org.json/20130213"/>
+            <param name="cacheFolder" value="org/codeartisans/org.json/20130213"/>
+            <param name="srcFile" value="org.json-20130213.jar"/>
+            <param name="destJarFile" value="${lib.dir}/org.json.jar"/>
+			<param name="md5" value="a865b42221d2687244a679fa4e5425d5"/>
+        </antcall>
+        <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/org.json-LICENSE.txt"/>
+    </target>
+    
+    <!--
+		Cleanup
+	-->
+	
+    <target name="clean" 
+        description="Removes thirdparty downloads.">
         
-      Params are:
-          srcDomain
-          srcFolder
-          srcFile
-          destJarFile
-          [md5]
-  -->
-  <target name="download-jar" depends="check-cache" description="Downloads jar, and optionally verifies checksum.">
-    <antcall target="get-if-not-cached">
-      <param name="dest" value="${destJarFile}"/>
-      <param name="message" value="Checksum mismatch for ${destJarFile}"/>
-    </antcall>
-    <antcall target="copy-if-cached">
-      <param name="dest" value="${destJarFile}"/>
-    </antcall>
-  </target>
-
-  <target name="untar-file" unless="zip.compressed" description="Untars zipFile">
-    <untar src="${download.dir}/${srcFile}" dest="${download.dir}/temp" compression="gzip"/>
-  </target>
-
-  <target name="unzip-file" if="zip.compressed" description="Unzips zipFile">
-    <unzip src="${download.dir}/${srcFile}" dest="${download.dir}/temp"/>
-  </target>
-
-  <target name="get-if-not-cached" unless="found-in-cache">
-    <get src="${srcDomain}/${srcFolder}/${srcFile}" dest="${dest}"/>
-    <antcall target="check-sum">
-      <param name="dest" value="${dest}"/>
-      <param name="message" value="Checksum mismatch for ${dest}"/>
-    </antcall>
-    <antcall target="put-in-cache"/>
-  </target>
-
-  <target name="copy-if-cached" if="found-in-cache">
-    <!-- this string comes from the FlexJS en_US.properties because for now, this
-         target won't get called unless this script is called from the FlexJS install -->
-    <echo>${INFO_USING_CACHED_FILE} ${downloadCacheFolder}/${srcFolder}/${srcFile}</echo>
-    <copy file="${downloadCacheFolder}/${srcFolder}/${srcFile}" tofile="${dest}" overwrite="true"/>
-  </target>
-
-  <target name="check-cache" if="usingDownloadCache">
-    <available file="${downloadCacheFolder}/${srcFolder}/${srcFile}" property="found-in-cache"/>
-  </target>
-
-  <target name="put-in-cache" if="usingDownloadCache">
-    <copy tofile="${downloadCacheFolder}/${srcFolder}/${srcFile}" file="${dest}"/>
-  </target>
-
-  <target name="check-sum" if="md5" description="Verifies MD5 checksum, and fails if checksum doesn't match">
-    <checksum file="${dest}" algorithm="MD5" verifyproperty="we.failed" property="${md5}"/>
-    <fail message="${message}">
-      <condition>
-        <equals arg1="${we.failed}" arg2="false"/>
-      </condition>
-    </fail>
-  </target>
-
-  <target name="copy-downloaded-jar" if="destination.known">
-    <mkdir dir="${lib.dir}"/>
-    <copy file="${download.dir}/temp/${srcJarPath}" toFile="${destJarFile}" verbose="true"/>
-  </target>
-
-  <target name="fail-with-message" if="we.failed" description="Conditionally fails with the specified message">
-    <fail message="${message}"/>
-  </target>
-
-
-
-  <!--
-      Cleanup
-  -->
-  <target name="clean" description="Removes thirdparty downloads.">
-    <delete failonerror="false" includeEmptyDirs="true">
-      <fileset dir="${download.dir}"/>
-    </delete>
-  </target>
+        <delete failonerror="false" includeEmptyDirs="true">
+            <fileset dir="${download.dir}" />
+        </delete>
+    </target>
+    
 </project>


[7/7] git commit: [flex-falcon] [refs/heads/develop] - Instead of the kinda 'hacked in' use of the AbstractCompilerRunner, we now have a full blown implementation of the Compiler class proper. This will give us much more flexibility when working with the

Posted by er...@apache.org.
Instead of the kinda 'hacked in' use of the AbstractCompilerRunner, we now have a full blown implementation of the Compiler class proper. This will give us much more flexibility when working with the GC, as well as enable us to get some extra efficiency from the JS advanced compilation step.

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


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

Branch: refs/heads/develop
Commit: aadd7dc5a3ec9e52ae90b58ac31291e7e4fd523a
Parents: ac765e6
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Tue Jun 24 15:47:46 2014 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Tue Jun 24 15:47:46 2014 +0200

----------------------------------------------------------------------
 .../mxml/flexjs/MXMLFlexJSPublisher.java        |  58 +++----
 .../utils/JSClosureCompilerWrapper.java         | 160 +++++++++++++++++++
 2 files changed, 179 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/aadd7dc5/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
index 31d434f..dff5d23 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
@@ -46,9 +46,7 @@ import org.apache.flex.compiler.internal.codegen.js.goog.JSGoogPublisher;
 import org.apache.flex.compiler.internal.driver.js.goog.JSGoogConfiguration;
 import org.apache.flex.compiler.internal.graph.GoogDepsWriter;
 import org.apache.flex.compiler.internal.projects.FlexJSProject;
-import org.apache.flex.compiler.utils.JSClosureCompilerUtil;
-
-import com.google.javascript.jscomp.SourceMap;
+import org.apache.flex.compiler.utils.JSClosureCompilerWrapper;
 
 public class MXMLFlexJSPublisher extends JSGoogPublisher implements
         IJSPublisher
@@ -72,6 +70,7 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
             return new Integer(o1.lineNumber).compareTo(o2.lineNumber);
         }
     }
+    
     public MXMLFlexJSPublisher(Configuration config, FlexJSProject project)
     {
         super(config);
@@ -183,7 +182,7 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
             FileUtils.copyDirectory(new File(closureGoogSrcLibDirPath), new File(closureGoogTgtLibDirPath));
         }
         
-        ArrayList<String> optionList = new ArrayList<String>();
+        JSClosureCompilerWrapper compilerWrapper = new JSClosureCompilerWrapper();
 
         GoogDepsWriter gdw = new GoogDepsWriter(intermediateDir, projectName, (JSGoogConfiguration) configuration);
         try
@@ -255,7 +254,7 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
                 sb.append("goog.addDependency('base.js', ['goog'], []);\n");
                 File file = new File(closureGoogSrcLibDirPath + "/base.js");
                 FileUtils.copyFileToDirectory(file, new File(closureGoogTgtLibDirPath));
-                optionList.add("--js=" + file.getCanonicalPath());
+                compilerWrapper.addJSSourceFile(file.getCanonicalPath());
                 Collections.sort(subsetdeps, new DependencyLineComparator());
                 for (DependencyRecord subsetdeprec : subsetdeps)
                 {
@@ -272,7 +271,7 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
                         dir += File.separator + googfn.substring(0, googfn.lastIndexOf("/"));
                     }
                     FileUtils.copyFileToDirectory(file, new File(dir));
-                    optionList.add("--js=" + file.getCanonicalPath());
+                    compilerWrapper.addJSSourceFile(file.getCanonicalPath());
                 }
             }
         }
@@ -309,53 +308,34 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
                     DirectoryFileFilter.DIRECTORY);
             for (File file : files)
             {
-                optionList.add("--js=" + file.getCanonicalPath());
+                compilerWrapper.addJSSourceFile(file.getCanonicalPath());
             }
         }
         
         // (erikdebruin) add project files
         for (String filePath : gdw.filePathsInOrder)
         {
-            optionList.add("--js=" + new File(filePath).getCanonicalPath());
+            compilerWrapper.addJSSourceFile(
+                    new File(filePath).getCanonicalPath());   
         }
         
-        if (useStrictPublishing)
-        {
-            // (erikdebruin) set compiler flags to 'strictest' to allow maximum
-            //               code optimization
-            optionList.add("--define='goog.DEBUG=false'");
-            optionList.add("--language_in=ECMASCRIPT5_STRICT");
-            optionList.add("--warning_level=VERBOSE");
-            optionList.add("--jscomp_warning=accessControls");
-            optionList.add("--jscomp_warning=const");
-            optionList.add("--jscomp_warning=constantProperty");
-            optionList.add("--jscomp_warning=strictModuleDepCheck");
-            optionList.add("--jscomp_warning=visibility");
-            optionList.add("--jscomp_off=deprecated");
-        }
+        compilerWrapper.setOptions(
+                projectReleaseJSFilePath, useStrictPublishing);
         
         // (erikdebruin) Include the 'goog' deps to allow the compiler to resolve
         //               dependencies.
-        optionList.add("--js=" + closureGoogSrcLibDirPath + File.separator + "deps.js");
-
-        optionList.add("--closure_entry_point=" + projectName);
-        optionList.add("--only_closure_dependencies");
-        optionList.add("--compilation_level=ADVANCED_OPTIMIZATIONS");
-        optionList.add("--js_output_file=" + projectReleaseJSFilePath);
-        optionList.add("--output_manifest="
-                + releaseDirPath + File.separator + "manifest.txt");
-        optionList.add("--create_source_map="
-                + projectReleaseJSFilePath + ".map");
-        optionList.add("--source_map_format=" + SourceMap.Format.V3);
+        compilerWrapper.addJSSourceFile(
+                closureGoogSrcLibDirPath + File.separator + "deps.js");
         
         List<String> externs = ((JSGoogConfiguration)configuration).getExternalJSLib();
         for (String extern : externs)
-            optionList.add("--externs=" + extern);
-
-        String[] options = (String[]) optionList.toArray(new String[0]);
-
-        JSClosureCompilerUtil.run(options);
-
+        {
+            compilerWrapper.addJSExternsFile(extern);
+        }
+        
+        compilerWrapper.targetFilePath = projectReleaseJSFilePath;
+        compilerWrapper.compile();
+        
         appendSourceMapLocation(projectReleaseJSFilePath, projectName);
 
         if (!isMarmotinniRun)

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/aadd7dc5/compiler.jx/src/org/apache/flex/compiler/utils/JSClosureCompilerWrapper.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/utils/JSClosureCompilerWrapper.java b/compiler.jx/src/org/apache/flex/compiler/utils/JSClosureCompilerWrapper.java
new file mode 100644
index 0000000..e09ad62
--- /dev/null
+++ b/compiler.jx/src/org/apache/flex/compiler/utils/JSClosureCompilerWrapper.java
@@ -0,0 +1,160 @@
+/*
+ *
+ *  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.
+ *
+ */
+
+package org.apache.flex.compiler.utils;
+
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Level;
+
+import com.google.javascript.jscomp.CheckLevel;
+import com.google.javascript.jscomp.CommandLineRunner;
+import com.google.javascript.jscomp.CompilationLevel;
+import com.google.javascript.jscomp.Compiler;
+import com.google.javascript.jscomp.CompilerOptions;
+import com.google.javascript.jscomp.CompilerOptions.LanguageMode;
+import com.google.javascript.jscomp.DiagnosticGroups;
+import com.google.javascript.jscomp.JSError;
+import com.google.javascript.jscomp.SourceFile;
+import com.google.javascript.jscomp.SourceMap;
+import com.google.javascript.jscomp.WarningLevel;
+import com.google.javascript.rhino.Node;
+import com.google.javascript.rhino.Token;
+
+public class JSClosureCompilerWrapper
+{
+
+    public JSClosureCompilerWrapper()
+    {
+        Compiler.setLoggingLevel(Level.INFO);
+
+        compiler_ = new Compiler();
+
+        options_ = new CompilerOptions();
+        initOptions();
+        
+        jsExternsFiles_ = new ArrayList<SourceFile>();
+        initExterns();
+
+        jsSourceFiles_ = new ArrayList<SourceFile>();
+    }
+
+    private Compiler compiler_;
+    private CompilerOptions options_;
+    private List<SourceFile> jsExternsFiles_;
+    private List<SourceFile> jsSourceFiles_;
+    
+    public String targetFilePath;
+    
+    public void addJSExternsFile(String fileName)
+    {
+        addJSExternsFile(SourceFile.fromFile(fileName));
+    }
+    
+    public void addJSExternsFile(SourceFile file)
+    {
+        jsExternsFiles_.add(file);
+    }
+    
+    public void addJSSourceFile(String fileName)
+    {
+        jsSourceFiles_.add(SourceFile.fromFile(fileName));
+    }
+    
+    public void compile()
+    {
+        compiler_.compile(jsExternsFiles_, jsSourceFiles_, options_);
+
+        try
+        {
+            FileWriter targetFile = new FileWriter(targetFilePath);
+            targetFile.write(compiler_.toSource());
+            targetFile.close();
+            
+            FileWriter sourceMapFile = new FileWriter(options_.sourceMapOutputPath);
+            compiler_.getSourceMap().appendTo(sourceMapFile, "");
+            sourceMapFile.close();
+        }
+        catch (IOException error)
+        {
+            System.out.println(error);
+        }
+        
+        for (JSError message : compiler_.getWarnings())
+        {
+            System.err.println("Warning message: " + message.toString());
+        }
+     
+        for (JSError message : compiler_.getErrors())
+        {
+            System.err.println("Error message: " + message.toString());
+        }
+    }
+    
+    private void initExterns()
+    {
+        try
+        {
+            List<SourceFile> defaultExterns = CommandLineRunner.getDefaultExterns();
+            for (SourceFile defaultExtern : defaultExterns)
+            {
+                this.addJSExternsFile(defaultExtern);
+            }
+        }
+        catch (IOException error)
+        {
+            System.out.println(error);
+        }
+    }
+    
+    private void initOptions()
+    {
+        CompilationLevel.ADVANCED_OPTIMIZATIONS.setOptionsForCompilationLevel(
+                options_);
+        
+        WarningLevel.VERBOSE.setOptionsForWarningLevel(options_);
+    }
+    
+    public void setOptions(String sourceMapPath, boolean useStrictPublishing)
+    {
+        if (useStrictPublishing)
+        {
+            // (erikdebruin) set compiler flags to 'strictest' to allow maximum
+            //               code optimization
+
+            options_.getDefineReplacements().put(
+                    "goog.DEBUG", new Node(Token.TRUE));
+            
+            options_.setLanguageIn(LanguageMode.ECMASCRIPT5_STRICT);
+            
+            options_.setWarningLevel(DiagnosticGroups.ACCESS_CONTROLS, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.CONST, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.CONSTANT_PROPERTY, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.STRICT_MODULE_DEP_CHECK, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.VISIBILITY, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.DEPRECATED, CheckLevel.OFF);
+        }
+        
+        options_.sourceMapFormat = SourceMap.Format.V3;
+        options_.sourceMapOutputPath = sourceMapPath + ".map";
+    }
+
+}


[2/7] git commit: [flex-falcon] [refs/heads/develop] - Update args4j to version 2.0.28 (from 2.0.16)

Posted by er...@apache.org.
Update args4j to version 2.0.28 (from 2.0.16)

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


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

Branch: refs/heads/develop
Commit: 53d0bd4ebf8b7639d0f74cb0a11c134bbf59c108
Parents: e1f043e
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Mon Jun 23 10:43:08 2014 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Mon Jun 23 10:43:08 2014 +0200

----------------------------------------------------------------------
 compiler.jx/downloads.xml | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/53d0bd4e/compiler.jx/downloads.xml
----------------------------------------------------------------------
diff --git a/compiler.jx/downloads.xml b/compiler.jx/downloads.xml
index eb3184f..52697a7 100644
--- a/compiler.jx/downloads.xml
+++ b/compiler.jx/downloads.xml
@@ -43,16 +43,27 @@
   <property file="${basedir}/local.properties"/>
 
   <!--  args4j -->
+  <!-- version 2.0.28 -->
+  <property name="args4j.version" value="2.0.28"/>
+  <property name="args4j.download.checksum" value="6571d69d142dd2a003c4ffae6138f0ee"/>
+  <!-- version 2.0.16 -->
+  <!--property name="args4j.version" value="2.0.16"/>
+  <property name="args4j.download.checksum" value="6571d69d142dd2a003c4ffae6138f0ee"/ -->
+  
   <!--  closure -->
   <property name="closure.name" value="compiler"/>
   <property name="closure.download.server" value="http://search.maven.org"/>
   <property name="closure.download.folder" value="remotecontent?filepath=com/google/javascript/closure-compiler/v20131014"/>
   <property name="closure.download.filename" value="closure-compiler-v20131014.jar"/>
   <property name="closure.download.checksum" value="e9b4b20ef9ff13c13fb159a9efff33ea"/>
+
   <!--  commons-io -->
   <property name="commons-io.name" value="commons-io-2.0.1"/>
+
   <!--  guava -->
+  <property name="guava.version" value="15.0"/>
   <property name="guava.name" value="guava-15.0"/>
+
   <!--  org.json -->
 
 
@@ -82,18 +93,18 @@
     </target>
     <target name="args4j-jar" depends="args4j-jar-check" unless="args4j.jar.exists" description="Downloads and copies args4j.jar to the lib directory.">
       <echo file="${basedir}/args4j.properties">args4j.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
-      <replace file="${basedir}/args4j.properties" token="{0}" value="args4j-2.0.16.jar"/>
-      <replace file="${basedir}/args4j.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=args4j/args4j/2.0.16"/>
+      <replace file="${basedir}/args4j.properties" token="{0}" value="args4j-${args4j.version}.jar"/>
+      <replace file="${basedir}/args4j.properties" token="{1}" value="http://search.maven.org/remotecontent?filepath=args4j/args4j/${args4j.version}"/>
       <property file="${basedir}/args4j.properties"/>
       <delete file="${basedir}/args4j.properties"/>
       <echo>${args4j.echo}</echo>
       <antcall target="download-jar">
         <param name="srcDomain" value="http://search.maven.org"/>
-        <param name="srcFolder" value="remotecontent?filepath=args4j/args4j/2.0.16"/>
-        <param name="cacheFolder" value="args4j/args4j/2.0.16"/>
-        <param name="srcFile" value="args4j-2.0.16.jar"/>
+        <param name="srcFolder" value="remotecontent?filepath=args4j/args4j/${args4j.version}"/>
+        <param name="cacheFolder" value="args4j/args4j/${args4j.version}"/>
+        <param name="srcFile" value="args4j-${args4j.version}.jar"/>
         <param name="destJarFile" value="${lib.dir}/args4j.jar"/>
-        <param name="md5" value="6571d69d142dd2a003c4ffae6138f0ee"/>
+        <param name="md5" value="${args4j.download.checksum}"/>
       </antcall>
       <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/args4j-LICENSE.txt"/>
     </target>