Merge branch 'JalScape/JAL-1332' of https://source.jalview.org/git/jalview into JalSc...
[jalview.git] / build.xml
1 <?xml version="1.0"?>
2 <!--
3  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
4  * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
5  * 
6  * This file is part of Jalview.
7  * 
8  * Jalview is free software: you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License 
10  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11  * 
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
18 -->
19 <project name="jalviewX" default="usage" basedir=".">
20         <!-- we use jalopy to format our sources -->
21         <taskdef name="jalopy" classname="de.hunsicker.jalopy.plugin.ant.AntPlugin">
22                 <classpath>
23                         <fileset dir="utils/jalopy/lib">
24                                 <include name="*.jar" />
25                         </fileset>
26                 </classpath>
27         </taskdef>
28
29         <target name="help" depends="usage" />
30         <target name="usage">
31                 <echo message="~~~Jalview Ant build.xml Usage~~~~" />
32                 <echo message="Targets include:" />
33                 <echo message="usage - default target, displays this message" />
34                 <echo message="buildindices - generates JavaHelpSearch from the help files" />
35                 <echo message="build - compiles all necessary files for Application" />
36                 <echo message="makedist - compiles and places all necessary jar files into directory dist" />
37                 <echo message="makefulldist - signs all jar files and builds jnlp file for full distribution" />
38                 <echo message="              this needs a keystore and key. See docs/building.html for more information." />
39                 <echo message="compileApplet - compiles all necessary files for Applet" />
40                 <echo message="makeApplet - compiles, then packages and obfuscates the Applet" />
41                 <echo message="See docs/building.html and the comments in build file for other targets." />
42                 <echo message="note: compile and makeApplet require the property java118.home to be set to point to a java 1.1.8 jdk." />
43                 <echo message="Useful -D flags: -Ddonotobfuscate will prevent applet obfuscation" />
44         </target>
45
46
47         <!-- utils is a class path to additional utilities needed for
48     building docs, jars and webstart stuff -->
49         <!--
50         Userdefined build property defaults
51
52         wsdl.server list (plus namespace mapping info ???)  - also want
53                 ... to make this a dynamically generatable property
54         WebStart Location
55         Build location - provide a temporary root for speed
56         jarsigner keystore and info
57         Jakarta and axis classpath ?
58         Default argument for starting Jalview (if it exists).
59
60 -->
61
62         <target name="init">
63                 <path id="axis.classpath">
64                         <!-->
65                         <fileset dir="/usr/local/axis/lib">
66                                 <include name="**/*.jar" />
67                         </fileset>
68                         <fileset dir="/usr/local/jakarta-tomcat-5/webapps/axis/WEB-INF/lib">
69                                 <include name="**/*.jar"/>
70                                 <include name="*.jar"/>
71                         </fileset> -->
72       </path>
73                 <!-- Jalview Version String displayed by application on startup and used to check for updates -->
74                 <property name="JALVIEW_VERSION" value="DEVELOPMENT" />
75                 <!-- 2.4 (VAMSAS)" -->
76                 <!-- Include debugging information in javac true or false -->
77                 <property name="javac.debug" value="true" />
78
79                 <!-- JarSigner Key Store for Webstart Distribution -->
80                 <property name="jalview.keystore" value="./keys/.keystore" />
81                 <!-- Keystore Password -->
82                 <property name="jalview.keystore.pass" value="alignmentisfun" />
83                 <!-- Key Name -->
84                 <property name="jalview.key" value="jalview" />
85                 <!-- Key Password -->
86                 <property name="jalview.key.pass" value="alignmentisfun" />
87
88                 <!-- Don't change anything below here unless you know what you are doing! -->
89                 <!-- Url path for WebStart in JNLP file -->
90                 <property name="WebStartLocation" value="http://www.jalview.org/webstart" />
91                 <!-- Webstart Image - looked for in resources/images -->
92                 <property name="WebStartImage" value="JalviewLogo_big.png"/>
93                 <!-- J2SE version needed for webstart launch -->
94                 <property name="j2sev" value="1.6+"/>
95                 <!-- build directory configuration -->
96                 <property name="libDir" value="lib" />
97                 <property name="resourceDir" value="resources" />
98                 <property name="helpDir" value="help" />
99                 <property name="docDir" value="doc" />
100                 <property name="sourceDir" value="src" />
101                 <property name="schemaDir" value="schemas" />
102                 <property name="outputDir" value="classes" />
103                 <property name="packageDir" value="dist" />
104                 <property name="outputJar" value="jalview.jar" />
105                 <!-- Jalview Applet JMol Jar Dependency -->
106                 <property name="jmolJar" value="JmolApplet-12.2.4.jar" />
107                 <property name="jalviewLiteJar" value="jalviewApplet.jar" />
108                 <!-- switch to indicate if we should obfuscate jalviewLite -->
109                 <!--<property name="donotobfuscate" value="true"/> -->
110
111                 <!-- Jalview Web Service Clients - see the comments in 'buildextclients' for details -->
112                 <property name="wsdl.File" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred?wsdl" />
113                 <property name="wsdl.Files" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/vamsas?wsdlFiles" />
114                 <property name="wsdl.MsaWS" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/MuscleWS?wsdl" />
115                 <property name="wsdl.MsaWS2" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/ClustalWS?wsdl" />
116                 <property name="WSInterf" value="MsaWS" />
117                 <property name="wsdl.Namespace" value="vamsas" />
118                 <property name="wsdl.ClientNS" value="ext.vamsas" />
119                 <!-- the class path for building the application -->
120                 <path id="build.classpath">
121                         <fileset dir="utils">
122                                 <include name="*.jar" />
123                                 <include name="**/*.jar" />
124                         </fileset>
125                         <fileset dir="${libDir}">
126                                 <include name="*.jar" />
127                                 <include name="**/*.jar" />
128                         </fileset>
129                         <fileset dir="${java.home}/lib">
130                                 <include name="plugin.jar"/>
131                         </fileset>
132                         <fileset dir="appletlib">
133                                 <!-- the JmolApplet includes the JmolApplet console and the application javac seems to always try and build all packages 
134                                 -->
135                                 <include name="${jmolJar}" />
136                         </fileset>
137
138                 </path>
139                 <property name="source.dist.name" value="${basedir}/jalview-src.tar.gz" />
140                 <!-- The Location of the java 1.1.8 jdk -->
141                 <!--<property name="java118.home" value="C:\Sun\jdk1.1.8" />
142                 -->
143                 <property name="java118.home" value="${java.home}" />
144                     <!--<property name="applet.jre.tools" value="${java118.home}/lib/classes.zip" />
145                 --><!-- jre for 1.4 version -->
146                 <property name="applet.jre.tools" value="${java.home}/lib/rt.jar"/>
147                 
148                 <!-- the classpath for building the 1.1 applet -->
149                 <path id="jalviewlite.deps">
150                         <fileset dir="${java118.home}">
151                                 <include name="lib/classes.zip" />
152                         </fileset>
153                         <fileset dir="${java.home}/lib">
154                                 <include name="plugin.jar"/>
155                         </fileset>
156                         <pathelement location="appletlib/${jmolJar}" />
157                 </path>
158     <!-- default location for outputting javadoc -->
159     <property name="javadocDir" value="${packageDir}/javadoc"/>
160         </target>
161
162
163         <taskdef classpath="utils/roxes-ant-tasks-1.2-2004-01-30.jar" resource="com/roxes/tools/ant/taskdefs.properties" />
164         <target name="buildPropertiesFile" depends="init">
165                 <tstamp prefix="build">
166                         <format property="date" pattern="dd MMMM yyyy" />
167                 </tstamp>
168                 <properties file="${outputDir}/.build_properties">
169                         <header>
170           ---Jalview Build Details---
171         </header>
172                         <property name="VERSION" value="${JALVIEW_VERSION}" />
173                         <property name="BUILD_DATE" value="${build.date}" />
174                 </properties>
175         </target>
176
177
178         <target name="clean" depends="init">
179                 <!-- not efficient yet. -->
180                 <delete dir="${outputDir}" includes="*,**/*"/>
181         </target>
182
183         <target name="distclean" depends="init, clean">
184
185                 <echo message="REMOVING ALL BACKUP/AUTOSAVES!" />
186                 <delete>
187                         <fileset dir=".">
188                                 <include name="${outputJar}" />
189                                 <include name="#*#" />
190                                 <include name="#*.*#" />
191                                 <include name="**/#*#" />
192                                 <include name="**/#*.*#" />
193                                 <include name="*~" />
194                                 <include name="*.*~" />
195                                 <include name="**/*~" />
196                                 <include name="**/*.*~" />
197                         </fileset>
198                 </delete>
199         </target>
200
201         <target name="prepare" depends="init">
202                 <mkdir dir="${outputDir}" />
203                 <copy todir="${outputDir}">
204                         <fileset dir=".">
205                                 <include name="${docDir}/**/*.*" />
206                                 <include name="${helpDir}/**/*.*" />
207                                 <include name="${libDir}/*.jar" />
208                         </fileset>
209                         <fileset dir="${resourceDir}">
210                                 <include name="**/*.*" />
211                         </fileset>
212                 </copy>
213         </target>
214
215         <target name="build" depends="prepare">
216                 <!-- not efficient yet. -->
217                 <javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="build.classpath">
218                         <exclude name="jalview/*applet*" />
219                         <exclude name="jalview/appletgui/**" />
220                         <exclude name="com/stevesoft/**" />
221                 </javac>
222         </target>
223         <target name="buildindices" depends="init, prepare" unless="help.uptodate">
224                 <java classname="com.sun.java.help.search.Indexer" classpathref="build.classpath" fork="true" dir="${outputDir}/${helpDir}">
225                         <arg line="html" />
226                 </java>
227         </target>
228
229         <target name="makefulldist" depends="makedist">
230                 <!-- the default keystore details might need to be edited here -->
231                 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
232
233                         <fileset dir="${packageDir}">
234                                 <include name="*.jar" />
235                         </fileset>
236                 </signjar>
237                 <copy todir="${packageDir}">
238                         <fileset dir="${resourceDir}/images">
239                                 <include name="${WebStartImage}"/>
240                         </fileset>
241                                         </copy>
242                 
243                 <taskdef classpathref="build.classpath" resource="com/roxes/tools/ant/taskdefs.properties" />
244
245                 <!--    codebase="http://www.jalview.org/jalview/webstart" -->
246                 <!-- href="jalview.jnlp" prevent hard-wired pickup of jnlp in certain javaws versions -->
247                 <jnlp toFile="${packageDir}/jalview.jnlp" codebase="${WebStartLocation}">
248                         <information>
249                                 <title>Jalview</title>
250                                 <vendor>The Barton Group</vendor>
251                                 <homepage href="http://www.jalview.org" />
252                                 <description>Jalview Multiple Alignment Editor</description>
253                                 <description kind="short">Jalview</description>
254                                 <icon href="${WebStartImage}" />
255                                 <offline_allowed/>
256                         </information>
257                         <resources>
258                                 <j2se version="${j2sev}" initial_heap_size="10M"  />
259                                 <fileset dir="${packageDir}">
260                                         <include name="jalview.jar" />
261                                 </fileset>
262                                 <fileset dir="${packageDir}">
263                                         <include name="*.jar" />
264                                         <include name="*_*.jar" />
265                                         <exclude name="jalview.jar" />
266                                 </fileset>
267                                 <property name="jalview.version" value="${JALVIEW_VERSION}" />
268                         </resources>
269                         <application_desc main_class="jalview.bin.Jalview">
270                         </application_desc>
271                         <security>
272                                 <all_permissions />
273                         </security>
274                 </jnlp>         
275                 <jnlp toFile="${packageDir}/jalview_1G.jnlp" codebase="${WebStartLocation}">
276                         <information>
277                                 <title>Jalview</title>
278                                 <vendor>The Barton Group</vendor>
279                                 <homepage href="http://www.jalview.org" />
280                                 <description>Jalview Multiple Alignment Editor</description>
281                                 <description kind="short">Jalview</description>
282                                 <icon href="${WebStartImage}" />
283                                 <offline_allowed />
284                         </information>
285                         <resources>
286                                 <j2se version="${j2sev}" initial_heap_size="128M" max_heap_size="512M" />
287                                 <fileset dir="${packageDir}">
288                                         <include name="jalview.jar" />
289                                 </fileset>
290                                 <fileset dir="${packageDir}">
291                                         <include name="*.jar" />
292                                         <include name="*_*.jar" />
293                                         <exclude name="jalview.jar" />
294                                 </fileset>
295                                 <property name="jalview.version" value="${JALVIEW_VERSION}" />
296                         </resources>
297                         <application_desc main_class="jalview.bin.Jalview">
298                         </application_desc>
299                         <security>
300                                 <all_permissions />
301                         </security>
302                 </jnlp>
303                 <jnlp toFile="${packageDir}/jalview_2G.jnlp" codebase="${WebStartLocation}">
304                         <information>
305                                 <title>Jalview</title>
306                                 <vendor>The Barton Group</vendor>
307                                 <homepage href="http://www.jalview.org" />
308                                 <description>Jalview Multiple Alignment Editor</description>
309                                 <description kind="short">Jalview</description>
310                                 <icon href="${WebStartImage}" />
311                                 <offline_allowed />
312                         </information>
313                         <resources>
314                                 <j2se version="${j2sev}" initial_heap_size="256M" max_heap_size="1024M" />
315                                 <fileset dir="${packageDir}">
316                                         <include name="jalview.jar" />
317                                 </fileset>
318                                 <fileset dir="${packageDir}">
319                                         <include name="*.jar" />
320                                         <include name="*_*.jar" />
321                                         <exclude name="jalview.jar" />
322                                 </fileset>
323                                 <property name="jalview.version" value="${JALVIEW_VERSION}" />
324                         </resources>
325                         <application_desc main_class="jalview.bin.Jalview">
326                         </application_desc>
327                         <security>
328                                 <all_permissions />
329                         </security>
330                 </jnlp>
331                         <!-- finally, need to postprocess to add in associations at end of 'information' element 
332                         
333                         <xslt in="${packageDir}/jalview_noa_1G.jnlp" out="${packageDir}/jalview_1G.jnlp">
334                 
335                 </xslt>
336                         
337                         
338                         -->
339                                         <!--
340                                 <association mime-type="application-x/ext-file" extensions="fa"/>
341         <association mime-type="application-x/ext-file" extensions="fasta"/>
342         <association mime-type="application-x/ext-file" extensions="fastq"/>
343         <association mime-type="application-x/ext-file" extensions="blc"/>
344         <association mime-type="application-x/ext-file" extensions="msf"/>
345         <association mime-type="application-x/ext-file" extensions="pfam"/>
346         <association mime-type="application-x/ext-file" extensions="aln"/>
347         <association mime-type="application-x/ext-file" extensions="pir"/>
348         <association mime-type="application-x/ext-file" extensions="amsa"/>
349         <association mime-type="application-x/ext-file" extensions="stk"/>
350         <association mime-type="application-x/ext-file" extensions="jar"/>-->
351         
352         </target>
353
354         <target name="runenv" depends="init">
355                 <path id="run.classpath">
356                         <pathelement location="${outputDir}" />
357                         <fileset dir="${outputDir}">
358                                 <include name="${libDir}/*.jar" />
359                         </fileset>
360                 </path>
361                 <pathconvert targetos="unix" refid="run.classpath" property="run.classpath" />
362
363                 <echo>java -classpath ${run.classpath} jalview.bin.Jalview
364       </echo>
365         </target>
366
367         <target name="buildextclients" depends="init">
368                 <input message="Building external client source from WSDLs - Do you really want to do this ? (Yy/Nn)" validargs="Y,y,n,N" defaultvalue="N" addproperty="doextbuild.response" />
369                 <condition property="dontextbuild">
370                         <equals arg1="n" arg2="${doextbuild.response}" />
371                 </condition>
372                 <condition property="dontextbuild">
373                         <equals arg1="N" arg2="${doextbuild.response}" />
374                 </condition>
375                 <fail if="dontextbuild">
376         Build External Client Code process aborted by user. Jalview source is unchanged.
377       </fail>
378                 <!-- Currently, this doesn't happen automatically.
379      1. Run WSDL2Java as below, which generates an ext.vamsas +
380      vamsas.<datapackages> fileset.
381      2. refactor ext.vamsas.SpecificserviceWS* to
382      ext.vamsas.ServiceclassWS* that implements the ServiceclassWSI interface.
383      3. Update the jalview.ws.*WServices classes to reflect the
384      interface type, and all locations of this wsdl type that Jalview
385      might be using.
386
387 -->
388                 <path id="axisbuild">
389                         <path refid="build.classpath" />
390                 </path>
391                 <taskdef resource="axis-tasks.properties" classpathref="axisbuild" />
392                 <move todir="./bak">
393                         <fileset dir="${sourceDir}" id="client">
394                                 <include name="${wsdl.ClientNS}/*.*" />
395                         </fileset>
396                 </move>
397
398                 <axis-wsdl2java output="${sourceDir}" verbose="true" url="${wsdl.MsaWS2}" serverside="false" deployscope="Request" debug="false" helpergen="true" all="true">
399                         <mappingSet>
400                                 <mapping namespace="${wsdl.Namespace}" package="${wsdl.ClientNS}" />
401                                 <mapping namespace="http://dataTypes.vamsas" package="${wsdl.ClientNS}" />
402                         </mappingSet>
403                 </axis-wsdl2java>
404         </target>
405
406         <target name="makedist" depends="build, buildPropertiesFile, buildindices">
407                 <!-- make the package jar if not already existing -->
408                 <mkdir dir="${packageDir}" />
409                 <!-- clean dir if it already existed -->
410                 <delete>
411                         <fileset dir="${packageDir}">
412                                 <include name="*.jar"/>
413                         </fileset>
414                 </delete>
415                 <jar destfile="${packageDir}/${outputJar}">
416                         <manifest>
417                                 <attribute name="Main-Class" value="jalview.bin.Jalview" />
418                         </manifest>
419                         <fileset dir="${outputDir}/">
420                                 <exclude name="cache*/**" />
421                                 <exclude name="*.jar" />
422                                 <exclude name="*.jar.*" />
423                                 <exclude name="**/*.jar" />
424                                 <exclude name="**/*.jar.*" />
425                         </fileset>
426                 </jar>
427
428                 <copy toDir="${packageDir}" flatten="true">
429                         <fileset dir="${outputDir}">
430                                 <include name="*.jar" />
431                                 <include name="**/*.jar" />
432                         </fileset>
433                 </copy>
434         </target>
435
436
437         <!-- jalopy code reformatter -->
438         <target name="sourcescrub" depends="init,build">
439                 <jalopy destdir="jsrc" classpathref="run.classpath" convention="jalview-jalopy.xml">
440                         <fileset dir="${sourceDir}">
441                                 <include name="*.java" />
442                                 <include name="**/*.java" />
443                                 <include name="**/**/*.java" />
444                         </fileset>
445                 </jalopy>
446         </target>
447
448
449
450         <!-- Compile, package and obfuscate Jalview Applet -->
451         <target name="makeApplet" depends="obfuscate" description="assemble the final jalviewLite applet jar with or without obfuscation"/>
452
453         <target name="compileApplet" depends="init,clean">
454                 <mkdir dir="${outputDir}" />
455                 <javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" 
456                         classpathref="jalviewlite.deps" includes="jalview/appletgui/**"
457                         excludes="ext/**,MCview/**,org/**,vamsas/**" />
458         </target>
459
460         <target name="packageApplet" depends="compileApplet, buildPropertiesFile">
461                 <copy file="${resourceDir}/images/idwidth.gif" toFile="${outputDir}/images/idwidth.gif" />
462                 <copy file="${resourceDir}/images/link.gif" toFile="${outputDir}/images/link.gif" />
463                 <jar destfile="in.jar">
464                         <manifest>
465                                 <attribute name="Main-Class" value="jalview.bin.JalviewLite" />
466                         </manifest>
467                         <fileset dir="${outputDir}">
468                                 <include name="com/**" />
469                                 <include name="MCview/**" />
470                                 <include name="jalview/**" />
471                                 <include name=".build_properties" />
472                                 <include name="images/idwidth.gif" />
473                                 <include name="images/link.gif" />
474                         </fileset>
475                 </jar>
476         </target>
477         <target name="obfuscate" depends="-obfuscatefake,-obfuscatereally">
478         </target>
479         <target name="-obfuscatefake" depends="packageApplet" if="donotobfuscate">
480                 <copy file="in.jar" tofile="${jalviewLiteJar}" overwrite="true" />
481                 <delete file="in.jar" />
482         </target>
483         <target name="-obfuscatereally" unless="donotobfuscate">
484
485                 <path id="obfuscateDeps.path">
486                         <pathelement location="${applet.jre.tools}" />
487                         <pathelement location="appletlib/${jmolJar}" />
488                 </path>
489                 <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
490
491                 <proguard>
492                         <injar file="in.jar" />
493                         <outjar file="${jalviewLiteJar}" />
494                         <libraryjar refid="obfuscateDeps.path" />
495                         <keep access="public" type="class" name="jalview.bin.JalviewLite">
496                                 <field access="public" />
497                                 <method access="public" />
498                                 <constructor access="public" />
499                         </keep>
500                         <!--      -libraryjars "${obfuscateDeps}"
501       -injars      in.jar
502       -outjars     jalviewApplet.jar
503       -keep public class jalview.bin.JalviewLite
504        { public * ; } -->
505                 </proguard>
506                 <delete file="in.jar" />
507         </target>
508
509         <target name="castorbinding" depends="init" description="Generate Java bindings to supported Jalview XML models.">
510                 <taskdef name="castor-srcgen" classname="org.castor.anttask.CastorCodeGenTask" classpathref="build.classpath" />
511                 <delete>
512                         <fileset dir="${sourceDir}/jalview/schemabinding/version2">
513                                 <include name="*.java" />
514                                 <include name="descriptors/*.java" />
515                         </fileset>
516                 </delete>
517                 <castor-srcgen file="${schemaDir}/vamsas.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
518                 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
519                 <castor-srcgen file="${schemaDir}/JalviewWsParamSet.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
520                 <castor-srcgen file="${schemaDir}/jalview.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
521                 <!-- 
522                 now build the jalview.binding package with the old schema set
523                 -->
524                 <delete>
525                         <fileset dir="${sourceDir}/jalview/binding/">
526                                 <include name="**" />
527                         </fileset>
528                 </delete>
529                 <castor-srcgen file="${schemaDir}/vamsasJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
530                 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
531                 <castor-srcgen file="${schemaDir}/jalviewJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
532         </target>
533         <target name="sourcedist" description="create jalview source distribution" depends="init">
534                 <delete file="${source.dist.name}" />
535                 <tar destfile="${source.dist.name}" compression="gzip">
536                         <tarfileset dir="./" prefix="jalview" preserveLeadingSlashes="true">
537                                 <include name="LICENSE" />
538                                 <include name="README" />
539                                 <include name="build.xml" />
540                                 <include name="jalview-jalopy.xml" />
541                                 <include name="JalviewApplet.jpx" />
542                                 <include name="JalviewX.jpx" />
543                                 <include name="nbbuild.xml"/>
544                                 <include name="nbproject/genfiles.properties"/>
545         <include name="nbproject/project.properties"/>
546         <include name="nbproject/project.xml"/>
547                                 <include name="${sourceDir}/*.java" />
548                                 <include name="${sourceDir}/**/*.java" />
549                                 <include name="${sourceDir}/**/*.cdr" />
550                                 <include name="${libDir}/**/*" />
551                                 <include name="${resourceDir}/**/*" />
552                                 <include name="${helpDir}/**/*" />
553                                 <include name="appletlib/${jmolJar}" />
554                                 <exclude name="**/*locales" />
555                                 <exclude name="*locales/**" />
556                                 <exclude name="utils/InstallAnywhere/**Build.iap_xml" />
557                                 <exclude name="utils/InstallAnywhere/**Build*/**" />
558                                 <exclude name="utils/InstallAnywhere/**Build*/**" />
559                                 <exclude name="utils/InstallAnywhere/**locale*" />
560                                 <exclude name="utils/InstallAnywhere/**locale*/**" />
561                                 <include name="${schemaDir}/**/*" />
562                                 <include name="utils/**/*" />
563                                 <include name="${docDir}/**/*" />
564                                 <include name="examples/**/*" />
565                         </tarfileset>
566                 </tar>
567         </target>
568         <target name="pubapplet" description="installs the jalviewLite applet and dependent jars into an applet examples directory built under ${outputDir}" depends="makeApplet">
569           <copy todir="${packageDir}/examples">
570           <fileset dir="examples">
571                 <include name="**/*"/>
572                 <include name="javascript/*"/>
573       <include name="jmol/*"/>
574           </fileset>
575                 <fileset dir=".">
576                 <include name="jalviewApplet.jar"/>
577                         </fileset>
578                 <fileset dir="appletlib">
579                       <include name="**/*"/>
580                         </fileset>
581           </copy>
582                         
583         </target>
584         <target name="sourcedoc" description="Create jalview source documentation pages" depends="init">
585          <javadoc destdir="${javadocDir}">
586                 <packageset dir="${sourceDir}" includes="jalview/*,MCView/*">
587                 </packageset>
588                 </javadoc>
589         </target>
590         
591 </project>