3 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
4 * Copyright (C) $$Year-Rel$$ The Jalview Authors
6 * This file is part of Jalview.
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.
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.
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 * The Jalview Authors are detailed in the 'AUTHORS' file.
20 <project name="jalviewX" default="usage" basedir=".">
21 <target name="help" depends="usage" />
23 <echo message="~~~Jalview Ant build.xml Usage~~~~" />
24 <echo message="Targets include:" />
25 <echo message="usage - default target, displays this message" />
26 <echo message="buildindices - generates JavaHelpSearch from the help files" />
27 <echo message="build - compiles all necessary files for Application" />
28 <echo message="makedist - compiles and places all necessary jar files into directory dist" />
29 <echo message="makefulldist - signs all jar files and builds jnlp file for full distribution" />
30 <echo message=" this needs a keystore and key. See docs/building.html for more information." />
31 <echo message="compileApplet - compiles all necessary files for Applet" />
32 <echo message="makeApplet - compiles, then packages and obfuscates the Applet" />
33 <echo message="See docs/building.html and the comments in build file for other targets." />
34 <echo message="note: compile and makeApplet require the property java118.home to be set to point to a java 1.1.8 jdk." />
35 <echo message="Useful -D flags: -Ddonotobfuscate will prevent applet obfuscation" />
39 <!-- utils is a class path to additional utilities needed for
40 building docs, jars and webstart stuff -->
42 Userdefined build property defaults
44 wsdl.server list (plus namespace mapping info ???) - also want
45 ... to make this a dynamically generatable property
47 Build location - provide a temporary root for speed
48 jarsigner keystore and info
49 Jakarta and axis classpath ?
50 Default argument for starting Jalview (if it exists).
55 <path id="axis.classpath">
57 <fileset dir="/usr/local/axis/lib">
58 <include name="**/*.jar" />
60 <fileset dir="/usr/local/jakarta-tomcat-5/webapps/axis/WEB-INF/lib">
61 <include name="**/*.jar"/>
62 <include name="*.jar"/>
66 <!-- Jalview Version String displayed by application on startup and used to check for updates -->
67 <property name="JALVIEW_VERSION" value="DEVELOPMENT" />
69 <property name="INSTALLATION" value="Source" />
71 <!-- 2.4 (VAMSAS)" -->
72 <!-- Include debugging information in javac true or false -->
73 <property name="javac.debug" value="true" />
75 <!-- JarSigner Key Store for Webstart Distribution -->
76 <property name="jalview.keystore" value="./keys/.keystore" />
77 <!-- Keystore Password -->
78 <property name="jalview.keystore.pass" value="alignmentisfun" />
80 <property name="jalview.key" value="jalview" />
82 <property name="jalview.key.pass" value="alignmentisfun" />
84 <!-- Don't change anything below here unless you know what you are doing! -->
85 <!-- Url path for WebStart in JNLP file -->
86 <property name="WebStartLocation" value="http://www.jalview.org/webstart" />
87 <!-- Webstart Image - looked for in resources/images -->
88 <property name="WebStartImage" value="JalviewLogo_big.png"/>
89 <!-- J2SE version needed for webstart launch -->
90 <!-- Anne's version needs 1.7 - should rebuild VARNA to java 1.6 for release -->
91 <property name="j2sev" value="1.7+"/>
93 <!-- Permissions for running Java applets and applications. -->
94 <!-- Defaults are those suitable for deploying jalview webstart www.jalview.org -->
95 <property name="application.codebase" value="*.jalview.org" />
96 <!-- and allowing the applet to be deployed from any URL -->
97 <!-- note - if you want to make sure LiveConnect works without any warnings, please rebuild and sign your applet jar with your own domain included in the codebase/allowable-codebase properties -->
98 <property name="applet.codebase" value="*.jalview.org *.dundee.ac.uk *" />
99 <property name="applet.caller-codebase" value="${applet.codebase}" />
101 <!-- build directory configuration -->
102 <property name="libDir" value="lib" />
103 <property name="resourceDir" value="resources" />
104 <property name="helpDir" value="help" />
105 <property name="docDir" value="doc" />
106 <property name="sourceDir" value="src" />
107 <property name="schemaDir" value="schemas" />
108 <property name="outputDir" value="classes" />
109 <property name="packageDir" value="dist" />
110 <property name="outputJar" value="jalview.jar" />
111 <!-- Jalview Applet JMol Jar Dependency -->
112 <property name="jmolJar" value="JmolApplet-12.2.4.jar" />
113 <property name="varnaJar" value="VARNAv3-91.jar" />
114 <property name="jsoup" value="jsoup-1.8.1.jar" />
115 <property name="jsonSimple" value="json_simple-1.1.jar" />
116 <property name="javaJson" value="java-json.jar" />
117 <property name="jalviewLiteJar" value="jalviewApplet.jar" />
118 <property name="reportDir" value="test-reports" />
119 <property name="testDir" value="test" />
120 <property name="testOutputDir" value="tests" />
121 <!-- switch to indicate if we should obfuscate jalviewLite -->
122 <!-- <property name="donotobfuscate" value="true"/> -->
123 <!-- switch to exclude associations from generated jnlp files -->
124 <!-- <property name="nojnlpfileassocs" value="true"/> -->
126 <!-- Jalview Web Service Clients - see the comments in 'buildextclients' for details -->
127 <property name="wsdl.File" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred?wsdl" />
128 <property name="wsdl.Files" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/vamsas?wsdlFiles" />
129 <property name="wsdl.MsaWS" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/MuscleWS?wsdl" />
130 <property name="wsdl.MsaWS2" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/ClustalWS?wsdl" />
131 <property name="WSInterf" value="MsaWS" />
132 <property name="wsdl.Namespace" value="vamsas" />
133 <property name="wsdl.ClientNS" value="ext.vamsas" />
134 <!-- the class path for building the application -->
135 <path id="build.classpath">
136 <fileset dir="utils">
137 <include name="*.jar" />
138 <include name="**/*.jar" />
140 <fileset dir="${libDir}">
141 <include name="*.jar" />
142 <include name="**/*.jar" />
144 <fileset dir="${java.home}/lib">
145 <include name="plugin.jar"/>
147 <fileset dir="appletlib">
148 <!-- the JmolApplet includes the JmolApplet console and the application javac seems to always try and build all packages
150 <include name="${jmolJar}" />
151 <include name="${varnaJar}" />
155 <property name="source.dist.name" value="${basedir}/jalview-src.tar.gz" />
156 <!-- The Location of the java 1.1.8 jdk -->
157 <!--<property name="java118.home" value="C:\Sun\jdk1.1.8" /> -->
158 <property name="java118.home" value="${java.home}" />
159 <!-- <property name="applet.jre.tools" value="${java118.home}/lib/classes.zip" />
161 <!-- jre for 1.4 version -->
162 <property name="applet.jre.tools" value="${java.home}/lib/rt.jar"/>
164 <!-- the classpath for building the 1.1 applet -->
165 <path id="jalviewlite.deps">
166 <fileset dir="${java118.home}">
167 <include name="lib/classes.zip" />
169 <fileset dir="${java.home}/lib">
170 <include name="plugin.jar"/>
172 <pathelement location="appletlib/${jmolJar}" />
173 <pathelement location="lib/${varnaJar}" />
174 <pathelement location="lib/${jsoup}" />
175 <pathelement location="lib/${jsonSimple}" />
176 <pathelement location="lib/${javaJson}" />
179 <!-- default location for outputting javadoc -->
180 <property name="javadocDir" value="${packageDir}/javadoc"/>
184 <taskdef classpath="utils/roxes-ant-tasks-1.2-2004-01-30.jar" resource="com/roxes/tools/ant/taskdefs.properties" />
185 <target name="buildPropertiesFile" depends="init">
186 <tstamp prefix="build">
187 <format property="date" pattern="dd MMMM yyyy" />
189 <properties file="${outputDir}/.build_properties">
191 ---Jalview Build Details---
193 <property name="VERSION" value="${JALVIEW_VERSION}" />
194 <property name="INSTALLATION" value="${INSTALLATION}" />
195 <property name="BUILD_DATE" value="${build.date}" />
200 <target name="clean" depends="init">
201 <!-- not efficient yet. -->
202 <delete dir="${outputDir}" includes="*,**/*"/>
205 <target name="distclean" depends="init, clean">
207 <echo message="REMOVING ALL BACKUP/AUTOSAVES!" />
210 <include name="${outputJar}" />
211 <include name="#*#" />
212 <include name="#*.*#" />
213 <include name="**/#*#" />
214 <include name="**/#*.*#" />
215 <include name="*~" />
216 <include name="*.*~" />
217 <include name="**/*~" />
218 <include name="**/*.*~" />
223 <target name="prepare" depends="init">
224 <mkdir dir="${outputDir}" />
225 <copy todir="${outputDir}">
227 <include name="${docDir}/**/*.*" />
228 <include name="${helpDir}/**/*.*" />
229 <include name="${libDir}/*.jar" />
231 <fileset dir="${resourceDir}">
232 <include name="**/*.*" />
237 <target name="build" depends="prepare">
238 <!-- not efficient yet. -->
239 <javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="build.classpath">
240 <exclude name="jalview/*applet*" />
241 <exclude name="jalview/appletgui/**" />
242 <exclude name="com/stevesoft/**" />
247 <target name="testclean" depends="init">
248 <delete dir="${testOutputDir}" includes="*,**/*"/>
251 <target name="prepareTests" depends="init">
252 <mkdir dir="${testOutputDir}" />
253 <copy todir="${testOutputDir}">
255 <include name="${docDir}/**/*.*" />
256 <include name="${helpDir}/**/*.*" />
257 <include name="${libDir}/*.jar" />
259 <fileset dir="${resourceDir}">
260 <include name="**/*.*" />
265 <target name="buildTests" depends="prepareTests">
266 <javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${testOutputDir}"
267 debug="${javac.debug}" classpathref="build.classpath" includeantruntime="false" >
268 <exclude name="jalview/*applet*" />
269 <exclude name="jalview/appletgui/**" />
271 <javac source="1.5" target="1.5" srcdir="${testDir}" destdir="${testOutputDir}"
272 debug="${javac.debug}" classpathref="build.classpath" includeantruntime="false" >
276 <taskdef name="testng" classname="org.testng.TestNGAntTask" >
277 <classpath location="utils/testnglibs/testng.jar" />
280 <target name="testng" depends="buildTests">
281 <testng classpathref="build.classpath" outputDir="${reportDir}"
282 haltOnFailure="false">
283 <classpath location="${testOutputDir}" />
284 <xmlfileset dir="utils" includes="jalview_testng.xml" />
288 <target name="buildindices" depends="init, prepare" unless="help.uptodate">
289 <java classname="com.sun.java.help.search.Indexer" classpathref="build.classpath" fork="true" dir="${outputDir}/${helpDir}">
294 <target name="makefulldist" depends="makedist">
295 <copy todir="${packageDir}">
296 <fileset dir="${resourceDir}/images">
297 <include name="${WebStartImage}"/>
301 <taskdef classpathref="build.classpath" resource="com/roxes/tools/ant/taskdefs.properties" />
303 <!-- create a dummy jar which will eventually contain the jnlp template -->
304 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
305 <fileset dir="${packageDir}">
306 <include name="jalview.jar" />
310 <mkdir dir="${packageDir}/JNLP-INF"/>
311 <antcall target="writejnlpf">
312 <param name="jnlpFile" value="${packageDir}/JNLP-INF/APPLICATION-TEMPLATE.JNLP"/>
313 <param name="inih" value="*" />
314 <param name="maxh" value="*"/>
317 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
318 <fileset dir="${packageDir}">
319 <include name="JNLP-INF"/>
323 <antcall target="writejnlpf">
324 <param name="jnlpFile" value="${packageDir}/jalview.jnlp"/>
325 <param name="inih" value="10M" />
326 <param name="maxh" value="256M"/>
329 <antcall target="writejnlpf">
330 <param name="jnlpFile" value="${packageDir}/jalview_1G.jnlp"/>
331 <param name="inih" value="128M" />
332 <param name="maxh" value="512M"/>
335 <antcall target="writejnlpf">
336 <param name="jnlpFile" value="${packageDir}/jalview_2G.jnlp"/>
337 <param name="inih" value="256M" />
338 <param name="maxh" value="1024M"/>
341 <!-- finally, need to postprocess to add in associations at end of 'information' element
343 <xslt in="${packageDir}/jalview_noa_1G.jnlp" out="${packageDir}/jalview_1G.jnlp">
350 <association mime-type="application-x/ext-file" extensions="fa"/>
351 <association mime-type="application-x/ext-file" extensions="fasta"/>
352 <association mime-type="application-x/ext-file" extensions="mfa"/>
353 <association mime-type="application-x/ext-file" extensions="fastq"/>
354 <association mime-type="application-x/ext-file" extensions="blc"/>
355 <association mime-type="application-x/ext-file" extensions="msf"/>
356 <association mime-type="application-x/ext-file" extensions="pfam"/>
357 <association mime-type="application-x/ext-file" extensions="aln"/>
358 <association mime-type="application-x/ext-file" extensions="pir"/>
359 <association mime-type="application-x/ext-file" extensions="amsa"/>
360 <association mime-type="application-x/ext-file" extensions="stk"/>
361 <association mime-type="application-x/ext-file" extensions="jar"/>-->
362 <!-- and sign the jars -->
363 <!-- the default keystore details might need to be edited here -->
364 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false" sigalg="SHA1withRSA">
365 <fileset dir="${packageDir}">
366 <include name="*.jar" />
371 <target name="runenv" depends="init">
372 <path id="run.classpath">
373 <pathelement location="${outputDir}" />
374 <fileset dir="${outputDir}">
375 <include name="${libDir}/*.jar" />
378 <pathconvert targetos="unix" refid="run.classpath" property="run.classpath" />
380 <echo>java -classpath ${run.classpath} jalview.bin.Jalview
384 <target name="-generatejnlpf">
385 <presetdef name="jnlpf">
386 <jnlp codebase="${WebStartLocation}">
388 <title>Jalview</title>
389 <vendor>The Barton Group</vendor>
390 <homepage href="http://www.jalview.org" />
391 <description>Jalview Multiple Alignment Editor</description>
392 <description kind="short">Jalview</description>
393 <icon href="${WebStartImage}" />
397 <j2se version="${j2sev}" initial_heap_size="${inih}" max_heap_size="${maxh}" />
398 <fileset dir="${packageDir}">
399 <include name="jalview.jar" />
401 <fileset dir="${packageDir}">
402 <include name="*.jar" />
403 <include name="*_*.jar" />
404 <exclude name="jalview.jar" />
405 <exclude name="*jnilib.jar"/>
408 <resources os="Mac OS X">
409 <property name="jalview.version" value="${JALVIEW_VERSION}" />
410 <fileset dir="${packageDir}">
411 <include name="*quaqua*.jnilib.jar"/>
415 <application_desc main_class="jalview.bin.Jalview">
423 <jnlpf toFile="${jnlpFile}"/>
427 <target name="-dofakejnlpfileassoc" depends="-generatejnlpf" if="nojnlpfileassocs">
428 <echo message="Not adding JNLP File Associations"/>
431 <target name="-dojnlpfileassoc" depends="-generatejnlpf" unless="nojnlpfileassocs">
432 <replace file="${jnlpFile}">
434 <![CDATA[</information>]]></replacetoken>
437 <association mime-type="application-x/ext-file" extensions="fa" />
438 <association mime-type="application-x/ext-file" extensions="fasta" />
439 <association mime-type="application-x/ext-file" extensions="mfa" />
440 <association mime-type="application-x/ext-file" extensions="fastq" />
441 <association mime-type="application-x/ext-file" extensions="blc" />
442 <association mime-type="application-x/ext-file" extensions="msf" />
443 <association mime-type="application-x/ext-file" extensions="pfam" />
444 <association mime-type="application-x/ext-file" extensions="aln"/>
445 <association mime-type="application-x/ext-file" extensions="pir"/>
446 <association mime-type="application-x/ext-file" extensions="amsa"/>
447 <association mime-type="application-x/ext-file" extensions="stk"/>
448 <association mime-type="application-x/ext-file" extensions="jvp"/>
449 </information>]]></replacevalue>
451 <echo message="Added file associations to JNLP file"/>
453 <target name="writejnlpf" depends="-dojnlpfileassoc,-dofakejnlpfileassoc">
456 <target name="buildextclients" depends="init">
457 <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" />
458 <condition property="dontextbuild">
459 <equals arg1="n" arg2="${doextbuild.response}" />
461 <condition property="dontextbuild">
462 <equals arg1="N" arg2="${doextbuild.response}" />
464 <fail if="dontextbuild">
465 Build External Client Code process aborted by user. Jalview source is unchanged.
467 <!-- Currently, this doesn't happen automatically.
468 1. Run WSDL2Java as below, which generates an ext.vamsas +
469 vamsas.<datapackages> fileset.
470 2. refactor ext.vamsas.SpecificserviceWS* to
471 ext.vamsas.ServiceclassWS* that implements the ServiceclassWSI interface.
472 3. Update the jalview.ws.*WServices classes to reflect the
473 interface type, and all locations of this wsdl type that Jalview
477 <path id="axisbuild">
478 <path refid="build.classpath" />
480 <taskdef resource="axis-tasks.properties" classpathref="axisbuild" />
482 <fileset dir="${sourceDir}" id="client">
483 <include name="${wsdl.ClientNS}/*.*" />
487 <axis-wsdl2java output="${sourceDir}" verbose="true" url="${wsdl.MsaWS2}" serverside="false" deployscope="Request" debug="false" helpergen="true" all="true">
489 <mapping namespace="${wsdl.Namespace}" package="${wsdl.ClientNS}" />
490 <mapping namespace="http://dataTypes.vamsas" package="${wsdl.ClientNS}" />
495 <target name="makedist" depends="build, buildPropertiesFile, buildindices">
496 <!-- make the package jar if not already existing -->
497 <mkdir dir="${packageDir}" />
498 <!-- clean dir if it already existed -->
500 <fileset dir="${packageDir}">
501 <include name="*.jar"/>
504 <jar destfile="${packageDir}/${outputJar}" index="true">
506 <attribute name="Main-Class" value="jalview.bin.Jalview" />
507 <attribute name="Permissions" value="all-permissions" />
508 <attribute name="Application-Name" value="Jalview Desktop" />
509 <attribute name="Codebase" value="${application.codebase}" />
511 <fileset dir="${outputDir}/">
512 <exclude name="cache*/**" />
513 <exclude name="*.jar" />
514 <exclude name="*.jar.*" />
515 <exclude name="**/*.jar" />
516 <exclude name="**/*.jar.*" />
520 <copy toDir="${packageDir}" flatten="true">
521 <fileset dir="${outputDir}">
522 <include name="*.jar" />
523 <include name="**/*.jar" />
529 <!-- jalopy code reformatter -->
530 <target name="sourcescrub" depends="init,build">
531 <jalopy destdir="jsrc" classpathref="run.classpath" convention="jalview-jalopy.xml">
532 <fileset dir="${sourceDir}">
533 <include name="*.java" />
534 <include name="**/*.java" />
535 <include name="**/**/*.java" />
542 <!-- Compile, package and obfuscate Jalview Applet -->
543 <target name="makeApplet" depends="obfuscate" description="assemble the final jalviewLite applet jar with or without obfuscation"/>
545 <target name="compileApplet" depends="init,clean">
546 <mkdir dir="${outputDir}" />
547 <javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}"
548 classpathref="jalviewlite.deps" includes="jalview/appletgui/**"
549 excludes="ext/**,MCview/**,org/**,vamsas/**,jalview/ext/paradise/**" />
552 <target name="packageApplet" depends="compileApplet, buildPropertiesFile">
553 <copy file="${resourceDir}/images/idwidth.gif" toFile="${outputDir}/images/idwidth.gif" />
554 <copy file="${resourceDir}/images/link.gif" toFile="${outputDir}/images/link.gif" />
555 <copy todir="${outputDir}/lang">
556 <fileset dir="${resourceDir}/lang">
557 <include name="**.*"/>
560 <jar destfile="in.jar" index="true">
562 <attribute name="Main-Class" value="jalview.bin.JalviewLite" />
563 <attribute name="Application-Name" value="JalviewLite" />
564 <attribute name="Codebase" value="${applet.codebase}" />
566 <fileset dir="${outputDir}">
567 <include name="com/**" />
568 <include name="MCview/**" />
569 <include name="jalview/**" />
570 <include name=".build_properties" />
571 <include name="images/idwidth.gif" />
572 <include name="images/link.gif" />
573 <include name="lang/**" />
577 <target name="obfuscate" depends="-obfuscatefake,-obfuscatereally">
579 <target name="-obfuscatefake" depends="packageApplet" if="donotobfuscate">
580 <copy file="in.jar" tofile="${jalviewLiteJar}" overwrite="true" />
581 <delete file="in.jar" />
583 <target name="-obfuscatereally" unless="donotobfuscate">
585 <path id="obfuscateDeps.path">
586 <pathelement location="${applet.jre.tools}" />
587 <pathelement location="appletlib/${jmolJar}" />
588 <pathelement location="appletlib/${jsonSimple}" />
589 <pathelement location="appletlib/${javaJson}" />
591 <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
594 <injar file="in.jar" />
595 <outjar file="${jalviewLiteJar}" />
596 <libraryjar refid="obfuscateDeps.path" />
598 <keep access="public" type="class" name="jalview.bin.JalviewLite">
599 <field access="public" />
600 <method access="public" />
601 <constructor access="public" />
603 <keep access="public" type="class" name="jalview.appletgui.AlignFrame">
604 <field access="public" />
605 <method access="public" />
606 <constructor access="public" />
608 <!-- -libraryjars "${obfuscateDeps}"
610 -outjars jalviewApplet.jar
611 -keep public class jalview.bin.JalviewLite
614 <delete file="in.jar" />
617 <target name="castorbinding" depends="init" description="Generate Java bindings to supported Jalview XML models.">
618 <taskdef name="castor-srcgen" classname="org.castor.anttask.CastorCodeGenTask" classpathref="build.classpath" />
620 <fileset dir="${sourceDir}/jalview/schemabinding/version2">
621 <include name="*.java" />
622 <include name="descriptors/*.java" />
625 <castor-srcgen file="${schemaDir}/vamsas.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
626 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
627 <castor-srcgen file="${schemaDir}/JalviewWsParamSet.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
628 <castor-srcgen file="${schemaDir}/jalview.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
630 now build the jalview.binding package with the old schema set
633 <fileset dir="${sourceDir}/jalview/binding/">
634 <include name="**" />
637 <castor-srcgen file="${schemaDir}/vamsasJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
638 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
639 <castor-srcgen file="${schemaDir}/jalviewJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
641 <target name="sourcedist" description="create jalview source distribution" depends="init">
642 <delete file="${source.dist.name}" />
643 <tar destfile="${source.dist.name}" compression="gzip">
644 <tarfileset dir="./" prefix="jalview" preserveLeadingSlashes="true">
645 <include name="LICENSE" />
646 <include name="README" />
647 <include name="build.xml" />
648 <include name="jalview-jalopy.xml" />
649 <include name="JalviewApplet.jpx" />
650 <include name="JalviewX.jpx" />
651 <include name="nbbuild.xml"/>
652 <include name="nbproject/genfiles.properties"/>
653 <include name="nbproject/project.properties"/>
654 <include name="nbproject/project.xml"/>
655 <include name="${sourceDir}/*.java" />
656 <include name="${sourceDir}/**/*.java" />
657 <include name="${sourceDir}/**/*.cdr" />
658 <include name="${libDir}/**/*" />
659 <include name="${resourceDir}/**/*" />
660 <include name="${helpDir}/**/*" />
661 <include name="appletlib/${jmolJar}" />
662 <exclude name="**/*locales" />
663 <exclude name="*locales/**" />
664 <exclude name="utils/InstallAnywhere/**Build.iap_xml" />
665 <exclude name="utils/InstallAnywhere/**Build*/**" />
666 <exclude name="utils/InstallAnywhere/**Build*/**" />
667 <exclude name="utils/InstallAnywhere/**locale*" />
668 <exclude name="utils/InstallAnywhere/**locale*/**" />
669 <include name="${schemaDir}/**/*" />
670 <include name="utils/**/*" />
671 <include name="${docDir}/**/*" />
672 <include name="examples/**/*" />
676 <target name="pubapplet" description="installs the jalviewLite applet and dependent jars into an applet examples directory built under ${outputDir}" depends="makeApplet">
677 <copy todir="${packageDir}/examples">
678 <fileset dir="examples">
679 <include name="**/*"/>
680 <include name="javascript/*"/>
681 <include name="jmol/*"/>
684 <include name="${jalviewLiteJar}" />
686 <fileset dir="appletlib">
687 <include name="**/*"/>
690 <jar update="true" index="true" jarfile="${packageDir}/examples/${jalviewLiteJar}"/>
691 <jar update="true" index="true" jarfile="${packageDir}/examples/${javaJson}"/>
692 <jar update="true" index="true" jarfile="${packageDir}/examples/${jsonSimple}"/>
693 <jar update="true" index="true" jarfile="${packageDir}/examples/${jmolJar}">
695 <attribute name="Application-Name" value="Jmol (bundled with JalviewLite)"/>
696 <!-- <attribute name="Permissions" value="sandbox" /> -->
697 <!--<attribute name="Trusted-Lib" value="true" /> -->
698 <attribute name="Codebase" value="${applet.codebase}"/>
699 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}"/>
702 <signjar sigalg="SHA1WithRSA" storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
703 <fileset dir="${packageDir}/examples">
704 <include name="*.jar" />
707 <presetdef name="ap_applet.jar">
708 <!-- build a signed applet with 'all-permissions' -
709 Needs 'param name="permissions' value="all-permissions"' in applet tag
710 JalviewLite+JmolApplet linked sequence/structure fails
711 Mixed code warnings are raised
713 <jar update="true" index="true">
715 <attribute name="Application-Name" value="JalviewLite" />
716 <attribute name="Permissions" value="all-permissions" />
717 <attribute name="Codebase" value="${applet.codebase}" />
718 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
719 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
723 <presetdef name="applet.jar">
724 <!-- build signed applet with sandbox permissions -
725 Needs 'param name="permissions' value="sandbox"' in applet tag
726 Preserves Pre-Java 1.7_u45 behavior once 'permissions' parameter added to applet tag
729 <jar update="true" index="true">
731 <attribute name="Application-Name" value="JalviewLite" />
732 <attribute name="Permissions" value="sandbox" />
733 <attribute name="Codebase" value="${applet.codebase}" />
734 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
735 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
739 <presetdef name="tl_applet.jar">
740 <!-- build signed applet with trusted library/trusted permissions -
741 Needs 'param name="permissions' value="all-permissions"' in applet tag
743 No mixed code warnings raised
744 Jmol/JalviewLite sequence/structure example doesn't link structures
745 Raises dialog asking user to allow page to control applet via LiveConnect javascript
749 <jar update="true" index="true">
751 <attribute name="Application-Name" value="JalviewLite" />
752 <attribute name="Permissions" value="all-permissions" />
753 <attribute name="Codebase" value="${applet.codebase}" />
754 <attribute name="Trusted-Only" value="true" />
755 <attribute name="Trusted-Library" value="true" />
759 <presetdef name="to_applet.jar">
760 <!-- not fully test variant (yet) -->
761 <jar update="true" index="true">
763 <attribute name="Application-Name" value="JalviewLite" />
764 <attribute name="Permissions" value="all-permissions" />
765 <attribute name="Codebase" value="${applet.codebase}" />
766 <attribute name="Trusted-Only" value="true" />
770 <!-- create differently privileged artefacts -->
771 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/u_${jalviewLiteJar}" />
772 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true"/>
773 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/u_${javaJson}" overwrite="true"/>
774 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/u_${jsonSimple}" overwrite="true"/>
775 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/ap_${jalviewLiteJar}" />
776 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/ap_${jmolJar}"/>
777 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/ap_${javaJson}"/>
778 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/ap_${jsonSimple}"/>
779 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jalviewLiteJar}" />
780 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jmolJar}" />
781 <ap_applet.jar jarfile="${packageDir}/examples/ap_${javaJson}" />
782 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jsonSimple}" />
783 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/tl_${jalviewLiteJar}" />
784 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/tl_${jmolJar}" />
785 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/tl_${javaJson}" />
786 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/tl_${jsonSimple}" />
787 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jalviewLiteJar}" />
788 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jmolJar}" />
789 <tl_applet.jar jarfile="${packageDir}/examples/tl_${javaJson}" />
790 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jsonSimple}" />
791 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/to_${jalviewLiteJar}" />
792 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/to_${jmolJar}" />
793 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/to_${javaJson}" />
794 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/to_${jsonSimple}" />
795 <to_applet.jar jarfile="${packageDir}/examples/to_${jalviewLiteJar}" />
796 <to_applet.jar jarfile="${packageDir}/examples/to_${jmolJar}" />
797 <to_applet.jar jarfile="${packageDir}/examples/to_${javaJson}" />
798 <to_applet.jar jarfile="${packageDir}/examples/to_${jsonSimple}" />
799 <!-- finally, create manifest for original jars -->
800 <applet.jar jarfile="${packageDir}/examples/${jalviewLiteJar}" />
801 <applet.jar jarfile="${packageDir}/examples/${jmolJar}" />
802 <applet.jar jarfile="${packageDir}/examples/${javaJson}" />
803 <applet.jar jarfile="${packageDir}/examples/${jsonSimple}" />
805 <!-- todo - write examples/downloads for alternate versions of the applet -->
806 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
808 <fileset dir="${packageDir}/examples">
809 <exclude name="u_*.jar"/>
810 <include name="${jalviewLiteJar}" />
811 <include name="${jmolJar}" />
812 <include name="${javaJson}" />
813 <include name="${jsonSimple}" />
814 <include name="to_${jalviewLiteJar}" />
815 <include name="to_${jmolJar}" />
816 <include name="to_${javaJson}" />
817 <include name="to_${jsonSimple}" />
818 <include name="tl_${jalviewLiteJar}" />
819 <include name="tl_${jmolJar}" />
820 <include name="tl_${javaJson}" />
821 <include name="tl_${jsonSimple}" />
822 <include name="ap_${jalviewLiteJar}" />
823 <include name="ap_${jmolJar}" />
824 <include name="ap_${javaJson}" />
825 <include name="ap_${jsonSimple}" />
828 <!-- bizarre bug causes JmolApplet to always get signed, even if excluded from above. so copy explicitly -->
829 <copy file="appletlib/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true" />
830 <!-- finally, replace any launchApp servlet tags with a version specification -->
831 <replace value="http://www.jalview.org/services/launchApp?version=${JALVIEW_VERSION}"">
832 <replacetoken><![CDATA[http://www.jalview.org/services/launchApp"]]></replacetoken>
833 <fileset dir="${packageDir}/examples">
834 <include name="**/*.html"/>
837 <replace value="http://www.jalview.org/services/launchApp?version=${JALVIEW_VERSION}'">
838 <replacetoken><![CDATA[http://www.jalview.org/services/launchApp']]></replacetoken>
839 <fileset dir="${packageDir}/examples">
840 <include name="**/*.html"/>
845 <target name="sourcedoc" description="Create jalview source documentation pages" depends="init">
846 <javadoc destdir="${javadocDir}">
847 <packageset dir="${sourceDir}" includes="jalview/*,MCView/*">