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