<?xml version="1.0"?>
<!--
- * just a crude unzip of non-Jalview classes for development purposes -BH 2018
--->
+
+This ANT task creates the follwing .zip files in the libjs directory:
+
+intervalstore-site.zip
+MiGLayout-site.zip
+VARNA-site.zip
+
+Some source files from other projects need to be transpiled, but they do not need to be part of the
+Java compilation. In fact, some of them (MiGLayout) should NOT be part of the Java compilation, because
+the implementation is not complete.
+
+The solution was to store these files "off-classpath" in srcjar/ and just transfer them temporarily
+to the classpath (in src2/), compile, and delete the temporary java files.
+
+The sequence is:
+
+1) copy files from srcjar/ to src2/
+2) let the transpiler do its job on them (automatically, if Project...Build Automatically is checked)
+3) run this ANT task
+4) delete the *.java files in src2/
+
+
+
+ -->
+
<project name="jalviewX" default="zipall" basedir="."
xmlns:if="ant:if"
xmlns:unless="ant:unless">
<!-- inputs directories -->
- <property name="resourceDir" value="resources" />
- <property name="libjsDir" value="libjs"/>
- <property name="swingjsDir" value="swingjs"/>
+ <property name="resource.dir" value="resources" />
+ <property name="swingjs.dir" value="swingjs"/>
<!-- output directories -->
- <property name="site" value="site"/>
- <property name="j2sDir" value="${site}/swingjs/j2s"/>
- <property name="libjsDir" value="libjs"/>
+ <property name="site.dir" value="site"/>
+ <property name="j2s.dir" value="${site.dir}/swingjs/j2s"/>
+ <property name="libjs.dir" value="libjs"/>
- <target name="zipall" depends="zipvarna,zipmig,ziplog4j,zipjson">
+ <target name="zipall" depends="zipvarna,zipmig,zipintervalstore">
</target>
<target name="zipvarna">
<!-- VARNA -->
- <property name="varna.zip" value="${libjsDir}/VARNA-site.zip" />
+ <property name="varna.zip" value="${libjs.dir}/VARNA-site.zip" />
<echo> Zipping up ${varna.zip} </echo>
- <zip destfile="${varna.zip}" basedir="${site}" includes="fr_*,swingjs/j2s/fr/**" />
+ <zip destfile="${varna.zip}" basedir="${site.dir}" includes="fr_*.html,swingjs/j2s/fr/**" />
</target>
<target name="zipmig">
- <!-- net.miginfo.com MiGLayout -->
- <property name="mig.zip" value="${libjsDir}/MiGLayout-site.zip" />
+ <!-- net.miginfo.com MiGLayout -->
+ <property name="mig.zip" value="${libjs.dir}/MiGLayout-site.zip" />
<echo> Zipping up ${mig.zip} </echo>
- <zip destfile="${mig.zip}" basedir="${site}" includes="swingjs/j2s/net/miginfocom/**" />
+ <zip destfile="${mig.zip}" basedir="${site.dir}" includes="swingjs/j2s/net/miginfocom/**" />
</target>
- <target name="ziplog4j">
- <!-- org.apache.log4j -->
- <property name="log4j.zip" value="${libjsDir}/log4j-site.zip" />
- <echo> Zipping up ${log4j.zip} </echo>
- <zip destfile="${log4j.zip}" basedir="${site}" includes="swingjs/j2s/org/apache/log4j/**" />
+ <target name="zipintervalstore">
+ <!-- intervalstore.impl NCList implementation -->
+ <property name="intervalstore.zip" value="${libjs.dir}/intervalstore-site.zip" />
+ <echo> Zipping up ${intervalstore.zip} </echo>
+ <zip destfile="${intervalstore.zip}" basedir="${site.dir}" includes="swingjs/j2s/intervalstore/**" />
</target>
- <target name="zipjson">
- <!-- org.json.simple -->
- <property name="json.zip" value="${libjsDir}/jsonsimple-site.zip" />
+ <!-- already in SwingJS
+ <target name="zipjson" already in SwingJS>
+ <property name="json.zip" value="${libjs.dir}/json-site.zip" />
<echo> Zipping up ${json.zip} </echo>
- <zip destfile="${json.zip}" basedir="${site}" includes="swingjs/j2s/org/json/**" />
+ <zip destfile="${json.zip}" basedir="${site.dir}" includes="swingjs/j2s/org/json/**" />
</target>
+ -->
+ <!-- log4j minimal implementation is already in jalview/javascript
+ and is mapped from org.apache.log4j by the following .j2s line:
+
+ j2s.class.replacements=org.apache.log4j.->jalview.javascript.log4j.
+
+ <target name="ziplog4j">
+ <!- org.apache.log4j ->
+ <property name="log4j.zip" value="${libjs.dir}/log4j-site.zip" />
+ <echo> Zipping up ${log4j.zip} </echo>
+ <zip destfile="${log4j.zip}" basedir="${site.dir}" includes="swingjs/j2s/org/apache/log4j/**" />
+ </target>
+ -->
</project>