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