5 - requires tools/ant-contrib.jar
7 - creates the site/ directory if it does not exist
8 - unzip libjs/*.zip into site/swingjs/j2s
9 - unzips swingjs/SwingJS-site.zip into site/
10 - copies non-java resources from resources/ into site/swingjs/j2s
14 <project name="swingjs-project" default="tosite" basedir="."
16 xmlns:unless="ant:unless">
18 <target name="tosite">
20 <!-- input directories -->
22 <!-- location of ant-contrib.jar -->
23 <property name="tools.dir" value = "tools" />
25 <!-- SwingjS_site zip file (could be varied if versioning is needed) -->
26 <property name="swingjs.zip" value="swingjs/SwingJS-site.zip" />
28 <!-- location of third-party jar contents as precompiled zipped .js files to copy to site/ -->
29 <property name="libjs.dir" value="libjs" />
31 <!-- non-Java resources to copy to site/swingjs/j2s -->
32 <property name="resource.dir" value="resources" />
34 <!-- non-Java resources to copy to site/ -->
35 <property name="site-resource.dir" value="site-resources" />
37 <!-- output directories -->
39 <property name="site.dir" value="site" />
40 <property name="j2s.dir" value="${site.dir}/swingjs/j2s" />
42 <!-- <for ...> construct needs ant-contrib.jar -->
43 <taskdef resource="net/sf/antcontrib/antlib.xml">
45 <pathelement location="${tools.dir}/ant-contrib.jar" />
49 <!-- unzip all libjs zip files into site
51 all zip files placed in libjs will be processed
55 <for param="file.zip">
57 <fileset dir="${libjs.dir}" includes="*.zip"/>
60 <unzip src="@{file.zip}" dest="${site.dir}" overwrite="true"/>
64 <!-- unzip SwingJS-site.zip
66 we do this separately, as we want it done last
70 <unzip src="${swingjs.zip}" dest="${site.dir}/" overwrite="true"/>
72 <!-- transfer resources -->
74 <echo> Copying ${resource.dir} files into ${j2s.dir} </echo>
75 <copy todir="${j2s.dir}">
76 <fileset dir="${resource.dir}">
81 <echo> Copying ${site-resource.dir} files into ${site.dir} </echo>
82 <copy todir="${site.dir}">
83 <fileset dir="${site-resource.dir}">