Merge branch 'JAL-1139_proguard' into develop
[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" sigalg="SHA1withRSA">
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}" index="true">
421                         <manifest>
422                                 <attribute name="Main-Class" value="jalview.bin.Jalview" />
423         <attribute name="Permissions" value="all-permissions" />
424         <!--<attribute name="Trusted-Lib" value="true" /> -->
425         <attribute name="Application-Name" value="Jalview Desktop"/>
426         <attribute name="Codebase" value="*"/>
427                         </manifest>
428                         <fileset dir="${outputDir}/">
429                                 <exclude name="cache*/**" />
430                                 <exclude name="*.jar" />
431                                 <exclude name="*.jar.*" />
432                                 <exclude name="**/*.jar" />
433                                 <exclude name="**/*.jar.*" />
434                         </fileset>
435                 </jar>
436
437                 <copy toDir="${packageDir}" flatten="true">
438                         <fileset dir="${outputDir}">
439                                 <include name="*.jar" />
440                                 <include name="**/*.jar" />
441                         </fileset>
442                 </copy>
443         </target>
444
445
446         <!-- jalopy code reformatter -->
447         <target name="sourcescrub" depends="init,build">
448                 <jalopy destdir="jsrc" classpathref="run.classpath" convention="jalview-jalopy.xml">
449                         <fileset dir="${sourceDir}">
450                                 <include name="*.java" />
451                                 <include name="**/*.java" />
452                                 <include name="**/**/*.java" />
453                         </fileset>
454                 </jalopy>
455         </target>
456
457
458
459         <!-- Compile, package and obfuscate Jalview Applet -->
460         <target name="makeApplet" depends="obfuscate" description="assemble the final jalviewLite applet jar with or without obfuscation"/>
461
462         <target name="compileApplet" depends="init,clean">
463                 <mkdir dir="${outputDir}" />
464                 <javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" 
465                         classpathref="jalviewlite.deps" includes="jalview/appletgui/**"
466                         excludes="ext/**,MCview/**,org/**,vamsas/**,jalview/ext/paradise/**" />
467         </target>
468
469         <target name="packageApplet" depends="compileApplet, buildPropertiesFile">
470                 <copy file="${resourceDir}/images/idwidth.gif" toFile="${outputDir}/images/idwidth.gif" />
471                 <copy file="${resourceDir}/images/link.gif" toFile="${outputDir}/images/link.gif" />
472                 <copy todir="${outputDir}/lang">
473                         <fileset dir="${resourceDir}/lang"><include name="**.*"/></fileset></copy>
474                 <jar destfile="in.jar" index="true">
475                         <manifest>
476                                 <attribute name="Main-Class" value="jalview.bin.JalviewLite" />
477                                 <attribute name="Permissions" value="sandbox" /> 
478         <!--<attribute name="Trusted-Lib" value="true" /> -->
479                                 <attribute name="Application-Name" value="JalviewLite Applet"/>
480                                 <attribute name="Codebase" value="www.jalview.org"/>
481                         </manifest>
482                         <fileset dir="${outputDir}">
483                                 <include name="com/**" />
484                                 <include name="MCview/**" />
485                                 <include name="jalview/**" />
486                                 <include name=".build_properties" />
487                                 <include name="images/idwidth.gif" />
488                                 <include name="images/link.gif" />
489                                 <include name="lang/**" />
490                         </fileset>
491                 </jar>
492         </target>
493         <target name="obfuscate" depends="-obfuscatefake,-obfuscatereally">
494         </target>
495         <target name="-obfuscatefake" depends="packageApplet" if="donotobfuscate">
496                 <copy file="in.jar" tofile="${jalviewLiteJar}" overwrite="true" />
497                 <delete file="in.jar" />
498         </target>
499         <target name="-obfuscatereally" unless="donotobfuscate">
500
501                 <path id="obfuscateDeps.path">
502                         <pathelement location="${applet.jre.tools}" />
503                         <pathelement location="appletlib/${jmolJar}" />
504                 </path>
505                 <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
506
507                 <proguard>
508                         <injar file="in.jar" />
509                         <outjar file="${jalviewLiteJar}" />
510                         <libraryjar refid="obfuscateDeps.path" />
511                         <dontwarn/>
512                         <keep access="public" type="class" name="jalview.bin.JalviewLite">
513                                 <field access="public" />
514                                 <method access="public" />
515                                 <constructor access="public" />
516                         </keep>
517                         <keep access="public" type="class" name="jalview.appletgui.AlignFrame">
518                                 <field access="public" />
519                                 <method access="public" />
520                                 <constructor access="public" />
521                         </keep>
522                         <!--      -libraryjars "${obfuscateDeps}"
523       -injars      in.jar
524       -outjars     jalviewApplet.jar
525       -keep public class jalview.bin.JalviewLite
526        { public * ; } -->
527                 </proguard>
528                 <delete file="in.jar" />
529         </target>
530
531         <target name="castorbinding" depends="init" description="Generate Java bindings to supported Jalview XML models.">
532                 <taskdef name="castor-srcgen" classname="org.castor.anttask.CastorCodeGenTask" classpathref="build.classpath" />
533                 <delete>
534                         <fileset dir="${sourceDir}/jalview/schemabinding/version2">
535                                 <include name="*.java" />
536                                 <include name="descriptors/*.java" />
537                         </fileset>
538                 </delete>
539                 <castor-srcgen file="${schemaDir}/vamsas.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
540                 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
541                 <castor-srcgen file="${schemaDir}/JalviewWsParamSet.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
542                 <castor-srcgen file="${schemaDir}/jalview.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
543                 <!-- 
544                 now build the jalview.binding package with the old schema set
545                 -->
546                 <delete>
547                         <fileset dir="${sourceDir}/jalview/binding/">
548                                 <include name="**" />
549                         </fileset>
550                 </delete>
551                 <castor-srcgen file="${schemaDir}/vamsasJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
552                 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
553                 <castor-srcgen file="${schemaDir}/jalviewJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
554         </target>
555         <target name="sourcedist" description="create jalview source distribution" depends="init">
556                 <delete file="${source.dist.name}" />
557                 <tar destfile="${source.dist.name}" compression="gzip">
558                         <tarfileset dir="./" prefix="jalview" preserveLeadingSlashes="true">
559                                 <include name="LICENSE" />
560                                 <include name="README" />
561                                 <include name="build.xml" />
562                                 <include name="jalview-jalopy.xml" />
563                                 <include name="JalviewApplet.jpx" />
564                                 <include name="JalviewX.jpx" />
565                                 <include name="nbbuild.xml"/>
566                                 <include name="nbproject/genfiles.properties"/>
567         <include name="nbproject/project.properties"/>
568         <include name="nbproject/project.xml"/>
569                                 <include name="${sourceDir}/*.java" />
570                                 <include name="${sourceDir}/**/*.java" />
571                                 <include name="${sourceDir}/**/*.cdr" />
572                                 <include name="${libDir}/**/*" />
573                                 <include name="${resourceDir}/**/*" />
574                                 <include name="${helpDir}/**/*" />
575                                 <include name="appletlib/${jmolJar}" />
576                                 <exclude name="**/*locales" />
577                                 <exclude name="*locales/**" />
578                                 <exclude name="utils/InstallAnywhere/**Build.iap_xml" />
579                                 <exclude name="utils/InstallAnywhere/**Build*/**" />
580                                 <exclude name="utils/InstallAnywhere/**Build*/**" />
581                                 <exclude name="utils/InstallAnywhere/**locale*" />
582                                 <exclude name="utils/InstallAnywhere/**locale*/**" />
583                                 <include name="${schemaDir}/**/*" />
584                                 <include name="utils/**/*" />
585                                 <include name="${docDir}/**/*" />
586                                 <include name="examples/**/*" />
587                         </tarfileset>
588                 </tar>
589         </target>
590         <target name="pubapplet" description="installs the jalviewLite applet and dependent jars into an applet examples directory built under ${outputDir}" depends="makeApplet">
591           <copy todir="${packageDir}/examples">
592           <fileset dir="examples">
593                 <include name="**/*"/>
594                 <include name="javascript/*"/>
595       <include name="jmol/*"/>
596           </fileset>
597                 <fileset dir=".">
598                 <include name="jalviewApplet.jar"/>
599                         </fileset>
600                 <fileset dir="appletlib">
601                       <include name="**/*"/>
602                         </fileset>
603           </copy>
604             <jar update="true" index="true" jarfile="${packageDir}/examples/${jalviewLiteJar}"/>
605             <jar update="true" index="true" jarfile="${packageDir}/examples/$(jmolJar}"/>
606     <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
607
608       <fileset dir="${packageDir}/examples">
609         <include name="*.jar" />
610       </fileset>
611     </signjar>
612         </target>
613         <target name="sourcedoc" description="Create jalview source documentation pages" depends="init">
614          <javadoc destdir="${javadocDir}">
615                 <packageset dir="${sourceDir}" includes="jalview/*,MCView/*">
616                 </packageset>
617                 </javadoc>
618         </target>
619         
620 </project>