JAL-3560 Java 11 fix on JAL-3563 moving j11lib set up to top
[jalview.git] / build-libjs.xml
1 <?xml version="1.0"?>
2 <!--
3
4 This ANT task creates the follwing .zip files in the libjs directory:
5
6 intervalstore-site.zip
7 MiGLayout-site.zip
8 VARNA-site.zip
9  
10 Some source files from other projects need to be transpiled, but they do not need to be part of the 
11 Java compilation. In fact, some of them (MiGLayout) should NOT be part of the Java compilation, because
12 the implementation is not complete. 
13
14 The solution was to store these files "off-classpath" in srcjar/ and just transfer them temporarily 
15 to the classpath (in src2/), compile, and delete the temporary java files. 
16
17 The sequence is:
18
19 1) copy files from srcjar/ to src2/
20 2) let the transpiler do its job on them (automatically, if Project...Build Automatically is checked)
21 3) run this ANT task
22 4) delete the *.java files in src2/
23
24
25   
26  -->
27
28 <project name="jalviewX" default="zipall" basedir="."
29  xmlns:if="ant:if"
30     xmlns:unless="ant:unless">
31
32         <!-- inputs directories -->
33     <property name="resource.dir" value="resources" />          
34     <property name="swingjs.dir" value="swingjs"/>
35         <!-- output directories -->
36         <property name="site.dir" value="site"/>
37         <property name="j2s.dir" value="${site.dir}/swingjs/j2s"/>
38         <property name="libjs.dir" value="libjs"/>
39
40         <target name="zipall" depends="zipvarna,zipmig,zipintervalstore">
41                 
42                 
43   </target>
44
45   <target name="zipvarna">
46     <!-- VARNA -->
47             <property name="varna.zip" value="${libjs.dir}/VARNA-site.zip" />                   
48                 <echo> Zipping up ${varna.zip} </echo>
49                 <zip destfile="${varna.zip}" basedir="${site.dir}" includes="fr_*.html,swingjs/j2s/fr/**" />
50         </target>
51
52         <target name="zipmig">
53           <!-- net.miginfo.com MiGLayout -->
54                     <property name="mig.zip" value="${libjs.dir}/MiGLayout-site.zip" />                 
55                         <echo> Zipping up ${mig.zip} </echo>
56                         <zip destfile="${mig.zip}" basedir="${site.dir}" includes="swingjs/j2s/net/miginfocom/**" />
57         </target>
58
59         <target name="zipintervalstore">
60           <!-- intervalstore.impl NCList implementation -->
61                     <property name="intervalstore.zip" value="${libjs.dir}/intervalstore-site.zip" />                   
62                         <echo> Zipping up ${intervalstore.zip} </echo>
63                         <zip destfile="${intervalstore.zip}" basedir="${site.dir}" includes="swingjs/j2s/intervalstore/**" />
64         </target>
65
66         <!-- already in SwingJS
67         <target name="zipjson"  already in SwingJS>
68                     <property name="json.zip" value="${libjs.dir}/json-site.zip" />                     
69                         <echo> Zipping up ${json.zip} </echo>
70                         <zip destfile="${json.zip}" basedir="${site.dir}" includes="swingjs/j2s/org/json/**" />
71         </target>
72         -->
73
74         <!-- log4j minimal implementation is already in jalview/javascript
75               and is mapped from org.apache.log4j by the following .j2s line:
76               
77               j2s.class.replacements=org.apache.log4j.->jalview.javascript.log4j.
78                
79         <target name="ziplog4j">
80                   <!- org.apache.log4j ->
81                     <property name="log4j.zip" value="${libjs.dir}/log4j-site.zip" />                   
82                         <echo> Zipping up ${log4j.zip} </echo>
83                         <zip destfile="${log4j.zip}" basedir="${site.dir}" includes="swingjs/j2s/org/apache/log4j/**" />
84         </target>
85     -->
86 </project>