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