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" />
22 <target name="usage" depends="init">
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. Add -Dtimestamp to timestamp signed jars"/>
31 <echo message=" See docs/building.html for more information." />
32 <echo message="compileApplet - compiles all necessary files for Applet" />
33 <echo message="makeApplet - compiles, then packages and obfuscates the Applet" />
34 <echo message="testng - run jalview's tests via testNG. Default group is '${testng-groups}'" />
35 <echo message=" you can specify particular test groups as a list via -Dtestng-groups=" />
36 <echo message="See docs/building.html and the comments in build file for other targets." />
37 <echo message="note: compile and makeApplet require the property java118.home to be set to point to a java 1.1.8 jdk." />
38 <echo message="Useful -D flags: -Ddonotobfuscate will prevent applet obfuscation" />
42 <!-- utils is a class path to additional utilities needed for
43 building docs, jars and webstart stuff -->
45 Userdefined build property defaults
47 wsdl.server list (plus namespace mapping info ???) - also want
48 ... to make this a dynamically generatable property
50 Build location - provide a temporary root for speed
51 jarsigner keystore and info
52 Jakarta and axis classpath ?
53 Default argument for starting Jalview (if it exists).
58 <path id="axis.classpath">
60 <fileset dir="/usr/local/axis/lib">
61 <include name="**/*.jar" />
63 <fileset dir="/usr/local/jakarta-tomcat-5/webapps/axis/WEB-INF/lib">
64 <include name="**/*.jar"/>
65 <include name="*.jar"/>
69 <!-- Jalview Version String displayed by application on startup and used to check for updates -->
70 <property name="JALVIEW_VERSION" value="DEVELOPMENT" />
72 <property name="INSTALLATION" value="Source" />
74 <!-- 2.4 (VAMSAS)" -->
75 <!-- Include debugging information in javac true or false -->
76 <property name="javac.debug" value="true" />
78 <!-- JarSigner Key Store for Webstart Distribution -->
79 <property name="jalview.keystore" value="./keys/.keystore" />
80 <!-- Keystore Password -->
81 <property name="jalview.keystore.pass" value="alignmentisfun" />
83 <property name="jalview.key" value="jalview" />
85 <property name="jalview.key.pass" value="alignmentisfun" />
86 <!-- time stamp server URL -->
87 <property name="jalview.tsaurl" value="" />
89 <property name="testng-groups" value="Functional" />
91 <!-- Don't change anything below here unless you know what you are doing! -->
92 <!-- Url path for WebStart in JNLP file -->
93 <property name="WebStartLocation" value="http://www.jalview.org/webstart" />
94 <!-- Webstart Image - looked for in resources/images -->
95 <property name="WebStartImage" value="JalviewLogo_big.png" />
96 <!-- J2SE version needed for webstart launch -->
97 <!-- Anne's version needs 1.7 - should rebuild VARNA to java 1.6 for release -->
98 <property name="j2sev" value="1.7+" />
99 <!-- Java Compilation settings - source and target javac version -->
100 <property name="javac.source" value="1.7" />
101 <property name="javac.target" value="1.7" />
103 <!-- Permissions for running Java applets and applications. -->
104 <!-- Defaults are those suitable for deploying jalview webstart www.jalview.org -->
105 <property name="application.codebase" value="*.jalview.org" />
106 <!-- and allowing the applet to be deployed from any URL -->
107 <!-- 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 -->
108 <property name="applet.codebase" value="*.jalview.org *.dundee.ac.uk *" />
109 <property name="applet.caller-codebase" value="${applet.codebase}" />
111 <!-- build directory configuration -->
112 <property name="libDir" value="lib" />
113 <property name="resourceDir" value="resources" />
114 <property name="helpDir" value="help" />
115 <property name="docDir" value="doc" />
116 <property name="sourceDir" value="src" />
117 <property name="schemaDir" value="schemas" />
118 <property name="outputDir" value="classes" />
119 <property name="packageDir" value="dist" />
120 <property name="outputJar" value="jalview.jar" />
121 <!-- Jalview Applet JMol Jar Dependency -->
122 <property name="jmolJar" value="JmolApplet-14.2.14_2015.06.11.jar" />
123 <property name="varnaJar" value="VARNAv3-93.jar" />
124 <property name="jsoup" value="jsoup-1.8.1.jar" />
125 <property name="jsonSimple" value="json_simple-1.1.jar" />
126 <property name="javaJson" value="java-json.jar" />
127 <property name="jalviewLiteJar" value="jalviewApplet.jar" />
128 <property name="reportDir" value="test-reports" />
129 <property name="testDir" value="test" />
130 <property name="testOutputDir" value="tests" />
131 <!-- switch to indicate if we should obfuscate jalviewLite -->
132 <!-- <property name="donotobfuscate" value="true"/> -->
133 <!-- switch to exclude associations from generated jnlp files -->
134 <!-- <property name="nojnlpfileassocs" value="true"/> -->
136 <!-- Jalview Web Service Clients - see the comments in 'buildextclients' for details -->
137 <property name="wsdl.File" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred?wsdl" />
138 <property name="wsdl.Files" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/vamsas?wsdlFiles" />
139 <property name="wsdl.MsaWS" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/MuscleWS?wsdl" />
140 <property name="wsdl.MsaWS2" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/ClustalWS?wsdl" />
141 <property name="WSInterf" value="MsaWS" />
142 <property name="wsdl.Namespace" value="vamsas" />
143 <property name="wsdl.ClientNS" value="ext.vamsas" />
144 <!-- the class path for building the application -->
145 <path id="build.classpath">
146 <fileset dir="utils">
147 <include name="*.jar" />
148 <include name="**/*.jar" />
150 <fileset dir="${libDir}">
151 <include name="*.jar" />
152 <include name="**/*.jar" />
154 <fileset dir="${java.home}/lib">
155 <include name="plugin.jar" />
157 <fileset dir="appletlib">
158 <!-- the JmolApplet includes the JmolApplet console and the application javac seems to always try and build all packages
160 <include name="${jmolJar}" />
161 <include name="${varnaJar}" />
164 <path id="test.classpath">
165 <pathelement path="${outputDir}" />
166 <path refid="build.classpath" />
168 <property name="source.dist.name" value="${basedir}/jalview-src.tar.gz" />
169 <!-- The Location of the java 1.1.8 jdk -->
170 <!--<property name="java118.home" value="C:\Sun\jdk1.1.8" /> -->
171 <property name="java118.home" value="${java.home}" />
172 <!-- <property name="applet.jre.tools" value="${java118.home}/lib/classes.zip" />
174 <!-- jre for 1.4 version -->
175 <property name="applet.jre.tools" value="${java.home}/lib/rt.jar" />
177 <!-- the classpath for building the 1.1 applet -->
178 <path id="jalviewlite.deps">
179 <fileset dir="${java118.home}">
180 <include name="lib/classes.zip" />
182 <fileset dir="${java.home}/lib">
183 <include name="plugin.jar" />
185 <pathelement location="appletlib/${jmolJar}" />
186 <pathelement location="lib/${varnaJar}" />
187 <pathelement location="lib/${jsoup}" />
188 <pathelement location="lib/${jsonSimple}" />
189 <pathelement location="lib/${javaJson}" />
192 <!-- default location for outputting javadoc -->
193 <property name="javadocDir" value="${packageDir}/javadoc" />
197 <taskdef classpath="utils/roxes-ant-tasks-1.2-2004-01-30.jar" resource="com/roxes/tools/ant/taskdefs.properties" />
198 <target name="buildPropertiesFile" depends="init">
199 <tstamp prefix="build">
200 <format property="date" pattern="dd MMMM yyyy" />
202 <exec executable="/usr/bin/git" outputproperty="git.commit" failifexecutionfails="false">
203 <arg value="rev-parse" />
204 <arg value="--short" />
207 <exec executable="/usr/bin/git" outputproperty="git.branch" failifexecutionfails="false">
208 <arg value="rev-parse" />
209 <arg value="--abbrev-ref" />
212 <properties file="${outputDir}/.build_properties">
214 ---Jalview Build Details---
216 <property name="VERSION" value="${JALVIEW_VERSION}" />
217 <property name="INSTALLATION" value="${INSTALLATION} git-commit:${git.commit} [${git.branch}]" />
218 <property name="BUILD_DATE" value="${build.date}" />
223 <target name="clean" depends="init">
224 <!-- not efficient yet. -->
225 <delete dir="${outputDir}" includes="*,**/*" />
228 <target name="distclean" depends="init, clean">
230 <echo message="REMOVING ALL BACKUP/AUTOSAVES!" />
233 <include name="${outputJar}" />
234 <include name="#*#" />
235 <include name="#*.*#" />
236 <include name="**/#*#" />
237 <include name="**/#*.*#" />
238 <include name="*~" />
239 <include name="*.*~" />
240 <include name="**/*~" />
241 <include name="**/*.*~" />
246 <target name="prepare" depends="init">
247 <mkdir dir="${outputDir}" />
248 <copy todir="${outputDir}">
250 <include name="${docDir}/**/*.*" />
251 <include name="${helpDir}/**/*.*" />
252 <include name="${libDir}/*.jar" />
254 <fileset dir="${resourceDir}">
255 <include name="**/*.*" />
260 <target name="build" depends="prepare">
261 <!-- not efficient yet. -->
262 <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="build.classpath">
263 <exclude name="jalview/*applet*" />
264 <exclude name="jalview/appletgui/**" />
265 <exclude name="com/stevesoft/**" />
270 <target name="testclean" depends="init">
271 <delete dir="${testOutputDir}" includes="*,**/*" />
274 <target name="prepareTests" depends="init,testclean">
275 <mkdir dir="${testOutputDir}" />
278 <target name="buildTests" depends="build,buildindices,prepareTests">
279 <javac source="${javac.source}" target="${javac.target}" srcdir="${testDir}" destdir="${testOutputDir}" debug="${javac.debug}" classpathref="test.classpath" includeantruntime="false">
283 <taskdef resource="testngtasks" classpath="utils/testnglibs/testng.jar" />
285 <target name="testng" depends="buildTests">
286 <testng outputDir="${reportDir}" haltOnFailure="false" groups="${testng-groups}" mode="testng"
289 <pathelement location="${testOutputDir}" />
290 <path refid="test.classpath" />
292 <classfileset dir="${testOutputDir}" includes="**/*.class" />
296 <target name="buildindices" depends="init, prepare" unless="help.uptodate">
297 <java classname="com.sun.java.help.search.Indexer" classpathref="build.classpath" fork="true" dir="${outputDir}/${helpDir}">
302 <target name="preparejnlp" depends="makedist">
303 <copy todir="${packageDir}">
304 <fileset dir="${resourceDir}/images">
305 <include name="${WebStartImage}" />
309 <taskdef classpathref="build.classpath" resource="com/roxes/tools/ant/taskdefs.properties" />
311 <!-- create a dummy jar which will eventually contain the jnlp template -->
312 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
313 <fileset dir="${packageDir}">
314 <include name="jalview.jar" />
318 <mkdir dir="${packageDir}/JNLP-INF" />
319 <antcall target="writejnlpf">
320 <param name="jnlpFile" value="${packageDir}/JNLP-INF/APPLICATION-TEMPLATE.JNLP" />
321 <param name="inih" value="*" />
322 <param name="maxh" value="*" />
325 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
326 <fileset dir="${packageDir}">
327 <include name="JNLP-INF/APPLICATION-TEMPLATE.JNLP" />
331 <antcall target="writejnlpf">
332 <param name="jnlpFile" value="${packageDir}/jalview.jnlp" />
333 <param name="inih" value="10M" />
334 <param name="maxh" value="256M" />
337 <antcall target="writejnlpf">
338 <param name="jnlpFile" value="${packageDir}/jalview_1G.jnlp" />
339 <param name="inih" value="128M" />
340 <param name="maxh" value="512M" />
343 <antcall target="writejnlpf">
344 <param name="jnlpFile" value="${packageDir}/jalview_2G.jnlp" />
345 <param name="inih" value="256M" />
346 <param name="maxh" value="1024M" />
349 <!-- finally, need to postprocess to add in associations at end of 'information' element
351 <xslt in="${packageDir}/jalview_noa_1G.jnlp" out="${packageDir}/jalview_1G.jnlp">
358 <association mime-type="application-x/ext-file" extensions="fa"/>
359 <association mime-type="application-x/ext-file" extensions="fasta"/>
360 <association mime-type="application-x/ext-file" extensions="mfa"/>
361 <association mime-type="application-x/ext-file" extensions="fastq"/>
362 <association mime-type="application-x/ext-file" extensions="blc"/>
363 <association mime-type="application-x/ext-file" extensions="msf"/>
364 <association mime-type="application-x/ext-file" extensions="pfam"/>
365 <association mime-type="application-x/ext-file" extensions="aln"/>
366 <association mime-type="application-x/ext-file" extensions="pir"/>
367 <association mime-type="application-x/ext-file" extensions="amsa"/>
368 <association mime-type="application-x/ext-file" extensions="stk"/>
369 <association mime-type="application-x/ext-file" extensions="jar"/>-->
372 <target name="-jarsignwithtsa" depends="preparejnlp" if="timestamp">
373 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false" sigalg="SHA1withRSA"
374 tsaurl="${jalview.tsaurl}">
375 <fileset dir="${packageDir}">
376 <include name="*.jar" />
380 <target name="-jarsignnotsa" depends="preparejnlp" unless="timestamp">
381 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false" sigalg="SHA1withRSA">
382 <fileset dir="${packageDir}">
383 <include name="*.jar" />
388 <target name="makefulldist" depends="-jarsignwithtsa,-jarsignnotsa">
389 <!-- and sign the jars -->
390 <!-- the default keystore details might need to be edited here -->
393 <target name="runenv" depends="init">
394 <path id="run.classpath">
395 <pathelement location="${outputDir}" />
396 <fileset dir="${outputDir}">
397 <include name="${libDir}/*.jar" />
400 <pathconvert targetos="unix" refid="run.classpath" property="run.classpath" />
402 <echo>java -classpath ${run.classpath} jalview.bin.Jalview
406 <target name="-generatejnlpf">
407 <presetdef name="jnlpf">
408 <jnlp codebase="${WebStartLocation}">
410 <title>Jalview</title>
411 <vendor>The Barton Group</vendor>
412 <homepage href="http://www.jalview.org" />
413 <description>Jalview Multiple Alignment Editor</description>
414 <description kind="short">Jalview</description>
415 <icon href="${WebStartImage}" />
419 <j2se version="${j2sev}" initial_heap_size="${inih}" max_heap_size="${maxh}" />
420 <fileset dir="${packageDir}">
421 <include name="jalview.jar" />
423 <fileset dir="${packageDir}">
424 <include name="*.jar" />
425 <include name="*_*.jar" />
426 <exclude name="jalview.jar" />
427 <exclude name="*jnilib.jar" />
430 <resources os="Mac OS X">
431 <property name="jalview.version" value="${JALVIEW_VERSION}" />
432 <fileset dir="${packageDir}">
433 <include name="*quaqua*.jnilib.jar" />
437 <application_desc main_class="jalview.bin.Jalview">
445 <jnlpf toFile="${jnlpFile}" />
449 <target name="-dofakejnlpfileassoc" depends="-generatejnlpf" if="nojnlpfileassocs">
450 <echo message="Not adding JNLP File Associations" />
453 <target name="-dojnlpfileassoc" depends="-generatejnlpf" unless="nojnlpfileassocs">
454 <replace file="${jnlpFile}">
456 <![CDATA[</information>]]></replacetoken>
459 <association mime-type="application-x/ext-file" extensions="fa" />
460 <association mime-type="application-x/ext-file" extensions="fasta" />
461 <association mime-type="application-x/ext-file" extensions="mfa" />
462 <association mime-type="application-x/ext-file" extensions="fastq" />
463 <association mime-type="application-x/ext-file" extensions="blc" />
464 <association mime-type="application-x/ext-file" extensions="msf" />
465 <association mime-type="application-x/ext-file" extensions="pfam" />
466 <association mime-type="application-x/ext-file" extensions="aln"/>
467 <association mime-type="application-x/ext-file" extensions="pir"/>
468 <association mime-type="application-x/ext-file" extensions="amsa"/>
469 <association mime-type="application-x/ext-file" extensions="stk"/>
470 <association mime-type="application-x/ext-file" extensions="jvp"/>
471 </information>]]></replacevalue>
473 <echo message="Added file associations to JNLP file" />
475 <target name="writejnlpf" depends="-dojnlpfileassoc,-dofakejnlpfileassoc">
478 <target name="buildextclients" depends="init">
479 <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" />
480 <condition property="dontextbuild">
481 <equals arg1="n" arg2="${doextbuild.response}" />
483 <condition property="dontextbuild">
484 <equals arg1="N" arg2="${doextbuild.response}" />
486 <fail if="dontextbuild">
487 Build External Client Code process aborted by user. Jalview source is unchanged.
489 <!-- Currently, this doesn't happen automatically.
490 1. Run WSDL2Java as below, which generates an ext.vamsas +
491 vamsas.<datapackages> fileset.
492 2. refactor ext.vamsas.SpecificserviceWS* to
493 ext.vamsas.ServiceclassWS* that implements the ServiceclassWSI interface.
494 3. Update the jalview.ws.*WServices classes to reflect the
495 interface type, and all locations of this wsdl type that Jalview
499 <path id="axisbuild">
500 <path refid="build.classpath" />
502 <taskdef resource="axis-tasks.properties" classpathref="axisbuild" />
504 <fileset dir="${sourceDir}" id="client">
505 <include name="${wsdl.ClientNS}/*.*" />
509 <axis-wsdl2java output="${sourceDir}" verbose="true" url="${wsdl.MsaWS2}" serverside="false" deployscope="Request" debug="false" helpergen="true" all="true">
511 <mapping namespace="${wsdl.Namespace}" package="${wsdl.ClientNS}" />
512 <mapping namespace="http://dataTypes.vamsas" package="${wsdl.ClientNS}" />
517 <target name="makedist" depends="build, buildPropertiesFile, buildindices">
518 <!-- make the package jar if not already existing -->
519 <mkdir dir="${packageDir}" />
520 <!-- clean dir if it already existed -->
522 <fileset dir="${packageDir}">
523 <include name="*.jar" />
526 <jar destfile="${packageDir}/${outputJar}" index="true">
528 <attribute name="Main-Class" value="jalview.bin.Jalview" />
529 <attribute name="Permissions" value="all-permissions" />
530 <attribute name="Application-Name" value="Jalview Desktop" />
531 <attribute name="Codebase" value="${application.codebase}" />
533 <fileset dir="${outputDir}/">
534 <exclude name="cache*/**" />
535 <exclude name="*.jar" />
536 <exclude name="*.jar.*" />
537 <exclude name="**/*.jar" />
538 <exclude name="**/*.jar.*" />
542 <copy toDir="${packageDir}" flatten="true">
543 <fileset dir="${outputDir}">
544 <include name="*.jar" />
545 <include name="**/*.jar" />
551 <!-- jalopy code reformatter -->
552 <target name="sourcescrub" depends="init,build">
553 <jalopy destdir="jsrc" classpathref="run.classpath" convention="jalview-jalopy.xml">
554 <fileset dir="${sourceDir}">
555 <include name="*.java" />
556 <include name="**/*.java" />
557 <include name="**/**/*.java" />
564 <!-- Compile, package and obfuscate Jalview Applet -->
565 <target name="makeApplet" depends="obfuscate" description="assemble the final jalviewLite applet jar with or without obfuscation" />
567 <target name="compileApplet" depends="init,clean">
568 <mkdir dir="${outputDir}" />
569 <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="jalviewlite.deps" includes="jalview/appletgui/**" excludes="ext/**,gui/**,jbgui/**,MCview/**,org/**,vamsas/**,jalview/ext/rbvi/**,jalview/ext/paradise/**" />
572 <target name="packageApplet" depends="compileApplet, buildPropertiesFile">
573 <copy file="${resourceDir}/images/idwidth.gif" toFile="${outputDir}/images/idwidth.gif" />
574 <copy file="${resourceDir}/images/link.gif" toFile="${outputDir}/images/link.gif" />
575 <copy todir="${outputDir}/lang">
576 <fileset dir="${resourceDir}/lang">
577 <include name="**.*" />
580 <jar destfile="in.jar" index="true">
582 <attribute name="Main-Class" value="jalview.bin.JalviewLite" />
583 <attribute name="Application-Name" value="JalviewLite" />
584 <attribute name="Codebase" value="${applet.codebase}" />
586 <fileset dir="${outputDir}">
587 <include name="com/**" />
588 <include name="MCview/**" />
589 <include name="jalview/**" />
590 <include name=".build_properties" />
591 <include name="images/idwidth.gif" />
592 <include name="images/link.gif" />
593 <include name="lang/**" />
597 <target name="obfuscate" depends="-obfuscatefake,-obfuscatereally">
599 <target name="-obfuscatefake" depends="packageApplet" if="donotobfuscate">
600 <copy file="in.jar" tofile="${jalviewLiteJar}" overwrite="true" />
601 <delete file="in.jar" />
603 <target name="-obfuscatereally" unless="donotobfuscate">
605 <path id="obfuscateDeps.path">
606 <pathelement location="${applet.jre.tools}" />
607 <pathelement location="appletlib/${jmolJar}" />
608 <pathelement location="appletlib/${jsonSimple}" />
609 <pathelement location="appletlib/${javaJson}" />
611 <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
614 <injar file="in.jar" />
615 <outjar file="${jalviewLiteJar}" />
616 <libraryjar refid="obfuscateDeps.path" />
618 <keep access="public" type="class" name="jalview.bin.JalviewLite">
619 <field access="public" />
620 <method access="public" />
621 <constructor access="public" />
623 <keep access="public" type="class" name="jalview.appletgui.AlignFrame">
624 <field access="public" />
625 <method access="public" />
626 <constructor access="public" />
628 <!-- -libraryjars "${obfuscateDeps}"
630 -outjars jalviewApplet.jar
631 -keep public class jalview.bin.JalviewLite
634 <delete file="in.jar" />
637 <target name="castorbinding" depends="init" description="Generate Java bindings to supported Jalview XML models.">
638 <taskdef name="castor-srcgen" classname="org.castor.anttask.CastorCodeGenTask" classpathref="build.classpath" />
640 <fileset dir="${sourceDir}/jalview/schemabinding/version2">
641 <include name="*.java" />
642 <include name="descriptors/*.java" />
645 <castor-srcgen file="${schemaDir}/vamsas.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
646 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
647 <castor-srcgen file="${schemaDir}/JalviewWsParamSet.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
648 <castor-srcgen file="${schemaDir}/jalview.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
650 now build the jalview.binding package with the old schema set
653 <fileset dir="${sourceDir}/jalview/binding/">
654 <include name="**" />
657 <castor-srcgen file="${schemaDir}/vamsasJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
658 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
659 <castor-srcgen file="${schemaDir}/jalviewJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
661 <target name="sourcedist" description="create jalview source distribution" depends="init">
662 <delete file="${source.dist.name}" />
663 <tar destfile="${source.dist.name}" compression="gzip">
664 <tarfileset dir="./" prefix="jalview" preserveLeadingSlashes="true">
665 <include name="LICENSE" />
666 <include name="README" />
667 <include name="build.xml" />
668 <include name="jalview-jalopy.xml" />
669 <include name="JalviewApplet.jpx" />
670 <include name="JalviewX.jpx" />
671 <include name="nbbuild.xml" />
672 <include name="nbproject/genfiles.properties" />
673 <include name="nbproject/project.properties" />
674 <include name="nbproject/project.xml" />
675 <include name="${sourceDir}/*.java" />
676 <include name="${sourceDir}/**/*.java" />
677 <include name="${sourceDir}/**/*.cdr" />
678 <include name="${libDir}/**/*" />
679 <include name="${resourceDir}/**/*" />
680 <include name="${helpDir}/**/*" />
681 <include name="appletlib/${jmolJar}" />
682 <exclude name="**/*locales" />
683 <exclude name="*locales/**" />
684 <exclude name="utils/InstallAnywhere/**Build.iap_xml" />
685 <exclude name="utils/InstallAnywhere/**Build*/**" />
686 <exclude name="utils/InstallAnywhere/**Build*/**" />
687 <exclude name="utils/InstallAnywhere/**locale*" />
688 <exclude name="utils/InstallAnywhere/**locale*/**" />
689 <include name="${schemaDir}/**/*" />
690 <include name="utils/**/*" />
691 <include name="${docDir}/**/*" />
692 <include name="examples/**/*" />
696 <target name="pubapplet" description="installs the jalviewLite applet and dependent jars into an applet examples directory built under ${outputDir}" depends="makeApplet">
697 <copy todir="${packageDir}/examples">
698 <fileset dir="examples">
699 <include name="**/*" />
700 <include name="javascript/*" />
701 <include name="jmol/*" />
704 <include name="${jalviewLiteJar}" />
706 <fileset dir="appletlib">
707 <include name="**/*" />
710 <jar update="true" index="true" jarfile="${packageDir}/examples/${jalviewLiteJar}" />
711 <jar update="true" index="true" jarfile="${packageDir}/examples/${javaJson}" />
712 <jar update="true" index="true" jarfile="${packageDir}/examples/${jsonSimple}" />
713 <jar update="true" index="true" jarfile="${packageDir}/examples/${jmolJar}">
715 <attribute name="Application-Name" value="Jmol (bundled with JalviewLite)" />
716 <!-- <attribute name="Permissions" value="sandbox" /> -->
717 <!--<attribute name="Trusted-Lib" value="true" /> -->
718 <attribute name="Codebase" value="${applet.codebase}" />
719 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
722 <signjar sigalg="SHA1WithRSA" storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
723 <fileset dir="${packageDir}/examples">
724 <include name="*.jar" />
727 <presetdef name="ap_applet.jar">
728 <!-- build a signed applet with 'all-permissions' -
729 Needs 'param name="permissions' value="all-permissions"' in applet tag
730 JalviewLite+JmolApplet linked sequence/structure fails
731 Mixed code warnings are raised
733 <jar update="true" index="true">
735 <attribute name="Application-Name" value="JalviewLite" />
736 <attribute name="Permissions" value="all-permissions" />
737 <attribute name="Codebase" value="${applet.codebase}" />
738 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
739 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
743 <presetdef name="applet.jar">
744 <!-- build signed applet with sandbox permissions -
745 Needs 'param name="permissions' value="sandbox"' in applet tag
746 Preserves Pre-Java 1.7_u45 behavior once 'permissions' parameter added to applet tag
749 <jar update="true" index="true">
751 <attribute name="Application-Name" value="JalviewLite" />
752 <attribute name="Permissions" value="sandbox" />
753 <attribute name="Codebase" value="${applet.codebase}" />
754 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
755 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
759 <presetdef name="tl_applet.jar">
760 <!-- build signed applet with trusted library/trusted permissions -
761 Needs 'param name="permissions' value="all-permissions"' in applet tag
763 No mixed code warnings raised
764 Jmol/JalviewLite sequence/structure example doesn't link structures
765 Raises dialog asking user to allow page to control applet via LiveConnect javascript
769 <jar update="true" index="true">
771 <attribute name="Application-Name" value="JalviewLite" />
772 <attribute name="Permissions" value="all-permissions" />
773 <attribute name="Codebase" value="${applet.codebase}" />
774 <attribute name="Trusted-Only" value="true" />
775 <attribute name="Trusted-Library" value="true" />
779 <presetdef name="to_applet.jar">
780 <!-- not fully test variant (yet) -->
781 <jar update="true" index="true">
783 <attribute name="Application-Name" value="JalviewLite" />
784 <attribute name="Permissions" value="all-permissions" />
785 <attribute name="Codebase" value="${applet.codebase}" />
786 <attribute name="Trusted-Only" value="true" />
790 <!-- create differently privileged artefacts -->
791 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/u_${jalviewLiteJar}" />
792 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true" />
793 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/u_${javaJson}" overwrite="true" />
794 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/u_${jsonSimple}" overwrite="true" />
795 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/ap_${jalviewLiteJar}" />
796 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/ap_${jmolJar}" />
797 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/ap_${javaJson}" />
798 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/ap_${jsonSimple}" />
799 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jalviewLiteJar}" />
800 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jmolJar}" />
801 <ap_applet.jar jarfile="${packageDir}/examples/ap_${javaJson}" />
802 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jsonSimple}" />
803 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/tl_${jalviewLiteJar}" />
804 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/tl_${jmolJar}" />
805 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/tl_${javaJson}" />
806 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/tl_${jsonSimple}" />
807 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jalviewLiteJar}" />
808 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jmolJar}" />
809 <tl_applet.jar jarfile="${packageDir}/examples/tl_${javaJson}" />
810 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jsonSimple}" />
811 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/to_${jalviewLiteJar}" />
812 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/to_${jmolJar}" />
813 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/to_${javaJson}" />
814 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/to_${jsonSimple}" />
815 <to_applet.jar jarfile="${packageDir}/examples/to_${jalviewLiteJar}" />
816 <to_applet.jar jarfile="${packageDir}/examples/to_${jmolJar}" />
817 <to_applet.jar jarfile="${packageDir}/examples/to_${javaJson}" />
818 <to_applet.jar jarfile="${packageDir}/examples/to_${jsonSimple}" />
819 <!-- finally, create manifest for original jars -->
820 <applet.jar jarfile="${packageDir}/examples/${jalviewLiteJar}" />
821 <applet.jar jarfile="${packageDir}/examples/${jmolJar}" />
822 <applet.jar jarfile="${packageDir}/examples/${javaJson}" />
823 <applet.jar jarfile="${packageDir}/examples/${jsonSimple}" />
825 <!-- todo - write examples/downloads for alternate versions of the applet -->
826 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
828 <fileset dir="${packageDir}/examples">
829 <exclude name="u_*.jar" />
830 <include name="${jalviewLiteJar}" />
831 <include name="${jmolJar}" />
832 <include name="${javaJson}" />
833 <include name="${jsonSimple}" />
834 <include name="to_${jalviewLiteJar}" />
835 <include name="to_${jmolJar}" />
836 <include name="to_${javaJson}" />
837 <include name="to_${jsonSimple}" />
838 <include name="tl_${jalviewLiteJar}" />
839 <include name="tl_${jmolJar}" />
840 <include name="tl_${javaJson}" />
841 <include name="tl_${jsonSimple}" />
842 <include name="ap_${jalviewLiteJar}" />
843 <include name="ap_${jmolJar}" />
844 <include name="ap_${javaJson}" />
845 <include name="ap_${jsonSimple}" />
848 <!-- bizarre bug causes JmolApplet to always get signed, even if excluded from above. so copy explicitly -->
849 <copy file="appletlib/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true" />
850 <!-- finally, replace any launchApp servlet tags with a version specification -->
851 <replace value="http://www.jalview.org/services/launchApp?version=${JALVIEW_VERSION}"">
853 <![CDATA[http://www.jalview.org/services/launchApp"]]>
855 <fileset dir="${packageDir}/examples">
856 <include name="**/*.html" />
859 <replace value="http://www.jalview.org/services/launchApp?version=${JALVIEW_VERSION}'">
861 <![CDATA[http://www.jalview.org/services/launchApp']]>
863 <fileset dir="${packageDir}/examples">
864 <include name="**/*.html" />
869 <target name="sourcedoc" description="Create jalview source documentation pages" depends="init">
870 <javadoc destdir="${javadocDir}">
871 <packageset dir="${sourceDir}" includes="jalview/*,MCView/*">