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
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/>.
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">
23 <fileset dir="utils/jalopy/lib">
24 <include name="*.jar" />
29 <target name="help" depends="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" />
47 <!-- utils is a class path to additional utilities needed for
48 building docs, jars and webstart stuff -->
50 Userdefined build property defaults
52 wsdl.server list (plus namespace mapping info ???) - also want
53 ... to make this a dynamically generatable property
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).
63 <path id="axis.classpath">
65 <fileset dir="/usr/local/axis/lib">
66 <include name="**/*.jar" />
68 <fileset dir="/usr/local/jakarta-tomcat-5/webapps/axis/WEB-INF/lib">
69 <include name="**/*.jar"/>
70 <include name="*.jar"/>
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" />
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" />
84 <property name="jalview.key" value="jalview" />
86 <property name="jalview.key.pass" value="alignmentisfun" />
90 <!-- Don't change anything below here unless you know what you are doing! -->
91 <!-- Url path for WebStart in JNLP file -->
92 <property name="WebStartLocation" value="http://www.jalview.org/webstart" />
93 <!-- Webstart Image - looked for in resources/images -->
94 <property name="WebStartImage" value="JalviewLogo_big.png"/>
95 <!-- J2SE version needed for webstart launch -->
96 <property name="j2sev" value="1.6+"/>
98 <!-- Permissions for running Java applets and applications. -->
99 <!-- Defaults are those suitable for deploying jalview webstart www.jalview.org -->
100 <property name="application.codebase" value="*.jalview.org" />
101 <!-- and allowing the applet to be deployed from any URL -->
102 <property name="applet.codebase" value="*" />
103 <property name="applet.caller-codebase" value="${applet.codebase}" />
105 <!-- build directory configuration -->
106 <property name="libDir" value="lib" />
107 <property name="resourceDir" value="resources" />
108 <property name="helpDir" value="help" />
109 <property name="docDir" value="doc" />
110 <property name="sourceDir" value="src" />
111 <property name="schemaDir" value="schemas" />
112 <property name="outputDir" value="classes" />
113 <property name="packageDir" value="dist" />
114 <property name="outputJar" value="jalview.jar" />
115 <!-- Jalview Applet JMol Jar Dependency -->
116 <property name="jmolJar" value="JmolApplet-12.2.4.jar" />
117 <property name="jalviewLiteJar" value="jalviewApplet.jar" />
118 <!-- switch to indicate if we should obfuscate jalviewLite -->
119 <!--<property name="donotobfuscate" value="true"/> -->
121 <!-- Jalview Web Service Clients - see the comments in 'buildextclients' for details -->
122 <property name="wsdl.File" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred?wsdl" />
123 <property name="wsdl.Files" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/vamsas?wsdlFiles" />
124 <property name="wsdl.MsaWS" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/MuscleWS?wsdl" />
125 <property name="wsdl.MsaWS2" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/ClustalWS?wsdl" />
126 <property name="WSInterf" value="MsaWS" />
127 <property name="wsdl.Namespace" value="vamsas" />
128 <property name="wsdl.ClientNS" value="ext.vamsas" />
129 <!-- the class path for building the application -->
130 <path id="build.classpath">
131 <fileset dir="utils">
132 <include name="*.jar" />
133 <include name="**/*.jar" />
135 <fileset dir="${libDir}">
136 <include name="*.jar" />
137 <include name="**/*.jar" />
139 <fileset dir="${java.home}/lib">
140 <include name="plugin.jar"/>
142 <fileset dir="appletlib">
143 <!-- the JmolApplet includes the JmolApplet console and the application javac seems to always try and build all packages
145 <include name="${jmolJar}" />
149 <property name="source.dist.name" value="${basedir}/jalview-src.tar.gz" />
150 <!-- The Location of the java 1.1.8 jdk -->
151 <!--<property name="java118.home" value="C:\Sun\jdk1.1.8" />
153 <property name="java118.home" value="${java.home}" />
154 <!--<property name="applet.jre.tools" value="${java118.home}/lib/classes.zip" />
155 --><!-- jre for 1.4 version -->
156 <property name="applet.jre.tools" value="${java.home}/lib/rt.jar"/>
158 <!-- the classpath for building the 1.1 applet -->
159 <path id="jalviewlite.deps">
160 <fileset dir="${java118.home}">
161 <include name="lib/classes.zip" />
163 <fileset dir="${java.home}/lib">
164 <include name="plugin.jar"/>
166 <pathelement location="appletlib/${jmolJar}" />
168 <!-- default location for outputting javadoc -->
169 <property name="javadocDir" value="${packageDir}/javadoc"/>
173 <taskdef classpath="utils/roxes-ant-tasks-1.2-2004-01-30.jar" resource="com/roxes/tools/ant/taskdefs.properties" />
174 <target name="buildPropertiesFile" depends="init">
175 <tstamp prefix="build">
176 <format property="date" pattern="dd MMMM yyyy" />
178 <properties file="${outputDir}/.build_properties">
180 ---Jalview Build Details---
182 <property name="VERSION" value="${JALVIEW_VERSION}" />
183 <property name="BUILD_DATE" value="${build.date}" />
188 <target name="clean" depends="init">
189 <!-- not efficient yet. -->
190 <delete dir="${outputDir}" includes="*,**/*"/>
193 <target name="distclean" depends="init, clean">
195 <echo message="REMOVING ALL BACKUP/AUTOSAVES!" />
198 <include name="${outputJar}" />
199 <include name="#*#" />
200 <include name="#*.*#" />
201 <include name="**/#*#" />
202 <include name="**/#*.*#" />
203 <include name="*~" />
204 <include name="*.*~" />
205 <include name="**/*~" />
206 <include name="**/*.*~" />
211 <target name="prepare" depends="init">
212 <mkdir dir="${outputDir}" />
213 <copy todir="${outputDir}">
215 <include name="${docDir}/**/*.*" />
216 <include name="${helpDir}/**/*.*" />
217 <include name="${libDir}/*.jar" />
219 <fileset dir="${resourceDir}">
220 <include name="**/*.*" />
225 <target name="build" depends="prepare">
226 <!-- not efficient yet. -->
227 <javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="build.classpath">
228 <exclude name="jalview/*applet*" />
229 <exclude name="jalview/appletgui/**" />
230 <exclude name="com/stevesoft/**" />
233 <target name="buildindices" depends="init, prepare" unless="help.uptodate">
234 <java classname="com.sun.java.help.search.Indexer" classpathref="build.classpath" fork="true" dir="${outputDir}/${helpDir}">
239 <target name="makefulldist" depends="makedist">
240 <copy todir="${packageDir}">
241 <fileset dir="${resourceDir}/images">
242 <include name="${WebStartImage}"/>
246 <taskdef classpathref="build.classpath" resource="com/roxes/tools/ant/taskdefs.properties" />
248 <!-- create a dummy jar which will eventually contain the jnlp template -->
249 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
250 <fileset dir="${packageDir}">
251 <include name="jalview.jar" />
255 <mkdir dir="${packageDir}/JNLP-INF"/>
256 <antcall target="writejnlpf">
257 <param name="jnlpFile" value="${packageDir}/JNLP-INF/APPLICATION-TEMPLATE.JNLP"/>
258 <param name="inih" value="*" />
259 <param name="maxh" value="*"/>
262 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
263 <fileset dir="${packageDir}">
264 <include name="JNLP-INF"/>
268 <antcall target="writejnlpf">
269 <param name="jnlpFile" value="${packageDir}/jalview.jnlp"/>
270 <param name="inih" value="10M" />
271 <param name="maxh" value="256M"/>
274 <antcall target="writejnlpf">
275 <param name="jnlpFile" value="${packageDir}/jalview_1G.jnlp"/>
276 <param name="inih" value="128M" />
277 <param name="maxh" value="512M"/>
280 <antcall target="writejnlpf">
281 <param name="jnlpFile" value="${packageDir}/jalview_2G.jnlp"/>
282 <param name="inih" value="256M" />
283 <param name="maxh" value="1024M"/>
286 <!-- finally, need to postprocess to add in associations at end of 'information' element
288 <xslt in="${packageDir}/jalview_noa_1G.jnlp" out="${packageDir}/jalview_1G.jnlp">
295 <association mime-type="application-x/ext-file" extensions="fa"/>
296 <association mime-type="application-x/ext-file" extensions="fasta"/>
297 <association mime-type="application-x/ext-file" extensions="fastq"/>
298 <association mime-type="application-x/ext-file" extensions="blc"/>
299 <association mime-type="application-x/ext-file" extensions="msf"/>
300 <association mime-type="application-x/ext-file" extensions="pfam"/>
301 <association mime-type="application-x/ext-file" extensions="aln"/>
302 <association mime-type="application-x/ext-file" extensions="pir"/>
303 <association mime-type="application-x/ext-file" extensions="amsa"/>
304 <association mime-type="application-x/ext-file" extensions="stk"/>
305 <association mime-type="application-x/ext-file" extensions="jar"/>-->
306 <!-- and sign the jars -->
307 <!-- the default keystore details might need to be edited here -->
308 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false" sigalg="SHA1withRSA">
309 <fileset dir="${packageDir}">
310 <include name="*.jar" />
315 <target name="runenv" depends="init">
316 <path id="run.classpath">
317 <pathelement location="${outputDir}" />
318 <fileset dir="${outputDir}">
319 <include name="${libDir}/*.jar" />
322 <pathconvert targetos="unix" refid="run.classpath" property="run.classpath" />
324 <echo>java -classpath ${run.classpath} jalview.bin.Jalview
327 <target name="writejnlpf">
328 <presetdef name="jnlpf">
329 <jnlp codebase="${WebStartLocation}">
331 <title>Jalview</title>
332 <vendor>The Barton Group</vendor>
333 <homepage href="http://www.jalview.org" />
334 <description>Jalview Multiple Alignment Editor</description>
335 <description kind="short">Jalview</description>
336 <icon href="${WebStartImage}" />
340 <j2se version="${j2sev}" initial_heap_size="${inih}" max_heap_size="${maxh}" />
341 <fileset dir="${packageDir}">
342 <include name="jalview.jar" />
344 <fileset dir="${packageDir}">
345 <include name="*.jar" />
346 <include name="*_*.jar" />
347 <exclude name="jalview.jar" />
349 <property name="jalview.version" value="${JALVIEW_VERSION}" />
351 <application_desc main_class="jalview.bin.Jalview">
359 <jnlpf toFile="${jnlpFile}"/>
361 <target name="buildextclients" depends="init">
362 <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" />
363 <condition property="dontextbuild">
364 <equals arg1="n" arg2="${doextbuild.response}" />
366 <condition property="dontextbuild">
367 <equals arg1="N" arg2="${doextbuild.response}" />
369 <fail if="dontextbuild">
370 Build External Client Code process aborted by user. Jalview source is unchanged.
372 <!-- Currently, this doesn't happen automatically.
373 1. Run WSDL2Java as below, which generates an ext.vamsas +
374 vamsas.<datapackages> fileset.
375 2. refactor ext.vamsas.SpecificserviceWS* to
376 ext.vamsas.ServiceclassWS* that implements the ServiceclassWSI interface.
377 3. Update the jalview.ws.*WServices classes to reflect the
378 interface type, and all locations of this wsdl type that Jalview
382 <path id="axisbuild">
383 <path refid="build.classpath" />
385 <taskdef resource="axis-tasks.properties" classpathref="axisbuild" />
387 <fileset dir="${sourceDir}" id="client">
388 <include name="${wsdl.ClientNS}/*.*" />
392 <axis-wsdl2java output="${sourceDir}" verbose="true" url="${wsdl.MsaWS2}" serverside="false" deployscope="Request" debug="false" helpergen="true" all="true">
394 <mapping namespace="${wsdl.Namespace}" package="${wsdl.ClientNS}" />
395 <mapping namespace="http://dataTypes.vamsas" package="${wsdl.ClientNS}" />
400 <target name="makedist" depends="build, buildPropertiesFile, buildindices">
401 <!-- make the package jar if not already existing -->
402 <mkdir dir="${packageDir}" />
403 <!-- clean dir if it already existed -->
405 <fileset dir="${packageDir}">
406 <include name="*.jar"/>
409 <jar destfile="${packageDir}/${outputJar}" index="true">
411 <attribute name="Main-Class" value="jalview.bin.Jalview" />
412 <attribute name="Permissions" value="all-permissions" />
413 <attribute name="Application-Name" value="Jalview Desktop" />
414 <attribute name="Codebase" value="${application.codebase}" />
416 <fileset dir="${outputDir}/">
417 <exclude name="cache*/**" />
418 <exclude name="*.jar" />
419 <exclude name="*.jar.*" />
420 <exclude name="**/*.jar" />
421 <exclude name="**/*.jar.*" />
425 <copy toDir="${packageDir}" flatten="true">
426 <fileset dir="${outputDir}">
427 <include name="*.jar" />
428 <include name="**/*.jar" />
434 <!-- jalopy code reformatter -->
435 <target name="sourcescrub" depends="init,build">
436 <jalopy destdir="jsrc" classpathref="run.classpath" convention="jalview-jalopy.xml">
437 <fileset dir="${sourceDir}">
438 <include name="*.java" />
439 <include name="**/*.java" />
440 <include name="**/**/*.java" />
447 <!-- Compile, package and obfuscate Jalview Applet -->
448 <target name="makeApplet" depends="obfuscate" description="assemble the final jalviewLite applet jar with or without obfuscation"/>
450 <target name="compileApplet" depends="init,clean">
451 <mkdir dir="${outputDir}" />
452 <javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}"
453 classpathref="jalviewlite.deps" includes="jalview/appletgui/**"
454 excludes="ext/**,MCview/**,org/**,vamsas/**" />
457 <target name="packageApplet" depends="compileApplet, buildPropertiesFile">
458 <copy file="${resourceDir}/images/idwidth.gif" toFile="${outputDir}/images/idwidth.gif" />
459 <copy file="${resourceDir}/images/link.gif" toFile="${outputDir}/images/link.gif" />
460 <copy todir="${outputDir}/lang">
461 <fileset dir="${resourceDir}/lang"><include name="**.*"/></fileset></copy>
462 <jar destfile="in.jar" index="true">
464 <attribute name="Main-Class" value="jalview.bin.JalviewLite" />
465 <attribute name="Application-Name" value="JalviewLite" />
466 <attribute name="Codebase" value="${applet.codebase}" />
468 <fileset dir="${outputDir}">
469 <include name="com/**" />
470 <include name="MCview/**" />
471 <include name="jalview/**" />
472 <include name=".build_properties" />
473 <include name="images/idwidth.gif" />
474 <include name="images/link.gif" />
475 <include name="lang/**" />
479 <target name="obfuscate" depends="-obfuscatefake,-obfuscatereally">
481 <target name="-obfuscatefake" depends="packageApplet" if="donotobfuscate">
482 <copy file="in.jar" tofile="${jalviewLiteJar}" overwrite="true" />
483 <delete file="in.jar" />
485 <target name="-obfuscatereally" unless="donotobfuscate">
487 <path id="obfuscateDeps.path">
488 <pathelement location="${applet.jre.tools}" />
489 <pathelement location="appletlib/${jmolJar}" />
491 <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
494 <injar file="in.jar" />
495 <outjar file="${jalviewLiteJar}" />
496 <libraryjar refid="obfuscateDeps.path" />
498 <keep access="public" type="class" name="jalview.bin.JalviewLite">
499 <field access="public" />
500 <method access="public" />
501 <constructor access="public" />
503 <keep access="public" type="class" name="jalview.appletgui.AlignFrame">
504 <field access="public" />
505 <method access="public" />
506 <constructor access="public" />
508 <!-- -libraryjars "${obfuscateDeps}"
510 -outjars jalviewApplet.jar
511 -keep public class jalview.bin.JalviewLite
514 <delete file="in.jar" />
517 <target name="castorbinding" depends="init" description="Generate Java bindings to supported Jalview XML models.">
518 <taskdef name="castor-srcgen" classname="org.castor.anttask.CastorCodeGenTask" classpathref="build.classpath" />
520 <fileset dir="${sourceDir}/jalview/schemabinding/version2">
521 <include name="*.java" />
522 <include name="descriptors/*.java" />
525 <castor-srcgen file="${schemaDir}/vamsas.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
526 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
527 <castor-srcgen file="${schemaDir}/JalviewWsParamSet.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
528 <castor-srcgen file="${schemaDir}/jalview.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
530 now build the jalview.binding package with the old schema set
533 <fileset dir="${sourceDir}/jalview/binding/">
534 <include name="**" />
537 <castor-srcgen file="${schemaDir}/vamsasJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
538 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
539 <castor-srcgen file="${schemaDir}/jalviewJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
541 <target name="sourcedist" description="create jalview source distribution" depends="init">
542 <delete file="${source.dist.name}" />
543 <tar destfile="${source.dist.name}" compression="gzip">
544 <tarfileset dir="./" prefix="jalview" preserveLeadingSlashes="true">
545 <include name="LICENSE" />
546 <include name="README" />
547 <include name="build.xml" />
548 <include name="jalview-jalopy.xml" />
549 <include name="JalviewApplet.jpx" />
550 <include name="JalviewX.jpx" />
551 <include name="nbbuild.xml"/>
552 <include name="nbproject/genfiles.properties"/>
553 <include name="nbproject/project.properties"/>
554 <include name="nbproject/project.xml"/>
555 <include name="${sourceDir}/*.java" />
556 <include name="${sourceDir}/**/*.java" />
557 <include name="${sourceDir}/**/*.cdr" />
558 <include name="${libDir}/**/*" />
559 <include name="${resourceDir}/**/*" />
560 <include name="${helpDir}/**/*" />
561 <include name="appletlib/${jmolJar}" />
562 <exclude name="**/*locales" />
563 <exclude name="*locales/**" />
564 <exclude name="utils/InstallAnywhere/**Build.iap_xml" />
565 <exclude name="utils/InstallAnywhere/**Build*/**" />
566 <exclude name="utils/InstallAnywhere/**Build*/**" />
567 <exclude name="utils/InstallAnywhere/**locale*" />
568 <exclude name="utils/InstallAnywhere/**locale*/**" />
569 <include name="${schemaDir}/**/*" />
570 <include name="utils/**/*" />
571 <include name="${docDir}/**/*" />
572 <include name="examples/**/*" />
576 <target name="pubapplet" description="installs the jalviewLite applet and dependent jars into an applet examples directory built under ${outputDir}" depends="makeApplet">
577 <copy todir="${packageDir}/examples">
578 <fileset dir="examples">
579 <include name="**/*"/>
580 <include name="javascript/*"/>
581 <include name="jmol/*"/>
584 <include name="${jalviewLiteJar}" />
586 <fileset dir="appletlib">
587 <include name="**/*"/>
590 <jar update="true" index="true" jarfile="${packageDir}/examples/${jalviewLiteJar}"/>
591 <jar update="true" index="true" jarfile="${packageDir}/examples/${jmolJar}">
593 <attribute name="Application-Name" value="Jmol (bundled with JalviewLite)"/>
594 <!-- <attribute name="Permissions" value="sandbox" /> -->
595 <!--<attribute name="Trusted-Lib" value="true" /> -->
596 <attribute name="Codebase" value="${applet.codebase}"/>
597 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}"/>
600 <signjar sigalg="SHA1WithRSA" storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
601 <fileset dir="${packageDir}/examples">
602 <include name="*.jar" />
605 <presetdef name="ap_applet.jar">
606 <!-- build a signed applet with 'all-permissions' -
607 Needs 'param name="permissions' value="all-permissions"' in applet tag
608 JalviewLite+JmolApplet linked sequence/structure fails
609 Mixed code warnings are raised
611 <jar update="true" index="true">
613 <attribute name="Application-Name" value="JalviewLite" />
614 <attribute name="Permissions" value="all-permissions" />
615 <attribute name="Codebase" value="${applet.codebase}" />
616 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
617 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
621 <presetdef name="applet.jar">
622 <!-- build signed applet with sandbox permissions -
623 Needs 'param name="permissions' value="sandbox"' in applet tag
624 Preserves Pre-Java 1.7_u45 behavior once 'permissions' parameter added to applet tag
627 <jar update="true" index="true">
629 <attribute name="Application-Name" value="JalviewLite" />
630 <attribute name="Permissions" value="sandbox" />
631 <attribute name="Codebase" value="${applet.codebase}" />
632 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
633 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
637 <presetdef name="tl_applet.jar">
638 <!-- build signed applet with trusted library/trusted permissions -
639 Needs 'param name="permissions' value="all-permissions"' in applet tag
641 No mixed code warnings raised
642 Jmol/JalviewLite sequence/structure example doesn't link structures
643 Raises dialog asking user to allow page to control applet via LiveConnect javascript
647 <jar update="true" index="true">
649 <attribute name="Application-Name" value="JalviewLite" />
650 <attribute name="Permissions" value="all-permissions" />
651 <attribute name="Codebase" value="${applet.codebase}" />
652 <attribute name="Trusted-Only" value="true" />
653 <attribute name="Trusted-Library" value="true" />
657 <presetdef name="to_applet.jar">
658 <!-- not fully test variant (yet) -->
659 <jar update="true" index="true">
661 <attribute name="Application-Name" value="JalviewLite" />
662 <attribute name="Permissions" value="all-permissions" />
663 <attribute name="Codebase" value="${applet.codebase}" />
664 <attribute name="Trusted-Only" value="true" />
668 <!-- create differently privileged artefacts -->
669 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/u_${jalviewLiteJar}" />
670 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}"/>
671 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/ap_${jalviewLiteJar}" />
672 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/ap_${jmolJar}"/>
673 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jalviewLiteJar}" />
674 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jmolJar}" />
675 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/tl_${jalviewLiteJar}" />
676 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/tl_${jmolJar}" />
677 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jalviewLiteJar}" />
678 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jmolJar}" />
679 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/to_${jalviewLiteJar}" />
680 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/to_${jmolJar}" />
681 <to_applet.jar jarfile="${packageDir}/examples/to_${jalviewLiteJar}" />
682 <to_applet.jar jarfile="${packageDir}/examples/to_${jmolJar}" />
683 <!-- finally, create manifest for original jars -->
684 <applet.jar jarfile="${packageDir}/examples/${jalviewLiteJar}" />
685 <applet.jar jarfile="${packageDir}/examples/${jmolJar}" />
687 <!-- todo - write examples/downloads for alternate versions of the applet -->
688 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
690 <fileset dir="${packageDir}/examples">
691 <include name="${jalviewLiteJar}" />
692 <include name="${jmolJar}" />
693 <include name="to_${jalviewLiteJar}" />
694 <include name="to_${jmolJar}" />
695 <include name="tl_${jalviewLiteJar}" />
696 <include name="tl_${jmolJar}" />
697 <include name="ap_${jalviewLiteJar}" />
698 <include name="ap_${jmolJar}" />
702 <target name="sourcedoc" description="Create jalview source documentation pages" depends="init">
703 <javadoc destdir="${javadocDir}">
704 <packageset dir="${sourceDir}" includes="jalview/*,MCView/*">