a3c7ee9c6fcb9e4947769f7399db9cb81227211b
[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.1.11_dev.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="jalview/appletgui/**"/>
206                         <exclude name="com/stevesoft/**"/>
207                 </javac>
208         </target>
209         <target name="buildindices" depends="init, prepare"
210     unless="help.uptodate">
211                 <java
212       classname="com.sun.java.help.search.Indexer"
213       classpathref="build.classpath"
214       fork="true"
215       dir="${outputDir}/${helpDir}"
216       >
217                         <arg line="html"/>
218                 </java>
219         </target>
220
221         <target name="makefulldist" depends="makedist">
222                 <!-- the default keystore details might need to be edited here -->
223                 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
224
225                         <fileset dir="${packageDir}">
226                                 <include name="*.jar" />
227                         </fileset>
228                 </signjar>
229                 <taskdef classpathref="build.classpath" resource="com/roxes/tools/ant/taskdefs.properties" />
230
231                 <!--    codebase="http://www.jalview.org/jalview/webstart" -->
232                 <!-- href="jalview.jnlp" prevent hard-wired pickup of jnlp in certain javaws versions -->
233                 <jnlp toFile="${packageDir}/jalview.jnlp" codebase="${WebStartLocation}">
234                         <information>
235                                 <title>Jalview</title>
236                                 <vendor>The Barton Group</vendor>
237                                 <homepage href="http://www.jalview.org" />
238                                 <description>Jalview Multiple Alignment Editor</description>
239                                 <description kind="short">Jalview</description>
240                                 <icon href="logo_big.gif" />
241                                 <offline_allowed />
242                                 <!--
243         <association mime-type="application-x/ext-file" extensions="fa"/>
244         <association mime-type="application-x/ext-file" extensions="fasta"/>
245         <association mime-type="application-x/ext-file" extensions="fastq"/>
246         <association mime-type="application-x/ext-file" extensions="blc"/>
247         <association mime-type="application-x/ext-file" extensions="msf"/>
248         <association mime-type="application-x/ext-file" extensions="pfam"/>
249         <association mime-type="application-x/ext-file" extensions="aln"/>
250         <association mime-type="application-x/ext-file" extensions="pir"/>
251         <association mime-type="application-x/ext-file" extensions="amsa"/>
252         -->
253                         </information>
254                         <resources>
255                                 <j2se version="1.5+" initial_heap_size="10M"/>
256                                 <fileset dir="${packageDir}">
257                                         <include name="jalview.jar" />
258                                 </fileset>
259                                 <fileset dir="${packageDir}">
260                                         <include name="*.jar" />
261                                         <include name="*_*.jar" />
262                                         <exclude name="jalview.jar" />
263                                 </fileset>
264                                 <property name="jalview.version" value="${JALVIEW_VERSION}" />
265                         </resources>
266                         <application_desc main_class="jalview.bin.Jalview">
267                         </application_desc>
268                         <security>
269                                 <all_permissions />
270                         </security>
271                 </jnlp>
272                 <!-- the rest of these jnlp tasks are copy and pastes of the above but with different Vm args -->
273                                         <jnlp toFile="${packageDir}/jalview_1G.jnlp" codebase="${WebStartLocation}">
274                                 <information>
275                                         <title>Jalview</title>
276                                         <vendor>The Barton Group</vendor>
277                                         <homepage href="http://www.jalview.org" />
278                                         <description>Jalview Multiple Alignment Editor</description>
279                                         <description kind="short">Jalview</description>
280                                         <icon href="logo_big.gif" />
281                                         <offline_allowed />
282                                         <!--
283                 <association mime-type="application-x/ext-file" extensions="fa"/>
284                 <association mime-type="application-x/ext-file" extensions="fasta"/>
285                 <association mime-type="application-x/ext-file" extensions="fastq"/>
286                 <association mime-type="application-x/ext-file" extensions="blc"/>
287                 <association mime-type="application-x/ext-file" extensions="msf"/>
288                 <association mime-type="application-x/ext-file" extensions="pfam"/>
289                 <association mime-type="application-x/ext-file" extensions="aln"/>
290                 <association mime-type="application-x/ext-file" extensions="pir"/>
291                 <association mime-type="application-x/ext-file" extensions="amsa"/>
292                 -->
293                                 </information>
294                                 <resources>
295                                         <j2se version="1.5+" initial_heap_size="64M" max_heap_size="512M"/>
296                                         <fileset dir="${packageDir}">
297                                                 <include name="jalview.jar" />
298                                         </fileset>
299                                         <fileset dir="${packageDir}">
300                                                 <include name="*.jar" />
301                                                 <include name="*_*.jar" />
302                                                 <exclude name="jalview.jar" />
303                                         </fileset>
304                                         <property name="jalview.version" value="${JALVIEW_VERSION}" />
305                                 </resources>
306                                 <application_desc main_class="jalview.bin.Jalview">
307                                 </application_desc>
308                                 <security>
309                                         <all_permissions />
310                                 </security>
311                         </jnlp>
312                         <jnlp toFile="${packageDir}/jalview_2G.jnlp" codebase="${WebStartLocation}">
313                                         <information>
314                                                 <title>Jalview</title>
315                                                 <vendor>The Barton Group</vendor>
316                                                 <homepage href="http://www.jalview.org" />
317                                                 <description>Jalview Multiple Alignment Editor</description>
318                                                 <description kind="short">Jalview</description>
319                                                 <icon href="logo_big.gif" />
320                                                 <offline_allowed />
321                                                 <!--
322                         <association mime-type="application-x/ext-file" extensions="fa"/>
323                         <association mime-type="application-x/ext-file" extensions="fasta"/>
324                         <association mime-type="application-x/ext-file" extensions="fastq"/>
325                         <association mime-type="application-x/ext-file" extensions="blc"/>
326                         <association mime-type="application-x/ext-file" extensions="msf"/>
327                         <association mime-type="application-x/ext-file" extensions="pfam"/>
328                         <association mime-type="application-x/ext-file" extensions="aln"/>
329                         <association mime-type="application-x/ext-file" extensions="pir"/>
330                         <association mime-type="application-x/ext-file" extensions="amsa"/>
331                         -->
332                                         </information>
333                                         <resources>
334                                                 <j2se version="1.5+" initial_heap_size="256M" max_heap_size="1024M"/>
335                                                 <fileset dir="${packageDir}">
336                                                         <include name="jalview.jar" />
337                                                 </fileset>
338                                                 <fileset dir="${packageDir}">
339                                                         <include name="*.jar" />
340                                                         <include name="*_*.jar" />
341                                                         <exclude name="jalview.jar" />
342                                                 </fileset>
343                                                 <property name="jalview.version" value="${JALVIEW_VERSION}" />
344                                         </resources>
345                                         <application_desc main_class="jalview.bin.Jalview">
346                                         </application_desc>
347                                         <security>
348                                                 <all_permissions />
349                                         </security>
350                                 </jnlp>
351
352                         </target>
353
354                         <target name="runenv" depends="init">
355                                 <path id="run.classpath">
356                                         <pathelement location="${outputDir}"/>
357                                         <fileset dir="${outputDir}">
358                                                 <include name="${libDir}/*.jar"/>
359                                         </fileset>
360                                 </path>
361                                 <pathconvert targetos="unix" refid="run.classpath" property="run.classpath"/>
362
363                                 <echo>java -classpath ${run.classpath} jalview.bin.Jalview
364       </echo>
365                         </target>
366
367                         <target name="buildextclients" depends="init">
368                                 <input message="Building external client source from WSDLs - Do you really want to do this ? (Yy/Nn)"
369       validargs="Y,y,n,N" defaultvalue="N"
370       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
401       output="${sourceDir}"
402       verbose="true"
403       url="${wsdl.MsaWS2}"
404       serverside="false"
405       deployscope="Request"
406       debug="false"
407       helpergen="true"
408       all="true"
409       >
410                                         <mappingSet>
411                                                 <mapping
412         namespace="${wsdl.Namespace}"
413         package="${wsdl.ClientNS}"
414         />
415                                                 <mapping namespace="http://dataTypes.vamsas"
416         package="${wsdl.ClientNS}"/>
417                                         </mappingSet>
418                                 </axis-wsdl2java>
419                         </target>
420
421                         <target name="makedist" depends="build, buildPropertiesFile, buildindices">
422                                 <!-- make the package jar -->
423                                 <mkdir dir="${packageDir}"/>
424
425                                 <jar destfile="${packageDir}/${outputJar}">
426                                         <manifest>
427                                                 <attribute name="Main-Class" value="jalview.bin.Jalview"/>
428                                         </manifest>
429                                         <fileset dir="${outputDir}/">
430                                                 <exclude name="cache*/**"/>
431                                                 <exclude name="*.jar" />
432                                                 <exclude name="*.jar.*" />
433                                                 <exclude name="**/*.jar" />
434                                                 <exclude name="**/*.jar.*" />
435                                         </fileset>
436                                 </jar>
437
438                                 <copy toDir="${packageDir}" flatten="true">
439                                         <fileset dir="${outputDir}">
440                                                 <include name="*.jar"/>
441                                                 <include name="**/*.jar"/>
442                                         </fileset>
443                                 </copy>
444                         </target>
445
446
447                         <!-- jalopy code reformatter -->
448                         <target name="sourcescrub" depends="init,build">
449                                 <jalopy destdir="jsrc" classpathref="run.classpath"
450       convention="jalview-jalopy.xml">
451                                         <fileset dir="${sourceDir}">
452                                                 <include name="*.java"/>
453                                                 <include name="**/*.java"/>
454                                                 <include name="**/**/*.java"/>
455                                         </fileset>
456                                 </jalopy>
457                         </target>
458
459
460
461                         <!-- Compile, package and obfuscate Jalview Applet -->
462                         <target name="makeApplet" depends="obfuscate"/>
463
464                         <target name="compileApplet" depends="init,clean">
465                                 <mkdir dir="${outputDir}"/>
466                                 <javac source="1.5"
467     target="1.5"
468     srcdir="${sourceDir}" 
469     destdir="${outputDir}"
470         debug="${javac.debug}"
471     classpath="appletlib/${jmolJar}"
472        includes="jalview/appletgui/**"
473        excludes="ext/**,MCview/**,org/**,vamsas/**"
474        />
475                         </target>
476
477                         <target name="packageApplet" depends="compileApplet, buildPropertiesFile">
478                                 <copy file="${resourceDir}/images/idwidth.gif" toFile="${outputDir}/images/idwidth.gif"/>
479                                 <copy file="${resourceDir}/images/link.gif" toFile="${outputDir}/images/link.gif"/>
480                                 <jar destfile="in.jar">
481                                         <manifest>
482                                                 <attribute name="Main-Class" value="jalview.bin.JalviewLite"/>
483                                         </manifest>
484                                         <fileset dir="${outputDir}">
485                                                 <include name="com/**"/>
486                                                 <include name="MCview/**"/>
487                                                 <include name="jalview/**"/>
488                                                 <include name=".build_properties"/>
489                                                 <include name="images/idwidth.gif"/>
490                                                 <include name="images/link.gif"/>
491                                         </fileset>
492                                 </jar>
493                         </target>
494                         <target name="obfuscate" depends="-obfuscatefake,-obfuscatereally" description="construct the final jalviewLite applet jar with or without obfuscation">
495                         </target>
496                         <target name="-obfuscatefake" depends="packageApplet" if="donotobfuscate">
497                                 <copy file="in.jar" tofile="${jalviewLiteJar}" overwrite="true"/>
498                                 <delete file="in.jar"/>
499                         </target>
500                         <target name="-obfuscatereally" unless="donotobfuscate">
501
502                                 <path id="obfuscateDeps.path">
503                                         <pathelement location="${applet.jre.tools}"/>
504                                         <pathelement location="appletlib/${jmolJar}"/>
505                                 </path>
506                                 <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
507
508                                 <proguard>
509                                         <injar file="in.jar"/>
510                                         <outjar file="${jalviewLiteJar}"/>
511                                         <libraryjar refid="obfuscateDeps.path"/>
512                                         <keep access="public" type="class"
513       name="jalview.bin.JalviewLite">
514                                                 <field access="public"/>
515                                                 <method access="public"/>
516                                                 <constructor access="public"/>
517                                         </keep>
518                                         <!--      -libraryjars "${obfuscateDeps}"
519       -injars      in.jar
520       -outjars     jalviewApplet.jar
521       -keep public class jalview.bin.JalviewLite
522        { public * ; } -->
523                                 </proguard>
524                                 <delete file="in.jar"/>
525                         </target>
526
527                         <target name="castorbinding" depends="init" description="Generate Java bindings to supported Jalview XML models.">
528                                 <taskdef name="castor-srcgen"
529                           classname="org.castor.anttask.CastorCodeGenTask"
530                       classpathref="build.classpath" />
531                                 <delete>
532                                         <fileset dir="${sourceDir}/jalview/schemabinding/version2">
533                                                 <include name="*.java"/>
534                                                 <include name="descriptors/*.java"/>
535                                         </fileset>
536                                 </delete>
537                                 <castor-srcgen file="${schemaDir}/vamsas.xsd"
538                               todir="${sourceDir}"
539                               package="jalview.schemabinding.version2"
540                               warnings="false" 
541                                         nodesc="false"
542                                                 verbose="true"
543                                                 properties="${schemaDir}/jalview.properties"
544                 />
545                                 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd"
546                               todir="${sourceDir}"
547                               package="jalview.schemabinding.version2"
548                               warnings="false" 
549                                         nodesc="false"
550                                                 verbose="true"
551                                                 properties="${schemaDir}/jalview.properties"
552                 />
553                                 <castor-srcgen file="${schemaDir}/JalviewWsParamSet.xsd"
554                               todir="${sourceDir}"
555                               package="jalview.schemabinding.version2"
556                               warnings="false" 
557                                         nodesc="false"
558                                                 verbose="true"
559                                                 properties="${schemaDir}/jalview.properties"
560                 />
561                                 <castor-srcgen file="${schemaDir}/jalview.xsd"
562                               todir="${sourceDir}"
563                               package="jalview.schemabinding.version2"
564                               warnings="false" 
565                                           nodesc="false"
566                                                 verbose="true"
567                                                 properties="${schemaDir}/jalview.properties"
568                         
569                 />
570                                 <!-- 
571                 now build the jalview.binding package with the old schema set
572                 -->
573                                 <delete>
574                                         <fileset dir="${sourceDir}/jalview/binding/">
575                                                 <include name="**"/>
576                                         </fileset>
577                                 </delete>
578                                 <castor-srcgen file="${schemaDir}/vamsasJvV1.xsd"
579                               todir="${sourceDir}"
580                               package="jalview.binding"
581                               warnings="false" 
582                                         nodesc="true"
583                                                 verbose="true"
584                                                 properties="${schemaDir}/jalview.nodesc.properties"
585                 />
586                                 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd"
587                               todir="${sourceDir}"
588                               package="jalview.binding"
589                               warnings="false" 
590                                         nodesc="true"
591                                                 verbose="true"
592                                                 properties="${schemaDir}/jalview.nodesc.properties"
593                 />
594                                 <castor-srcgen file="${schemaDir}/jalviewJvV1.xsd"
595                               todir="${sourceDir}"
596                               package="jalview.binding"
597                               warnings="false" 
598                                           nodesc="true"
599                                                 verbose="true"
600                                                 properties="${schemaDir}/jalview.nodesc.properties"
601         />
602                         </target>
603                         <target name="sourcedist" description="create jalview source distribution" depends="init">
604                                 <delete file="${source.dist.name}"/>
605                                 <tar destfile="${source.dist.name}" compression="gzip">
606                                         <tarfileset dir="./" prefix="jalview" preserveLeadingSlashes="true">
607                                                 <include name="LICENSE"/>
608                                                 <include name="README"/>
609                                                 <include name="build.xml"/>
610                                                 <include name="jalview-jalopy.xml"/>
611                                                 <include name="JalviewApplet.jpx"/>
612                                                 <include name="JalviewX.jpx"/>
613                                                 <include name="${sourceDir}/*.java"/>
614                                                 <include name="${sourceDir}/**/*.java"/>
615                                                 <include name="${sourceDir}/**/*.cdr"/>
616                                                 <include name="${libDir}/**/*"/>
617                                                 <include name="${resourceDir}/**/*"/>
618                                                 <include name="${helpDir}/**/*"/>
619                                                 <include name="appletlib/${jmolJar}"/>
620                                                 <exclude name="**/*locales"/>
621                                                 <exclude name="*locales/**"/>
622                                                 <exclude name="utils/InstallAnywhere/**Build.iap_xml"/>
623                                                 <exclude name="utils/InstallAnywhere/**Build*/**"/>
624                                                 <exclude name="utils/InstallAnywhere/**Build*/**"/>
625                                                 <exclude name="utils/InstallAnywhere/**locale*"/>
626                                                 <exclude name="utils/InstallAnywhere/**locale*/**"/>
627                                                 <include name="${schemaDir}/**/*"/>
628                                                 <include name="utils/**/*"/>
629                                                 <include name="${docDir}/**/*"/>
630                                         </tarfileset>
631                                 </tar>
632                         </target>
633                 </project>