<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
-->
<project 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="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"/>-->
		<get dest="${tmp-dir}/xalan-j_2_7_1-bin.zip" usetimestamp="true" ignoreerrors="true" src="http://apache.raffsoftware.com/xml/xalan-j/binaries/xalan-j_2_7_1-bin.zip"/>
		<unzip src="${tmp-dir}/xalan-j_2_7_1-bin.zip" dest="${tmp-dir}"/>
		<move file="${tmp-dir}/xalan-j_2_7_1/serializer.jar" todir="${lib-java}"/>
		<move file="${tmp-dir}/xalan-j_2_7_1/xalan.jar" todir="${lib-java}"/>
		<move file="${tmp-dir}/xalan-j_2_7_1/xercesImpl.jar" todir="${lib-java}"/>
		<move file="${tmp-dir}/xalan-j_2_7_1/xml-apis.jar" todir="${lib-java}"/>

		<!--selenium is a bit tricky, as selenium-server in maven repository is old and breaks with FF on WinXP SP3-->
		<get dest="${tmp-dir}/selenium-remote-control-1.0.3.zip" usetimestamp="true" ignoreerrors="true" src="http://selenium.googlecode.com/files/selenium-remote-control-1.0.3.zip" />
		<unzip src="${tmp-dir}/selenium-remote-control-1.0.3.zip" dest="${tmp-dir}"/>
		<copy file="${tmp-dir}/selenium-java-client-driver-1.0.1/selenium-java-client-driver.jar" todir="${lib-test-java}"/>
		<copy file="${tmp-dir}/selenium-server-1.0.3/selenium-server.jar" todir="${lib-test-java}"/>


		<get dest="${tmp-dir}/commons-cli-1.2-bin.zip" usetimestamp="true" ignoreerrors="true" src="http://apache.sunsite.ualberta.ca/commons/cli/binaries/commons-cli-1.2-bin.zip" />
		<unzip src="${tmp-dir}/commons-cli-1.2-bin.zip" dest="${tmp-dir}"/>
		<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 -->
		<!--
		<get dest="${lib-js}/json2.js" usetimestamp="true" ignoreerrors="true" src="http://www.json.org/json2.js"/> 
		-->

		<!--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"/>-->
		<!--
		<get dest="${lib-test-js}/env.js" usetimestamp="true" ignoreerrors="true" src="http://jqueryjs.googlecode.com/svn/trunk/jquery/build/runtest/env.js"/>
		-->


		<!-- so the last question that remains, then, is do we need full dojo? -->

		<delete dir="${tmp-dir}"/>
		
	</target>
</project>


