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+"/>
92 <!-- Java Compilation settings - source and target javac version -->
93 <property name="javac.source" value="1.7"/>
94 <property name="javac.target" value="1.7"/>
96 <!-- Permissions for running Java applets and applications. -->
97 <!-- Defaults are those suitable for deploying jalview webstart www.jalview.org -->
98 <property name="application.codebase" value="*.jalview.org" />
99 <!-- and allowing the applet to be deployed from any URL -->
100 <!-- 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 -->
101 <property name="applet.codebase" value="*.jalview.org *.dundee.ac.uk *" />
102 <property name="applet.caller-codebase" value="${applet.codebase}" />
104 <!-- build directory configuration -->
105 <property name="libDir" value="lib" />
106 <property name="resourceDir" value="resources" />
107 <property name="helpDir" value="help" />
108 <property name="docDir" value="doc" />
109 <property name="sourceDir" value="src" />
110 <property name="schemaDir" value="schemas" />
111 <property name="outputDir" value="classes" />
112 <property name="packageDir" value="dist" />
113 <property name="outputJar" value="jalview.jar" />
114 <!-- Jalview Applet JMol Jar Dependency -->
115 <property name="jmolJar" value="JmolApplet-14.2.14_2015.06.11.jar" />
116 <property name="varnaJar" value="VARNAv3-93.jar" />
117 <property name="jsoup" value="jsoup-1.8.1.jar" />
118 <property name="jsonSimple" value="json_simple-1.1.jar" />
119 <property name="javaJson" value="java-json.jar" />
120 <property name="jalviewLiteJar" value="jalviewApplet.jar" />
121 <property name="reportDir" value="test-reports" />
122 <property name="testDir" value="test" />
123 <property name="testOutputDir" value="tests" />
124 <!-- switch to indicate if we should obfuscate jalviewLite -->
125 <!-- <property name="donotobfuscate" value="true"/> -->
126 <!-- switch to exclude associations from generated jnlp files -->
127 <!-- <property name="nojnlpfileassocs" value="true"/> -->
129 <!-- Jalview Web Service Clients - see the comments in 'buildextclients' for details -->
130 <property name="wsdl.File" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred?wsdl" />
131 <property name="wsdl.Files" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/vamsas?wsdlFiles" />
132 <property name="wsdl.MsaWS" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/MuscleWS?wsdl" />
133 <property name="wsdl.MsaWS2" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/ClustalWS?wsdl" />
134 <property name="WSInterf" value="MsaWS" />
135 <property name="wsdl.Namespace" value="vamsas" />
136 <property name="wsdl.ClientNS" value="ext.vamsas" />
137 <!-- the class path for building the application -->
138 <path id="build.classpath">
139 <fileset dir="utils">
140 <include name="*.jar" />
141 <include name="**/*.jar" />
143 <fileset dir="${libDir}">
144 <include name="*.jar" />
145 <include name="**/*.jar" />
147 <fileset dir="${java.home}/lib">
148 <include name="plugin.jar"/>
150 <fileset dir="appletlib">
151 <!-- the JmolApplet includes the JmolApplet console and the application javac seems to always try and build all packages
153 <include name="${jmolJar}" />
154 <include name="${varnaJar}" />
158 <property name="source.dist.name" value="${basedir}/jalview-src.tar.gz" />
159 <!-- The Location of the java 1.1.8 jdk -->
160 <!--<property name="java118.home" value="C:\Sun\jdk1.1.8" /> -->
161 <property name="java118.home" value="${java.home}" />
162 <!-- <property name="applet.jre.tools" value="${java118.home}/lib/classes.zip" />
164 <!-- jre for 1.4 version -->
165 <property name="applet.jre.tools" value="${java.home}/lib/rt.jar"/>
167 <!-- the classpath for building the 1.1 applet -->
168 <path id="jalviewlite.deps">
169 <fileset dir="${java118.home}">
170 <include name="lib/classes.zip" />
172 <fileset dir="${java.home}/lib">
173 <include name="plugin.jar"/>
175 <pathelement location="appletlib/${jmolJar}" />
176 <pathelement location="lib/${varnaJar}" />
177 <pathelement location="lib/${jsoup}" />
178 <pathelement location="lib/${jsonSimple}" />
179 <pathelement location="lib/${javaJson}" />
182 <!-- default location for outputting javadoc -->
183 <property name="javadocDir" value="${packageDir}/javadoc"/>
187 <taskdef classpath="utils/roxes-ant-tasks-1.2-2004-01-30.jar" resource="com/roxes/tools/ant/taskdefs.properties" />
188 <target name="buildPropertiesFile" depends="init">
189 <tstamp prefix="build">
190 <format property="date" pattern="dd MMMM yyyy" />
192 <properties file="${outputDir}/.build_properties">
194 ---Jalview Build Details---
196 <property name="VERSION" value="${JALVIEW_VERSION}" />
197 <property name="INSTALLATION" value="${INSTALLATION}" />
198 <property name="BUILD_DATE" value="${build.date}" />
203 <target name="clean" depends="init">
204 <!-- not efficient yet. -->
205 <delete dir="${outputDir}" includes="*,**/*"/>
208 <target name="distclean" depends="init, clean">
210 <echo message="REMOVING ALL BACKUP/AUTOSAVES!" />
213 <include name="${outputJar}" />
214 <include name="#*#" />
215 <include name="#*.*#" />
216 <include name="**/#*#" />
217 <include name="**/#*.*#" />
218 <include name="*~" />
219 <include name="*.*~" />
220 <include name="**/*~" />
221 <include name="**/*.*~" />
226 <target name="prepare" depends="init">
227 <mkdir dir="${outputDir}" />
228 <copy todir="${outputDir}">
230 <include name="${docDir}/**/*.*" />
231 <include name="${helpDir}/**/*.*" />
232 <include name="${libDir}/*.jar" />
234 <fileset dir="${resourceDir}">
235 <include name="**/*.*" />
240 <target name="build" depends="prepare">
241 <!-- not efficient yet. -->
242 <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="build.classpath">
243 <exclude name="jalview/*applet*" />
244 <exclude name="jalview/appletgui/**" />
245 <exclude name="com/stevesoft/**" />
250 <target name="testclean" depends="init">
251 <delete dir="${testOutputDir}" includes="*,**/*"/>
254 <target name="prepareTests" depends="init">
255 <mkdir dir="${testOutputDir}" />
256 <copy todir="${testOutputDir}">
258 <include name="${docDir}/**/*.*" />
259 <include name="${helpDir}/**/*.*" />
260 <include name="${libDir}/*.jar" />
262 <fileset dir="${resourceDir}">
263 <include name="**/*.*" />
268 <target name="buildTests" depends="prepareTests">
269 <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${testOutputDir}"
270 debug="${javac.debug}" classpathref="build.classpath" includeantruntime="false" >
272 <javac source="${javac.source}" target="${javac.target}" srcdir="${testDir}" destdir="${testOutputDir}"
273 debug="${javac.debug}" classpathref="build.classpath" includeantruntime="false" >
277 <taskdef name="testng" classname="org.testng.TestNGAntTask" >
278 <classpath location="utils/testnglibs/testng.jar" />
281 <target name="testng" depends="buildTests">
282 <testng classpathref="build.classpath" outputDir="${reportDir}"
283 haltOnFailure="false">
284 <classpath location="${testOutputDir}" />
285 <xmlfileset dir="utils" includes="jalview_testng.xml" />
289 <target name="buildindices" depends="init, prepare" unless="help.uptodate">
290 <java classname="com.sun.java.help.search.Indexer" classpathref="build.classpath" fork="true" dir="${outputDir}/${helpDir}">
295 <target name="makefulldist" depends="makedist">
296 <copy todir="${packageDir}">
297 <fileset dir="${resourceDir}/images">
298 <include name="${WebStartImage}"/>
302 <taskdef classpathref="build.classpath" resource="com/roxes/tools/ant/taskdefs.properties" />
304 <!-- create a dummy jar which will eventually contain the jnlp template -->
305 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
306 <fileset dir="${packageDir}">
307 <include name="jalview.jar" />
311 <mkdir dir="${packageDir}/JNLP-INF"/>
312 <antcall target="writejnlpf">
313 <param name="jnlpFile" value="${packageDir}/JNLP-INF/APPLICATION-TEMPLATE.JNLP"/>
314 <param name="inih" value="*" />
315 <param name="maxh" value="*"/>
318 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
319 <fileset dir="${packageDir}">
320 <include name="JNLP-INF"/>
324 <antcall target="writejnlpf">
325 <param name="jnlpFile" value="${packageDir}/jalview.jnlp"/>
326 <param name="inih" value="10M" />
327 <param name="maxh" value="256M"/>
330 <antcall target="writejnlpf">
331 <param name="jnlpFile" value="${packageDir}/jalview_1G.jnlp"/>
332 <param name="inih" value="128M" />
333 <param name="maxh" value="512M"/>
336 <antcall target="writejnlpf">
337 <param name="jnlpFile" value="${packageDir}/jalview_2G.jnlp"/>
338 <param name="inih" value="256M" />
339 <param name="maxh" value="1024M"/>
342 <!-- finally, need to postprocess to add in associations at end of 'information' element
344 <xslt in="${packageDir}/jalview_noa_1G.jnlp" out="${packageDir}/jalview_1G.jnlp">
351 <association mime-type="application-x/ext-file" extensions="fa"/>
352 <association mime-type="application-x/ext-file" extensions="fasta"/>
353 <association mime-type="application-x/ext-file" extensions="mfa"/>
354 <association mime-type="application-x/ext-file" extensions="fastq"/>
355 <association mime-type="application-x/ext-file" extensions="blc"/>
356 <association mime-type="application-x/ext-file" extensions="msf"/>
357 <association mime-type="application-x/ext-file" extensions="pfam"/>
358 <association mime-type="application-x/ext-file" extensions="aln"/>
359 <association mime-type="application-x/ext-file" extensions="pir"/>
360 <association mime-type="application-x/ext-file" extensions="amsa"/>
361 <association mime-type="application-x/ext-file" extensions="stk"/>
362 <association mime-type="application-x/ext-file" extensions="jar"/>-->
363 <!-- and sign the jars -->
364 <!-- the default keystore details might need to be edited here -->
365 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false" sigalg="SHA1withRSA">
366 <fileset dir="${packageDir}">
367 <include name="*.jar" />
372 <target name="runenv" depends="init">
373 <path id="run.classpath">
374 <pathelement location="${outputDir}" />
375 <fileset dir="${outputDir}">
376 <include name="${libDir}/*.jar" />
379 <pathconvert targetos="unix" refid="run.classpath" property="run.classpath" />
381 <echo>java -classpath ${run.classpath} jalview.bin.Jalview
385 <target name="-generatejnlpf">
386 <presetdef name="jnlpf">
387 <jnlp codebase="${WebStartLocation}">
389 <title>Jalview</title>
390 <vendor>The Barton Group</vendor>
391 <homepage href="http://www.jalview.org" />
392 <description>Jalview Multiple Alignment Editor</description>
393 <description kind="short">Jalview</description>
394 <icon href="${WebStartImage}" />
398 <j2se version="${j2sev}" initial_heap_size="${inih}" max_heap_size="${maxh}" />
399 <fileset dir="${packageDir}">
400 <include name="jalview.jar" />
402 <fileset dir="${packageDir}">
403 <include name="*.jar" />
404 <include name="*_*.jar" />
405 <exclude name="jalview.jar" />
406 <exclude name="*jnilib.jar"/>
409 <resources os="Mac OS X">
410 <property name="jalview.version" value="${JALVIEW_VERSION}" />
411 <fileset dir="${packageDir}">
412 <include name="*quaqua*.jnilib.jar"/>
416 <application_desc main_class="jalview.bin.Jalview">
424 <jnlpf toFile="${jnlpFile}"/>
428 <target name="-dofakejnlpfileassoc" depends="-generatejnlpf" if="nojnlpfileassocs">
429 <echo message="Not adding JNLP File Associations"/>
432 <target name="-dojnlpfileassoc" depends="-generatejnlpf" unless="nojnlpfileassocs">
433 <replace file="${jnlpFile}">
435 <![CDATA[</information>]]></replacetoken>
438 <association mime-type="application-x/ext-file" extensions="fa" />
439 <association mime-type="application-x/ext-file" extensions="fasta" />
440 <association mime-type="application-x/ext-file" extensions="mfa" />
441 <association mime-type="application-x/ext-file" extensions="fastq" />
442 <association mime-type="application-x/ext-file" extensions="blc" />
443 <association mime-type="application-x/ext-file" extensions="msf" />
444 <association mime-type="application-x/ext-file" extensions="pfam" />
445 <association mime-type="application-x/ext-file" extensions="aln"/>
446 <association mime-type="application-x/ext-file" extensions="pir"/>
447 <association mime-type="application-x/ext-file" extensions="amsa"/>
448 <association mime-type="application-x/ext-file" extensions="stk"/>
449 <association mime-type="application-x/ext-file" extensions="jvp"/>
450 </information>]]></replacevalue>
452 <echo message="Added file associations to JNLP file"/>
454 <target name="writejnlpf" depends="-dojnlpfileassoc,-dofakejnlpfileassoc">
457 <target name="buildextclients" depends="init">
458 <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" />
459 <condition property="dontextbuild">
460 <equals arg1="n" arg2="${doextbuild.response}" />
462 <condition property="dontextbuild">
463 <equals arg1="N" arg2="${doextbuild.response}" />
465 <fail if="dontextbuild">
466 Build External Client Code process aborted by user. Jalview source is unchanged.
468 <!-- Currently, this doesn't happen automatically.
469 1. Run WSDL2Java as below, which generates an ext.vamsas +
470 vamsas.<datapackages> fileset.
471 2. refactor ext.vamsas.SpecificserviceWS* to
472 ext.vamsas.ServiceclassWS* that implements the ServiceclassWSI interface.
473 3. Update the jalview.ws.*WServices classes to reflect the
474 interface type, and all locations of this wsdl type that Jalview
478 <path id="axisbuild">
479 <path refid="build.classpath" />
481 <taskdef resource="axis-tasks.properties" classpathref="axisbuild" />
483 <fileset dir="${sourceDir}" id="client">
484 <include name="${wsdl.ClientNS}/*.*" />
488 <axis-wsdl2java output="${sourceDir}" verbose="true" url="${wsdl.MsaWS2}" serverside="false" deployscope="Request" debug="false" helpergen="true" all="true">
490 <mapping namespace="${wsdl.Namespace}" package="${wsdl.ClientNS}" />
491 <mapping namespace="http://dataTypes.vamsas" package="${wsdl.ClientNS}" />
496 <target name="makedist" depends="build, buildPropertiesFile, buildindices">
497 <!-- make the package jar if not already existing -->
498 <mkdir dir="${packageDir}" />
499 <!-- clean dir if it already existed -->
501 <fileset dir="${packageDir}">
502 <include name="*.jar"/>
505 <jar destfile="${packageDir}/${outputJar}" index="true">
507 <attribute name="Main-Class" value="jalview.bin.Jalview" />
508 <attribute name="Permissions" value="all-permissions" />
509 <attribute name="Application-Name" value="Jalview Desktop" />
510 <attribute name="Codebase" value="${application.codebase}" />
512 <fileset dir="${outputDir}/">
513 <exclude name="cache*/**" />
514 <exclude name="*.jar" />
515 <exclude name="*.jar.*" />
516 <exclude name="**/*.jar" />
517 <exclude name="**/*.jar.*" />
521 <copy toDir="${packageDir}" flatten="true">
522 <fileset dir="${outputDir}">
523 <include name="*.jar" />
524 <include name="**/*.jar" />
530 <!-- jalopy code reformatter -->
531 <target name="sourcescrub" depends="init,build">
532 <jalopy destdir="jsrc" classpathref="run.classpath" convention="jalview-jalopy.xml">
533 <fileset dir="${sourceDir}">
534 <include name="*.java" />
535 <include name="**/*.java" />
536 <include name="**/**/*.java" />
543 <!-- Compile, package and obfuscate Jalview Applet -->
544 <target name="makeApplet" depends="obfuscate" description="assemble the final jalviewLite applet jar with or without obfuscation"/>
546 <target name="compileApplet" depends="init,clean">
547 <mkdir dir="${outputDir}" />
548 <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}"
549 classpathref="jalviewlite.deps" includes="jalview/appletgui/**"
550 excludes="ext/**,gui/**,jbgui/**,MCview/**,org/**,vamsas/**,jalview/ext/rbvi/**,jalview/ext/paradise/**" />
553 <target name="packageApplet" depends="compileApplet, buildPropertiesFile">
554 <copy file="${resourceDir}/images/idwidth.gif" toFile="${outputDir}/images/idwidth.gif" />
555 <copy file="${resourceDir}/images/link.gif" toFile="${outputDir}/images/link.gif" />
556 <copy todir="${outputDir}/lang">
557 <fileset dir="${resourceDir}/lang">
558 <include name="**.*"/>
561 <jar destfile="in.jar" index="true">
563 <attribute name="Main-Class" value="jalview.bin.JalviewLite" />
564 <attribute name="Application-Name" value="JalviewLite" />
565 <attribute name="Codebase" value="${applet.codebase}" />
567 <fileset dir="${outputDir}">
568 <include name="com/**" />
569 <include name="MCview/**" />
570 <include name="jalview/**" />
571 <include name=".build_properties" />
572 <include name="images/idwidth.gif" />
573 <include name="images/link.gif" />
574 <include name="lang/**" />
578 <target name="obfuscate" depends="-obfuscatefake,-obfuscatereally">
580 <target name="-obfuscatefake" depends="packageApplet" if="donotobfuscate">
581 <copy file="in.jar" tofile="${jalviewLiteJar}" overwrite="true" />
582 <delete file="in.jar" />
584 <target name="-obfuscatereally" unless="donotobfuscate">
586 <path id="obfuscateDeps.path">
587 <pathelement location="${applet.jre.tools}" />
588 <pathelement location="appletlib/${jmolJar}" />
589 <pathelement location="appletlib/${jsonSimple}" />
590 <pathelement location="appletlib/${javaJson}" />
592 <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
595 <injar file="in.jar" />
596 <outjar file="${jalviewLiteJar}" />
597 <libraryjar refid="obfuscateDeps.path" />
599 <keep access="public" type="class" name="jalview.bin.JalviewLite">
600 <field access="public" />
601 <method access="public" />
602 <constructor access="public" />
604 <keep access="public" type="class" name="jalview.appletgui.AlignFrame">
605 <field access="public" />
606 <method access="public" />
607 <constructor access="public" />
609 <!-- -libraryjars "${obfuscateDeps}"
611 -outjars jalviewApplet.jar
612 -keep public class jalview.bin.JalviewLite
615 <delete file="in.jar" />
618 <target name="castorbinding" depends="init" description="Generate Java bindings to supported Jalview XML models.">
619 <taskdef name="castor-srcgen" classname="org.castor.anttask.CastorCodeGenTask" classpathref="build.classpath" />
621 <fileset dir="${sourceDir}/jalview/schemabinding/version2">
622 <include name="*.java" />
623 <include name="descriptors/*.java" />
626 <castor-srcgen file="${schemaDir}/vamsas.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
627 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
628 <castor-srcgen file="${schemaDir}/JalviewWsParamSet.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
629 <castor-srcgen file="${schemaDir}/jalview.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
631 now build the jalview.binding package with the old schema set
634 <fileset dir="${sourceDir}/jalview/binding/">
635 <include name="**" />
638 <castor-srcgen file="${schemaDir}/vamsasJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
639 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
640 <castor-srcgen file="${schemaDir}/jalviewJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
642 <target name="sourcedist" description="create jalview source distribution" depends="init">
643 <delete file="${source.dist.name}" />
644 <tar destfile="${source.dist.name}" compression="gzip">
645 <tarfileset dir="./" prefix="jalview" preserveLeadingSlashes="true">
646 <include name="LICENSE" />
647 <include name="README" />
648 <include name="build.xml" />
649 <include name="jalview-jalopy.xml" />
650 <include name="JalviewApplet.jpx" />
651 <include name="JalviewX.jpx" />
652 <include name="nbbuild.xml"/>
653 <include name="nbproject/genfiles.properties"/>
654 <include name="nbproject/project.properties"/>
655 <include name="nbproject/project.xml"/>
656 <include name="${sourceDir}/*.java" />
657 <include name="${sourceDir}/**/*.java" />
658 <include name="${sourceDir}/**/*.cdr" />
659 <include name="${libDir}/**/*" />
660 <include name="${resourceDir}/**/*" />
661 <include name="${helpDir}/**/*" />
662 <include name="appletlib/${jmolJar}" />
663 <exclude name="**/*locales" />
664 <exclude name="*locales/**" />
665 <exclude name="utils/InstallAnywhere/**Build.iap_xml" />
666 <exclude name="utils/InstallAnywhere/**Build*/**" />
667 <exclude name="utils/InstallAnywhere/**Build*/**" />
668 <exclude name="utils/InstallAnywhere/**locale*" />
669 <exclude name="utils/InstallAnywhere/**locale*/**" />
670 <include name="${schemaDir}/**/*" />
671 <include name="utils/**/*" />
672 <include name="${docDir}/**/*" />
673 <include name="examples/**/*" />
677 <target name="pubapplet" description="installs the jalviewLite applet and dependent jars into an applet examples directory built under ${outputDir}" depends="makeApplet">
678 <copy todir="${packageDir}/examples">
679 <fileset dir="examples">
680 <include name="**/*"/>
681 <include name="javascript/*"/>
682 <include name="jmol/*"/>
685 <include name="${jalviewLiteJar}" />
687 <fileset dir="appletlib">
688 <include name="**/*"/>
691 <jar update="true" index="true" jarfile="${packageDir}/examples/${jalviewLiteJar}"/>
692 <jar update="true" index="true" jarfile="${packageDir}/examples/${javaJson}"/>
693 <jar update="true" index="true" jarfile="${packageDir}/examples/${jsonSimple}"/>
694 <jar update="true" index="true" jarfile="${packageDir}/examples/${jmolJar}">
696 <attribute name="Application-Name" value="Jmol (bundled with JalviewLite)"/>
697 <!-- <attribute name="Permissions" value="sandbox" /> -->
698 <!--<attribute name="Trusted-Lib" value="true" /> -->
699 <attribute name="Codebase" value="${applet.codebase}"/>
700 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}"/>
703 <signjar sigalg="SHA1WithRSA" storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
704 <fileset dir="${packageDir}/examples">
705 <include name="*.jar" />
708 <presetdef name="ap_applet.jar">
709 <!-- build a signed applet with 'all-permissions' -
710 Needs 'param name="permissions' value="all-permissions"' in applet tag
711 JalviewLite+JmolApplet linked sequence/structure fails
712 Mixed code warnings are raised
714 <jar update="true" index="true">
716 <attribute name="Application-Name" value="JalviewLite" />
717 <attribute name="Permissions" value="all-permissions" />
718 <attribute name="Codebase" value="${applet.codebase}" />
719 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
720 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
724 <presetdef name="applet.jar">
725 <!-- build signed applet with sandbox permissions -
726 Needs 'param name="permissions' value="sandbox"' in applet tag
727 Preserves Pre-Java 1.7_u45 behavior once 'permissions' parameter added to applet tag
730 <jar update="true" index="true">
732 <attribute name="Application-Name" value="JalviewLite" />
733 <attribute name="Permissions" value="sandbox" />
734 <attribute name="Codebase" value="${applet.codebase}" />
735 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
736 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
740 <presetdef name="tl_applet.jar">
741 <!-- build signed applet with trusted library/trusted permissions -
742 Needs 'param name="permissions' value="all-permissions"' in applet tag
744 No mixed code warnings raised
745 Jmol/JalviewLite sequence/structure example doesn't link structures
746 Raises dialog asking user to allow page to control applet via LiveConnect javascript
750 <jar update="true" index="true">
752 <attribute name="Application-Name" value="JalviewLite" />
753 <attribute name="Permissions" value="all-permissions" />
754 <attribute name="Codebase" value="${applet.codebase}" />
755 <attribute name="Trusted-Only" value="true" />
756 <attribute name="Trusted-Library" value="true" />
760 <presetdef name="to_applet.jar">
761 <!-- not fully test variant (yet) -->
762 <jar update="true" index="true">
764 <attribute name="Application-Name" value="JalviewLite" />
765 <attribute name="Permissions" value="all-permissions" />
766 <attribute name="Codebase" value="${applet.codebase}" />
767 <attribute name="Trusted-Only" value="true" />
771 <!-- create differently privileged artefacts -->
772 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/u_${jalviewLiteJar}" />
773 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true"/>
774 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/u_${javaJson}" overwrite="true"/>
775 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/u_${jsonSimple}" overwrite="true"/>
776 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/ap_${jalviewLiteJar}" />
777 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/ap_${jmolJar}"/>
778 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/ap_${javaJson}"/>
779 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/ap_${jsonSimple}"/>
780 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jalviewLiteJar}" />
781 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jmolJar}" />
782 <ap_applet.jar jarfile="${packageDir}/examples/ap_${javaJson}" />
783 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jsonSimple}" />
784 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/tl_${jalviewLiteJar}" />
785 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/tl_${jmolJar}" />
786 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/tl_${javaJson}" />
787 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/tl_${jsonSimple}" />
788 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jalviewLiteJar}" />
789 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jmolJar}" />
790 <tl_applet.jar jarfile="${packageDir}/examples/tl_${javaJson}" />
791 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jsonSimple}" />
792 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/to_${jalviewLiteJar}" />
793 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/to_${jmolJar}" />
794 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/to_${javaJson}" />
795 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/to_${jsonSimple}" />
796 <to_applet.jar jarfile="${packageDir}/examples/to_${jalviewLiteJar}" />
797 <to_applet.jar jarfile="${packageDir}/examples/to_${jmolJar}" />
798 <to_applet.jar jarfile="${packageDir}/examples/to_${javaJson}" />
799 <to_applet.jar jarfile="${packageDir}/examples/to_${jsonSimple}" />
800 <!-- finally, create manifest for original jars -->
801 <applet.jar jarfile="${packageDir}/examples/${jalviewLiteJar}" />
802 <applet.jar jarfile="${packageDir}/examples/${jmolJar}" />
803 <applet.jar jarfile="${packageDir}/examples/${javaJson}" />
804 <applet.jar jarfile="${packageDir}/examples/${jsonSimple}" />
806 <!-- todo - write examples/downloads for alternate versions of the applet -->
807 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
809 <fileset dir="${packageDir}/examples">
810 <exclude name="u_*.jar"/>
811 <include name="${jalviewLiteJar}" />
812 <include name="${jmolJar}" />
813 <include name="${javaJson}" />
814 <include name="${jsonSimple}" />
815 <include name="to_${jalviewLiteJar}" />
816 <include name="to_${jmolJar}" />
817 <include name="to_${javaJson}" />
818 <include name="to_${jsonSimple}" />
819 <include name="tl_${jalviewLiteJar}" />
820 <include name="tl_${jmolJar}" />
821 <include name="tl_${javaJson}" />
822 <include name="tl_${jsonSimple}" />
823 <include name="ap_${jalviewLiteJar}" />
824 <include name="ap_${jmolJar}" />
825 <include name="ap_${javaJson}" />
826 <include name="ap_${jsonSimple}" />
829 <!-- bizarre bug causes JmolApplet to always get signed, even if excluded from above. so copy explicitly -->
830 <copy file="appletlib/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true" />
831 <!-- finally, replace any launchApp servlet tags with a version specification -->
832 <replace value="http://www.jalview.org/services/launchApp?version=${JALVIEW_VERSION}"">
833 <replacetoken><![CDATA[http://www.jalview.org/services/launchApp"]]></replacetoken>
834 <fileset dir="${packageDir}/examples">
835 <include name="**/*.html"/>
838 <replace value="http://www.jalview.org/services/launchApp?version=${JALVIEW_VERSION}'">
839 <replacetoken><![CDATA[http://www.jalview.org/services/launchApp']]></replacetoken>
840 <fileset dir="${packageDir}/examples">
841 <include name="**/*.html"/>
846 <target name="sourcedoc" description="Create jalview source documentation pages" depends="init">
847 <javadoc destdir="${javadocDir}">
848 <packageset dir="${sourceDir}" includes="jalview/*,MCView/*">