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