standard embedded jalviewLite example (JAL-815)
[jalview.git] / build.xml
1 <?xml version="1.0"?>
2 <!--
3  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
4  * Copyright (C) 2010 J Procter, AM Waterhouse, 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                 <!-- build directory configuration -->
92                 <property name="libDir" value="lib" />
93                 <property name="resourceDir" value="resources" />
94                 <property name="helpDir" value="help" />
95                 <property name="docDir" value="doc" />
96                 <property name="sourceDir" value="src" />
97                 <property name="schemaDir" value="schemas" />
98                 <property name="outputDir" value="classes" />
99                 <property name="packageDir" value="dist" />
100                 <property name="outputJar" value="jalview.jar" />
101                 <!-- Jalview Applet JMol Jar Dependency -->
102                 <property name="jmolJar" value="JmolApplet-12.1.13.jar" />
103                 <property name="jalviewLiteJar" value="jalviewApplet.jar" />
104                 <!-- switch to indicate if we should obfuscate jalviewLite -->
105                 <!--<property name="donotobfuscate" value="true"/> -->
106
107                 <!-- Jalview Web Service Clients - see the comments in 'buildextclients' for details -->
108                 <property name="wsdl.File" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred?wsdl" />
109                 <property name="wsdl.Files" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/vamsas?wsdlFiles" />
110                 <property name="wsdl.MsaWS" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/MuscleWS?wsdl" />
111                 <property name="wsdl.MsaWS2" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/ClustalWS?wsdl" />
112                 <property name="WSInterf" value="MsaWS" />
113                 <property name="wsdl.Namespace" value="vamsas" />
114                 <property name="wsdl.ClientNS" value="ext.vamsas" />
115                 <!-- the class path for building the application -->
116                 <path id="build.classpath">
117                         <fileset dir="utils">
118                                 <include name="*.jar" />
119                                 <include name="**/*.jar" />
120                         </fileset>
121                         <fileset dir="${libDir}">
122                                 <include name="*.jar" />
123                                 <include name="**/*.jar" />
124                         </fileset>
125                         <fileset dir="${java.home}/lib">
126                                 <include name="plugin.jar"/>
127                         </fileset>
128                         <fileset dir="appletlib">
129                                 <!-- the JmolApplet includes the JmolApplet console and the application javac seems to always try and build all packages 
130                                 -->
131                                 <include name="${jmolJar}" />
132                         </fileset>
133
134                 </path>
135                 <property name="source.dist.name" value="${basedir}/jalview-src.tar.gz" />
136                 <!-- The Location of the java 1.1.8 jdk -->
137                 <!--<property name="java118.home" value="C:\Sun\jdk1.1.8" />
138                 -->
139                 <property name="java118.home" value="${java.home}" />
140                     <!--<property name="applet.jre.tools" value="${java118.home}/lib/classes.zip" />
141                 --><!-- jre for 1.4 version -->
142                 <property name="applet.jre.tools" value="${java.home}/lib/rt.jar"/>
143                 
144                 <!-- the classpath for building the 1.1 applet -->
145                 <path id="jalviewlite.deps">
146                         <fileset dir="${java118.home}">
147                                 <include name="lib/classes.zip" />
148                         </fileset>
149                         <fileset dir="${java.home}/lib">
150                                 <include name="plugin.jar"/>
151                         </fileset>
152                         <pathelement location="appletlib/${jmolJar}" />
153                 </path>
154         </target>
155
156
157         <taskdef classpath="utils/roxes-ant-tasks-1.2-2004-01-30.jar" resource="com/roxes/tools/ant/taskdefs.properties" />
158         <target name="buildPropertiesFile" depends="init">
159                 <tstamp prefix="build">
160                         <format property="date" pattern="dd MMMM yyyy" />
161                 </tstamp>
162                 <properties file="${outputDir}/.build_properties">
163                         <header>
164           ---Jalview Build Details---
165         </header>
166                         <property name="VERSION" value="${JALVIEW_VERSION}" />
167                         <property name="BUILD_DATE" value="${build.date}" />
168                 </properties>
169         </target>
170
171
172         <target name="clean" depends="init">
173                 <!-- not efficient yet. -->
174                 <delete dir="${outputDir}" />
175         </target>
176
177         <target name="distclean" depends="init, clean">
178
179                 <echo message="REMOVING ALL BACKUP/AUTOSAVES!" />
180                 <delete>
181                         <fileset dir=".">
182                                 <include name="${outputJar}" />
183                                 <include name="#*#" />
184                                 <include name="#*.*#" />
185                                 <include name="**/#*#" />
186                                 <include name="**/#*.*#" />
187                                 <include name="*~" />
188                                 <include name="*.*~" />
189                                 <include name="**/*~" />
190                                 <include name="**/*.*~" />
191                         </fileset>
192                 </delete>
193         </target>
194
195         <target name="prepare" depends="init">
196                 <mkdir dir="${outputDir}" />
197                 <copy todir="${outputDir}">
198                         <fileset dir=".">
199                                 <include name="${docDir}/**/*.*" />
200                                 <include name="${helpDir}/**/*.*" />
201                                 <include name="${libDir}/*.jar" />
202                         </fileset>
203                         <fileset dir="${resourceDir}">
204                                 <include name="**/*.*" />
205                         </fileset>
206                 </copy>
207         </target>
208
209         <target name="build" depends="prepare">
210                 <!-- not efficient yet. -->
211                 <javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="build.classpath">
212                         <exclude name="jalview/*applet*" />
213                         <exclude name="jalview/appletgui/**" />
214                         <exclude name="com/stevesoft/**" />
215                 </javac>
216         </target>
217         <target name="buildindices" depends="init, prepare" unless="help.uptodate">
218                 <java classname="com.sun.java.help.search.Indexer" classpathref="build.classpath" fork="true" dir="${outputDir}/${helpDir}">
219                         <arg line="html" />
220                 </java>
221         </target>
222
223         <target name="makefulldist" depends="makedist">
224                 <!-- the default keystore details might need to be edited here -->
225                 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
226
227                         <fileset dir="${packageDir}">
228                                 <include name="*.jar" />
229                         </fileset>
230                 </signjar>
231                 <taskdef classpathref="build.classpath" resource="com/roxes/tools/ant/taskdefs.properties" />
232
233                 <!--    codebase="http://www.jalview.org/jalview/webstart" -->
234                 <!-- href="jalview.jnlp" prevent hard-wired pickup of jnlp in certain javaws versions -->
235                 <jnlp toFile="${packageDir}/jalview.jnlp" codebase="${WebStartLocation}">
236                         <information>
237                                 <title>Jalview</title>
238                                 <vendor>The Barton Group</vendor>
239                                 <homepage href="http://www.jalview.org" />
240                                 <description>Jalview Multiple Alignment Editor</description>
241                                 <description kind="short">Jalview</description>
242                                 <icon href="logo_big.gif" />
243                                 <offline_allowed />
244                                 <!--
245         <association mime-type="application-x/ext-file" extensions="fa"/>
246         <association mime-type="application-x/ext-file" extensions="fasta"/>
247         <association mime-type="application-x/ext-file" extensions="fastq"/>
248         <association mime-type="application-x/ext-file" extensions="blc"/>
249         <association mime-type="application-x/ext-file" extensions="msf"/>
250         <association mime-type="application-x/ext-file" extensions="pfam"/>
251         <association mime-type="application-x/ext-file" extensions="aln"/>
252         <association mime-type="application-x/ext-file" extensions="pir"/>
253         <association mime-type="application-x/ext-file" extensions="amsa"/>
254         -->
255                         </information>
256                         <resources>
257                                 <j2se version="1.5+" initial_heap_size="10M" />
258                                 <fileset dir="${packageDir}">
259                                         <include name="jalview.jar" />
260                                 </fileset>
261                                 <fileset dir="${packageDir}">
262                                         <include name="*.jar" />
263                                         <include name="*_*.jar" />
264                                         <exclude name="jalview.jar" />
265                                 </fileset>
266                                 <property name="jalview.version" value="${JALVIEW_VERSION}" />
267                         </resources>
268                         <application_desc main_class="jalview.bin.Jalview">
269                         </application_desc>
270                         <security>
271                                 <all_permissions />
272                         </security>
273                 </jnlp>
274                 <!-- the rest of these jnlp tasks are copy and pastes of the above but with different Vm args -->
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="logo_big.gif" />
283                                 <offline_allowed />
284                                 <!--
285                 <association mime-type="application-x/ext-file" extensions="fa"/>
286                 <association mime-type="application-x/ext-file" extensions="fasta"/>
287                 <association mime-type="application-x/ext-file" extensions="fastq"/>
288                 <association mime-type="application-x/ext-file" extensions="blc"/>
289                 <association mime-type="application-x/ext-file" extensions="msf"/>
290                 <association mime-type="application-x/ext-file" extensions="pfam"/>
291                 <association mime-type="application-x/ext-file" extensions="aln"/>
292                 <association mime-type="application-x/ext-file" extensions="pir"/>
293                 <association mime-type="application-x/ext-file" extensions="amsa"/>
294                 -->
295                         </information>
296                         <resources>
297                                 <j2se version="1.5+" initial_heap_size="64M" max_heap_size="512M" />
298                                 <fileset dir="${packageDir}">
299                                         <include name="jalview.jar" />
300                                 </fileset>
301                                 <fileset dir="${packageDir}">
302                                         <include name="*.jar" />
303                                         <include name="*_*.jar" />
304                                         <exclude name="jalview.jar" />
305                                 </fileset>
306                                 <property name="jalview.version" value="${JALVIEW_VERSION}" />
307                         </resources>
308                         <application_desc main_class="jalview.bin.Jalview">
309                         </application_desc>
310                         <security>
311                                 <all_permissions />
312                         </security>
313                 </jnlp>
314                 <jnlp toFile="${packageDir}/jalview_2G.jnlp" codebase="${WebStartLocation}">
315                         <information>
316                                 <title>Jalview</title>
317                                 <vendor>The Barton Group</vendor>
318                                 <homepage href="http://www.jalview.org" />
319                                 <description>Jalview Multiple Alignment Editor</description>
320                                 <description kind="short">Jalview</description>
321                                 <icon href="logo_big.gif" />
322                                 <offline_allowed />
323                                 <!--
324                         <association mime-type="application-x/ext-file" extensions="fa"/>
325                         <association mime-type="application-x/ext-file" extensions="fasta"/>
326                         <association mime-type="application-x/ext-file" extensions="fastq"/>
327                         <association mime-type="application-x/ext-file" extensions="blc"/>
328                         <association mime-type="application-x/ext-file" extensions="msf"/>
329                         <association mime-type="application-x/ext-file" extensions="pfam"/>
330                         <association mime-type="application-x/ext-file" extensions="aln"/>
331                         <association mime-type="application-x/ext-file" extensions="pir"/>
332                         <association mime-type="application-x/ext-file" extensions="amsa"/>
333                         -->
334                         </information>
335                         <resources>
336                                 <j2se version="1.5+" initial_heap_size="256M" max_heap_size="1024M" />
337                                 <fileset dir="${packageDir}">
338                                         <include name="jalview.jar" />
339                                 </fileset>
340                                 <fileset dir="${packageDir}">
341                                         <include name="*.jar" />
342                                         <include name="*_*.jar" />
343                                         <exclude name="jalview.jar" />
344                                 </fileset>
345                                 <property name="jalview.version" value="${JALVIEW_VERSION}" />
346                         </resources>
347                         <application_desc main_class="jalview.bin.Jalview">
348                         </application_desc>
349                         <security>
350                                 <all_permissions />
351                         </security>
352                 </jnlp>
353
354         </target>
355
356         <target name="runenv" depends="init">
357                 <path id="run.classpath">
358                         <pathelement location="${outputDir}" />
359                         <fileset dir="${outputDir}">
360                                 <include name="${libDir}/*.jar" />
361                         </fileset>
362                 </path>
363                 <pathconvert targetos="unix" refid="run.classpath" property="run.classpath" />
364
365                 <echo>java -classpath ${run.classpath} jalview.bin.Jalview
366       </echo>
367         </target>
368
369         <target name="buildextclients" depends="init">
370                 <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" />
371                 <condition property="dontextbuild">
372                         <equals arg1="n" arg2="${doextbuild.response}" />
373                 </condition>
374                 <condition property="dontextbuild">
375                         <equals arg1="N" arg2="${doextbuild.response}" />
376                 </condition>
377                 <fail if="dontextbuild">
378         Build External Client Code process aborted by user. Jalview source is unchanged.
379       </fail>
380                 <!-- Currently, this doesn't happen automatically.
381      1. Run WSDL2Java as below, which generates an ext.vamsas +
382      vamsas.<datapackages> fileset.
383      2. refactor ext.vamsas.SpecificserviceWS* to
384      ext.vamsas.ServiceclassWS* that implements the ServiceclassWSI interface.
385      3. Update the jalview.ws.*WServices classes to reflect the
386      interface type, and all locations of this wsdl type that Jalview
387      might be using.
388
389 -->
390                 <path id="axisbuild">
391                         <path refid="build.classpath" />
392                 </path>
393                 <taskdef resource="axis-tasks.properties" classpathref="axisbuild" />
394                 <move todir="./bak">
395                         <fileset dir="${sourceDir}" id="client">
396                                 <include name="${wsdl.ClientNS}/*.*" />
397                         </fileset>
398                 </move>
399
400                 <axis-wsdl2java output="${sourceDir}" verbose="true" url="${wsdl.MsaWS2}" serverside="false" deployscope="Request" debug="false" helpergen="true" all="true">
401                         <mappingSet>
402                                 <mapping namespace="${wsdl.Namespace}" package="${wsdl.ClientNS}" />
403                                 <mapping namespace="http://dataTypes.vamsas" package="${wsdl.ClientNS}" />
404                         </mappingSet>
405                 </axis-wsdl2java>
406         </target>
407
408         <target name="makedist" depends="build, buildPropertiesFile, buildindices">
409                 <!-- make the package jar if not already existing -->
410                 <mkdir dir="${packageDir}" />
411                 <!-- clean dir if it already existed -->
412                 <delete>
413                         <fileset dir="${packageDir}">
414                                 <include name="*.jar"/>
415                         </fileset>
416                 </delete>
417                 <jar destfile="${packageDir}/${outputJar}">
418                         <manifest>
419                                 <attribute name="Main-Class" value="jalview.bin.Jalview" />
420                         </manifest>
421                         <fileset dir="${outputDir}/">
422                                 <exclude name="cache*/**" />
423                                 <exclude name="*.jar" />
424                                 <exclude name="*.jar.*" />
425                                 <exclude name="**/*.jar" />
426                                 <exclude name="**/*.jar.*" />
427                         </fileset>
428                 </jar>
429
430                 <copy toDir="${packageDir}" flatten="true">
431                         <fileset dir="${outputDir}">
432                                 <include name="*.jar" />
433                                 <include name="**/*.jar" />
434                         </fileset>
435                 </copy>
436         </target>
437
438
439         <!-- jalopy code reformatter -->
440         <target name="sourcescrub" depends="init,build">
441                 <jalopy destdir="jsrc" classpathref="run.classpath" convention="jalview-jalopy.xml">
442                         <fileset dir="${sourceDir}">
443                                 <include name="*.java" />
444                                 <include name="**/*.java" />
445                                 <include name="**/**/*.java" />
446                         </fileset>
447                 </jalopy>
448         </target>
449
450
451
452         <!-- Compile, package and obfuscate Jalview Applet -->
453         <target name="makeApplet" depends="obfuscate" description="assemble the final jalviewLite applet jar with or without obfuscation"/>
454
455         <target name="compileApplet" depends="init,clean">
456                 <mkdir dir="${outputDir}" />
457                 <javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" 
458                         classpathref="jalviewlite.deps" includes="jalview/appletgui/**"
459                         excludes="ext/**,MCview/**,org/**,vamsas/**" />
460         </target>
461
462         <target name="packageApplet" depends="compileApplet, buildPropertiesFile">
463                 <copy file="${resourceDir}/images/idwidth.gif" toFile="${outputDir}/images/idwidth.gif" />
464                 <copy file="${resourceDir}/images/link.gif" toFile="${outputDir}/images/link.gif" />
465                 <jar destfile="in.jar">
466                         <manifest>
467                                 <attribute name="Main-Class" value="jalview.bin.JalviewLite" />
468                         </manifest>
469                         <fileset dir="${outputDir}">
470                                 <include name="com/**" />
471                                 <include name="MCview/**" />
472                                 <include name="jalview/**" />
473                                 <include name=".build_properties" />
474                                 <include name="images/idwidth.gif" />
475                                 <include name="images/link.gif" />
476                         </fileset>
477                 </jar>
478         </target>
479         <target name="obfuscate" depends="-obfuscatefake,-obfuscatereally">
480         </target>
481         <target name="-obfuscatefake" depends="packageApplet" if="donotobfuscate">
482                 <copy file="in.jar" tofile="${jalviewLiteJar}" overwrite="true" />
483                 <delete file="in.jar" />
484         </target>
485         <target name="-obfuscatereally" unless="donotobfuscate">
486
487                 <path id="obfuscateDeps.path">
488                         <pathelement location="${applet.jre.tools}" />
489                         <pathelement location="appletlib/${jmolJar}" />
490                 </path>
491                 <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
492
493                 <proguard>
494                         <injar file="in.jar" />
495                         <outjar file="${jalviewLiteJar}" />
496                         <libraryjar refid="obfuscateDeps.path" />
497                         <keep access="public" type="class" name="jalview.bin.JalviewLite">
498                                 <field access="public" />
499                                 <method access="public" />
500                                 <constructor access="public" />
501                         </keep>
502                         <!--      -libraryjars "${obfuscateDeps}"
503       -injars      in.jar
504       -outjars     jalviewApplet.jar
505       -keep public class jalview.bin.JalviewLite
506        { public * ; } -->
507                 </proguard>
508                 <delete file="in.jar" />
509         </target>
510
511         <target name="castorbinding" depends="init" description="Generate Java bindings to supported Jalview XML models.">
512                 <taskdef name="castor-srcgen" classname="org.castor.anttask.CastorCodeGenTask" classpathref="build.classpath" />
513                 <delete>
514                         <fileset dir="${sourceDir}/jalview/schemabinding/version2">
515                                 <include name="*.java" />
516                                 <include name="descriptors/*.java" />
517                         </fileset>
518                 </delete>
519                 <castor-srcgen file="${schemaDir}/vamsas.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
520                 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
521                 <castor-srcgen file="${schemaDir}/JalviewWsParamSet.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
522                 <castor-srcgen file="${schemaDir}/jalview.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
523                 <!-- 
524                 now build the jalview.binding package with the old schema set
525                 -->
526                 <delete>
527                         <fileset dir="${sourceDir}/jalview/binding/">
528                                 <include name="**" />
529                         </fileset>
530                 </delete>
531                 <castor-srcgen file="${schemaDir}/vamsasJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
532                 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
533                 <castor-srcgen file="${schemaDir}/jalviewJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
534         </target>
535         <target name="sourcedist" description="create jalview source distribution" depends="init">
536                 <delete file="${source.dist.name}" />
537                 <tar destfile="${source.dist.name}" compression="gzip">
538                         <tarfileset dir="./" prefix="jalview" preserveLeadingSlashes="true">
539                                 <include name="LICENSE" />
540                                 <include name="README" />
541                                 <include name="build.xml" />
542                                 <include name="jalview-jalopy.xml" />
543                                 <include name="JalviewApplet.jpx" />
544                                 <include name="JalviewX.jpx" />
545                                 <include name="nbbuild.xml"/>
546                                 <include name="nbproject/genfiles.properties"/>
547         <include name="nbproject/project.properties"/>
548         <include name="nbproject/project.xml"/>
549                                 <include name="${sourceDir}/*.java" />
550                                 <include name="${sourceDir}/**/*.java" />
551                                 <include name="${sourceDir}/**/*.cdr" />
552                                 <include name="${libDir}/**/*" />
553                                 <include name="${resourceDir}/**/*" />
554                                 <include name="${helpDir}/**/*" />
555                                 <include name="appletlib/${jmolJar}" />
556                                 <exclude name="**/*locales" />
557                                 <exclude name="*locales/**" />
558                                 <exclude name="utils/InstallAnywhere/**Build.iap_xml" />
559                                 <exclude name="utils/InstallAnywhere/**Build*/**" />
560                                 <exclude name="utils/InstallAnywhere/**Build*/**" />
561                                 <exclude name="utils/InstallAnywhere/**locale*" />
562                                 <exclude name="utils/InstallAnywhere/**locale*/**" />
563                                 <include name="${schemaDir}/**/*" />
564                                 <include name="utils/**/*" />
565                                 <include name="${docDir}/**/*" />
566                                 <include name="examples/**/*" />
567                         </tarfileset>
568                 </tar>
569         </target>
570         <target name="pubapplet" description="installs the jalviewLite applet and dependent jars into an applet examples directory built under ${outputDir}" depends="makeApplet">
571           <copy todir="${packageDir}/examples">
572           <fileset dir="examples">
573                 <include name="**/*"/>
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 </project>