Author: jbeard
Date: Sat Aug 28 19:15:31 2010
New Revision: 990418

URL: http://svn.apache.org/viewvc?rev=990418&view=rev
Log:
Added new target to auxiliary ant build to download dependencies. getDeps.xml 
should be deleted soon.

Modified:
    commons/sandbox/gsoc/2010/scxml-js/trunk/getDeps.xml
    commons/sandbox/gsoc/2010/scxml-js/trunk/mvn-ant-build.xml
    commons/sandbox/gsoc/2010/scxml-js/trunk/pom.xml

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/getDeps.xml
URL: 
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/getDeps.xml?rev=990418&r1=990417&r2=990418&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/getDeps.xml (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/getDeps.xml Sat Aug 28 19:15:31 
2010
@@ -17,17 +17,9 @@
 -->
 <project default="get-deps" name="commons-scxml-js" basedir=".">
 
-       <property name="lib-java" value="lib/java"/>
-       <property name="lib-test-java" value="lib/test-java"/>
-       <property name="lib-js" value="lib/js"/>
-       <property name="lib-test-js" value="lib/test-js"/>
-       <property name="drawing-tool-lib" value="demo/drawing-tool/lib"/>
-
-       <property name="tmp-dir" value="tmp"/>
 
        <target name="get-deps" >
        
-               <mkdir dir="${tmp-dir}"/>
 
                <!--
                <get dest="${tmp-dir}/xalan-j_2_7_1-bin.zip" 
usetimestamp="true" ignoreerrors="true" 
src="http://mirror.csclub.uwaterloo.ca/apache/xml/xalan-j/binaries/xalan-j_2_7_1-bin.zip"/>
@@ -53,10 +45,6 @@
                <copy file="${tmp-dir}/commons-cli-1.2/commons-cli-1.2.jar" 
tofile="${lib-java}/commons-cli.jar"/>
                -->
 
-               <get dest="${tmp-dir}/requirejs-0.11.0.zip" usetimestamp="true" 
ignoreerrors="true" 
src="http://requirejs.org/docs/release/0.11.0/requirejs-0.11.0.zip"/>
-               <unzip src="${tmp-dir}/requirejs-0.11.0.zip" dest="${lib-js}"/>
-               <move file="${lib-js}/requirejs-0.11.0" 
tofile="${lib-js}/requirejs"/>
-               <delete file="${lib-js}/requirejs-0.11.0.zip"/>
 
                <!--<get dest="${lib-js}/beautify.js" usetimestamp="true" 
ignoreerrors="true" 
src="http://github.com/einars/js-beautify/raw/master/beautify.js"/>-->
                <!--FIXME: json2.js requires you to remove the first line -->
@@ -65,8 +53,6 @@
                -->
 
                <!--FIXME: may be able to use the compressed version of dojo -->
-               <get dest="${tmp-dir}/dojo-release-1.4.2-src.zip" 
usetimestamp="true" ignoreerrors="true" 
src="http://download.dojotoolkit.org/release-1.4.2/dojo-release-1.4.2-src.zip"/>
-               <unzip src="${tmp-dir}/dojo-release-1.4.2-src.zip" 
dest="${lib-test-js}"/>
                
                <!--<get dest="${lib-test-js}/dojo.js.uncompressed.js" 
usetimestamp="true" ignoreerrors="true" 
src="http://download.dojotoolkit.org/release-1.4.2/dojo.js.uncompressed.js"/>-->
                <!--
@@ -75,21 +61,11 @@
 
                <!-- so the last question that remains, then, is do we need 
full dojo? -->
 
-               <delete dir="${drawing-tool-lib}" failonerror="false"/>
-               <mkdir dir="${drawing-tool-lib}"/>
-               <get dest="${drawing-tool-lib}/jquery-1.4.2.js" 
usetimestamp="true" ignoreerrors="true" 
src="http://code.jquery.com/jquery-1.4.2.js"/>
-
-               <get dest="${tmp-dir}/jquery.svg.package-1.4.3.zip" 
usetimestamp="true" ignoreerrors="true" 
src="http://keith-wood.name/zip/jquery.svg.package-1.4.3.zip"/>
-               <unzip src="${tmp-dir}/jquery.svg.package-1.4.3.zip" 
dest="${drawing-tool-lib}"/>
 
                <!-- we use rhino release candidate, rather than stable release 
because it has built-in support for Array.reduce, among other things -->
                <!--
-               <get dest="${tmp-dir}/rhino1_7R3pre.zip" usetimestamp="true" 
ignoreerrors="true" 
src="ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R3pre.zip"/>
-               <unzip src="${tmp-dir}/rhino1_7R3pre.zip" dest="${tmp-dir}"/>
-               <copy file="${tmp-dir}/rhino1_7R3pre/js.jar" 
tofile="${lib-java}/js.jar"/>
                -->
 
-               <delete dir="${tmp-dir}"/>
                
        </target>
 </project>

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/mvn-ant-build.xml
URL: 
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/mvn-ant-build.xml?rev=990418&r1=990417&r2=990418&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/mvn-ant-build.xml (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/mvn-ant-build.xml Sat Aug 28 
19:15:31 2010
@@ -70,7 +70,8 @@
        <property name="selenium_safari_id" value="*safari"/>
 
        <!-- classpath configuration stuff -->
-       <path id="rhino-classpath" location="${lib-java}/js.jar"/>
+       <property name="lib-rhino" location="${lib-java}/js.jar"/>
+       <path id="rhino-classpath" location="${lib-rhino}" />
        <path id="closure-classpath" 
location="${lib-js}/requirejs/build/lib/closure/compiler.jar"/>
 
        <path id="requirejs_bootstrap_paths">
@@ -105,6 +106,102 @@
                -->
        </path>
 
+       <property name="drawing-tool-lib" value="demo/drawing-tool/lib"/>
+       <property name="tmp-dir" value="tmp"/>
+
+       <property name="require-js-lib" value="${lib-js}/requirejs"/>
+       <property name="dojo-js-lib" 
value="${lib-test-js}/dojo-release-1.4.2-src"/>
+       <property name="jquery-svg-js-lib" 
value="${drawing-tool-lib}/jquery.svg.js"/>
+
+       <!--
+       <available property="require-js-lib-available" file="${require-js-lib}" 
type="dir"/>
+       <available property="dojo-js-lib-available" file="${dojo-js-lib}" 
type="dir"/>
+       <available property="jquery-svg-js-lib-available" 
file="${jquery-svg-js-lib}" type="file"/>
+       <available property="rhino-available" filepath="rhino-classpath"/>
+       -->
+
+               
+       <target name="download-dependencies">
+               <mkdir dir="${tmp-dir}"/>
+
+               <if>
+                       <not>
+                               <available file="${require-js-lib}" type="dir"/>
+                       </not>
+
+                       <then>
+                               <echo>Downloading RequireJS...</echo>
+
+                               <get dest="${tmp-dir}/requirejs-0.11.0.zip" 
usetimestamp="true" ignoreerrors="true" 
src="http://requirejs.org/docs/release/0.11.0/requirejs-0.11.0.zip"/>
+                               <unzip src="${tmp-dir}/requirejs-0.11.0.zip" 
dest="${lib-js}"/>
+                               <move file="${lib-js}/requirejs-0.11.0" 
tofile="${lib-js}/requirejs"/>
+                               <delete file="${lib-js}/requirejs-0.11.0.zip"/>
+                       </then>
+                       <else>
+                               <echo>RequireJS up-to-date</echo>
+                       </else>
+               </if>
+
+
+               <if>
+                       <not>
+                               <available file="${dojo-js-lib}" type="dir"/>
+                       </not>
+
+                       <then>
+                               <echo>Downloading dojo...</echo>
+
+                               <get 
dest="${tmp-dir}/dojo-release-1.4.2-src.zip" usetimestamp="true" 
ignoreerrors="true" 
src="http://download.dojotoolkit.org/release-1.4.2/dojo-release-1.4.2-src.zip"/>
+                               <unzip 
src="${tmp-dir}/dojo-release-1.4.2-src.zip" dest="${lib-test-js}"/>
+                       </then>
+                       <else>
+                               <echo>Dojo up-to-date</echo>
+                       </else>
+               </if>
+
+
+               
+               <if>
+                       <not>
+                               <available file="${jquery-svg-js-lib}" 
type="file"/>
+                       </not>
+
+                       <then>
+                               <echo>Downloading jQuery SVG...</echo>
+
+                               <delete dir="${drawing-tool-lib}" 
failonerror="false"/>
+                               <mkdir dir="${drawing-tool-lib}"/>
+                               <get dest="${drawing-tool-lib}/jquery-1.4.2.js" 
usetimestamp="true" ignoreerrors="true" 
src="http://code.jquery.com/jquery-1.4.2.js"/>
+                               <get 
dest="${tmp-dir}/jquery.svg.package-1.4.3.zip" usetimestamp="true" 
ignoreerrors="true" 
src="http://keith-wood.name/zip/jquery.svg.package-1.4.3.zip"/>
+                               <unzip 
src="${tmp-dir}/jquery.svg.package-1.4.3.zip" dest="${drawing-tool-lib}"/>
+                       </then>
+                       <else>
+                               <echo>jQuery SVG up to date</echo>
+                       </else>
+               </if>
+
+
+
+               <!-- latest rhino -->
+               <if>
+                       <not>
+                               <available file="${lib-rhino}"/>
+                       </not>
+
+                       <then>
+                               <echo>Downloading Rhino...</echo>
+                               <get dest="${tmp-dir}/rhino1_7R3pre.zip" 
usetimestamp="true" ignoreerrors="true" 
src="ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R3pre.zip"/>
+                               <unzip src="${tmp-dir}/rhino1_7R3pre.zip" 
dest="${tmp-dir}"/>
+                               <copy file="${tmp-dir}/rhino1_7R3pre/js.jar" 
tofile="${lib-java}/js.jar"/>
+                       </then>
+                       <else>
+                               <echo>Rhino up-to-date</echo>
+                       </else>
+               </if>
+
+               <delete dir="${tmp-dir}"/>
+       </target>
+
        <target name="clean">
                <delete dir="${build}"/>
        </target>

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/pom.xml?rev=990418&r1=990417&r2=990418&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/pom.xml (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/pom.xml Sat Aug 28 19:15:31 2010
@@ -163,9 +163,8 @@
         <artifactId>maven-antrun-plugin</artifactId>
         <version>1.4</version>
         <executions>
-       <!-- TODO -->
-       <!--
           <execution>
+           <id>download-dependencies</id>
             <phase>initialize</phase>
             <configuration>
               <tasks>
@@ -181,7 +180,6 @@
               <goal>run</goal>
             </goals>
           </execution>
-       -->
           <execution>
            <id>process-sources</id>
             <phase>process-sources</phase>


Reply via email to