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 <property name="testng-groups" value="Functional"/>
86 <!-- Don't change anything below here unless you know what you are doing! -->
87 <!-- Url path for WebStart in JNLP file -->
88 <property name="WebStartLocation" value="http://www.jalview.org/webstart" />
89 <!-- Webstart Image - looked for in resources/images -->
90 <property name="WebStartImage" value="JalviewLogo_big.png"/>
91 <!-- J2SE version needed for webstart launch -->
92 <!-- Anne's version needs 1.7 - should rebuild VARNA to java 1.6 for release -->
93 <property name="j2sev" value="1.7+"/>
94 <!-- Java Compilation settings - source and target javac version -->
95 <property name="javac.source" value="1.7"/>
96 <property name="javac.target" value="1.7"/>
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 <!-- 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 -->
103 <property name="applet.codebase" value="*.jalview.org *.dundee.ac.uk *" />
104 <property name="applet.caller-codebase" value="${applet.codebase}" />
106 <!-- build directory configuration -->
107 <property name="libDir" value="lib" />
108 <property name="resourceDir" value="resources" />
109 <property name="helpDir" value="help" />
110 <property name="docDir" value="doc" />
111 <property name="sourceDir" value="src" />
112 <property name="schemaDir" value="schemas" />
113 <property name="outputDir" value="classes" />
114 <property name="packageDir" value="dist" />
115 <property name="outputJar" value="jalview.jar" />
116 <!-- Jalview Applet JMol Jar Dependency -->
117 <property name="jmolJar" value="JmolApplet-14.2.14_2015.06.11.jar" />
118 <property name="varnaJar" value="VARNAv3-93.jar" />
119 <property name="jsoup" value="jsoup-1.8.1.jar" />
120 <property name="jsonSimple" value="json_simple-1.1.jar" />
121 <property name="javaJson" value="java-json.jar" />
122 <property name="jalviewLiteJar" value="jalviewApplet.jar" />
123 <property name="reportDir" value="test-reports" />
124 <property name="testDir" value="test" />
125 <property name="testOutputDir" value="tests" />
126 <!-- switch to indicate if we should obfuscate jalviewLite -->
127 <!-- <property name="donotobfuscate" value="true"/> -->
128 <!-- switch to exclude associations from generated jnlp files -->
129 <!-- <property name="nojnlpfileassocs" value="true"/> -->
131 <!-- Jalview Web Service Clients - see the comments in 'buildextclients' for details -->
132 <property name="wsdl.File" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred?wsdl" />
133 <property name="wsdl.Files" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/vamsas?wsdlFiles" />
134 <property name="wsdl.MsaWS" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/MuscleWS?wsdl" />
135 <property name="wsdl.MsaWS2" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/ClustalWS?wsdl" />
136 <property name="WSInterf" value="MsaWS" />
137 <property name="wsdl.Namespace" value="vamsas" />
138 <property name="wsdl.ClientNS" value="ext.vamsas" />
139 <!-- the class path for building the application -->
140 <path id="build.classpath">
141 <fileset dir="utils">
142 <include name="*.jar" />
143 <include name="**/*.jar" />
145 <fileset dir="${libDir}">
146 <include name="*.jar" />
147 <include name="**/*.jar" />
149 <fileset dir="${java.home}/lib">
150 <include name="plugin.jar"/>
152 <fileset dir="appletlib">
153 <!-- the JmolApplet includes the JmolApplet console and the application javac seems to always try and build all packages
155 <include name="${jmolJar}" />
156 <include name="${varnaJar}" />
160 <property name="source.dist.name" value="${basedir}/jalview-src.tar.gz" />
161 <!-- The Location of the java 1.1.8 jdk -->
162 <!--<property name="java118.home" value="C:\Sun\jdk1.1.8" /> -->
163 <property name="java118.home" value="${java.home}" />
164 <!-- <property name="applet.jre.tools" value="${java118.home}/lib/classes.zip" />
166 <!-- jre for 1.4 version -->
167 <property name="applet.jre.tools" value="${java.home}/lib/rt.jar"/>
169 <!-- the classpath for building the 1.1 applet -->
170 <path id="jalviewlite.deps">
171 <fileset dir="${java118.home}">
172 <include name="lib/classes.zip" />
174 <fileset dir="${java.home}/lib">
175 <include name="plugin.jar"/>
177 <pathelement location="appletlib/${jmolJar}" />
178 <pathelement location="lib/${varnaJar}" />
179 <pathelement location="lib/${jsoup}" />
180 <pathelement location="lib/${jsonSimple}" />
181 <pathelement location="lib/${javaJson}" />
184 <!-- default location for outputting javadoc -->
185 <property name="javadocDir" value="${packageDir}/javadoc"/>
189 <taskdef classpath="utils/roxes-ant-tasks-1.2-2004-01-30.jar" resource="com/roxes/tools/ant/taskdefs.properties" />
190 <target name="buildPropertiesFile" depends="init">
191 <tstamp prefix="build">
192 <format property="date" pattern="dd MMMM yyyy" />
194 <exec executable="/usr/bin/git" outputproperty="git.commit" failifexecutionfails="false">
195 <arg value="rev-parse"/>
196 <arg value="--short"/>
199 <exec executable="/usr/bin/git" outputproperty="git.branch" failifexecutionfails="false">
200 <arg value="rev-parse"/>
201 <arg value="--abbrev-ref"/>
204 <properties file="${outputDir}/.build_properties">
206 ---Jalview Build Details---
208 <property name="VERSION" value="${JALVIEW_VERSION}" />
209 <property name="INSTALLATION" value="${INSTALLATION} git-commit:${git.commit} [${git.branch}]" />
210 <property name="BUILD_DATE" value="${build.date}" />
215 <target name="clean" depends="init">
216 <!-- not efficient yet. -->
217 <delete dir="${outputDir}" includes="*,**/*"/>
220 <target name="distclean" depends="init, clean">
222 <echo message="REMOVING ALL BACKUP/AUTOSAVES!" />
225 <include name="${outputJar}" />
226 <include name="#*#" />
227 <include name="#*.*#" />
228 <include name="**/#*#" />
229 <include name="**/#*.*#" />
230 <include name="*~" />
231 <include name="*.*~" />
232 <include name="**/*~" />
233 <include name="**/*.*~" />
238 <target name="prepare" depends="init">
239 <mkdir dir="${outputDir}" />
240 <copy todir="${outputDir}">
242 <include name="${docDir}/**/*.*" />
243 <include name="${helpDir}/**/*.*" />
244 <include name="${libDir}/*.jar" />
246 <fileset dir="${resourceDir}">
247 <include name="**/*.*" />
252 <target name="build" depends="prepare">
253 <!-- not efficient yet. -->
254 <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="build.classpath">
255 <exclude name="jalview/*applet*" />
256 <exclude name="jalview/appletgui/**" />
257 <exclude name="com/stevesoft/**" />
262 <target name="testclean" depends="init">
263 <delete dir="${testOutputDir}" includes="*,**/*"/>
266 <target name="prepareTests" depends="init">
267 <mkdir dir="${testOutputDir}" />
268 <copy todir="${testOutputDir}">
270 <include name="${docDir}/**/*.*" />
271 <include name="${helpDir}/**/*.*" />
272 <include name="${libDir}/*.jar" />
274 <fileset dir="${resourceDir}">
275 <include name="**/*.*" />
280 <target name="buildTests" depends="prepareTests">
281 <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${testOutputDir}"
282 debug="${javac.debug}" classpathref="build.classpath" includeantruntime="false" >
284 <javac source="${javac.source}" target="${javac.target}" srcdir="${testDir}" destdir="${testOutputDir}"
285 debug="${javac.debug}" classpathref="build.classpath" includeantruntime="false" >
289 <taskdef name="testng" classname="org.testng.TestNGAntTask" >
290 <classpath location="utils/testnglibs/testng.jar" />
293 <target name="testng" depends="buildTests">
294 <testng classpathref="build.classpath" outputDir="${reportDir}"
295 haltOnFailure="false">
296 <classpath location="${testOutputDir}" />
297 <xmlfileset dir="utils" includes="jalview_testng.xml" />
301 <target name="buildindices" depends="init, prepare" unless="help.uptodate">
302 <java classname="com.sun.java.help.search.Indexer" classpathref="build.classpath" fork="true" dir="${outputDir}/${helpDir}">
307 <target name="makefulldist" depends="makedist">
308 <copy todir="${packageDir}">
309 <fileset dir="${resourceDir}/images">
310 <include name="${WebStartImage}"/>
314 <taskdef classpathref="build.classpath" resource="com/roxes/tools/ant/taskdefs.properties" />
316 <!-- create a dummy jar which will eventually contain the jnlp template -->
317 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
318 <fileset dir="${packageDir}">
319 <include name="jalview.jar" />
323 <mkdir dir="${packageDir}/JNLP-INF"/>
324 <antcall target="writejnlpf">
325 <param name="jnlpFile" value="${packageDir}/JNLP-INF/APPLICATION-TEMPLATE.JNLP"/>
326 <param name="inih" value="*" />
327 <param name="maxh" value="*"/>
330 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
331 <fileset dir="${packageDir}">
332 <include name="JNLP-INF/APPLICATION-TEMPLATE.JNLP" />
336 <antcall target="writejnlpf">
337 <param name="jnlpFile" value="${packageDir}/jalview.jnlp"/>
338 <param name="inih" value="10M" />
339 <param name="maxh" value="256M"/>
342 <antcall target="writejnlpf">
343 <param name="jnlpFile" value="${packageDir}/jalview_1G.jnlp"/>
344 <param name="inih" value="128M" />
345 <param name="maxh" value="512M"/>
348 <antcall target="writejnlpf">
349 <param name="jnlpFile" value="${packageDir}/jalview_2G.jnlp"/>
350 <param name="inih" value="256M" />
351 <param name="maxh" value="1024M"/>
354 <!-- finally, need to postprocess to add in associations at end of 'information' element
356 <xslt in="${packageDir}/jalview_noa_1G.jnlp" out="${packageDir}/jalview_1G.jnlp">
363 <association mime-type="application-x/ext-file" extensions="fa"/>
364 <association mime-type="application-x/ext-file" extensions="fasta"/>
365 <association mime-type="application-x/ext-file" extensions="mfa"/>
366 <association mime-type="application-x/ext-file" extensions="fastq"/>
367 <association mime-type="application-x/ext-file" extensions="blc"/>
368 <association mime-type="application-x/ext-file" extensions="msf"/>
369 <association mime-type="application-x/ext-file" extensions="pfam"/>
370 <association mime-type="application-x/ext-file" extensions="aln"/>
371 <association mime-type="application-x/ext-file" extensions="pir"/>
372 <association mime-type="application-x/ext-file" extensions="amsa"/>
373 <association mime-type="application-x/ext-file" extensions="stk"/>
374 <association mime-type="application-x/ext-file" extensions="jar"/>-->
375 <!-- and sign the jars -->
376 <!-- the default keystore details might need to be edited here -->
377 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false" sigalg="SHA1withRSA">
378 <fileset dir="${packageDir}">
379 <include name="*.jar" />
384 <target name="runenv" depends="init">
385 <path id="run.classpath">
386 <pathelement location="${outputDir}" />
387 <fileset dir="${outputDir}">
388 <include name="${libDir}/*.jar" />
391 <pathconvert targetos="unix" refid="run.classpath" property="run.classpath" />
393 <echo>java -classpath ${run.classpath} jalview.bin.Jalview
397 <target name="-generatejnlpf">
398 <presetdef name="jnlpf">
399 <jnlp codebase="${WebStartLocation}">
401 <title>Jalview</title>
402 <vendor>The Barton Group</vendor>
403 <homepage href="http://www.jalview.org" />
404 <description>Jalview Multiple Alignment Editor</description>
405 <description kind="short">Jalview</description>
406 <icon href="${WebStartImage}" />
410 <j2se version="${j2sev}" initial_heap_size="${inih}" max_heap_size="${maxh}" />
411 <fileset dir="${packageDir}">
412 <include name="jalview.jar" />
414 <fileset dir="${packageDir}">
415 <include name="*.jar" />
416 <include name="*_*.jar" />
417 <exclude name="jalview.jar" />
418 <exclude name="*jnilib.jar"/>
421 <resources os="Mac OS X">
422 <property name="jalview.version" value="${JALVIEW_VERSION}" />
423 <fileset dir="${packageDir}">
424 <include name="*quaqua*.jnilib.jar"/>
428 <application_desc main_class="jalview.bin.Jalview">
436 <jnlpf toFile="${jnlpFile}"/>
440 <target name="-dofakejnlpfileassoc" depends="-generatejnlpf" if="nojnlpfileassocs">
441 <echo message="Not adding JNLP File Associations"/>
444 <target name="-dojnlpfileassoc" depends="-generatejnlpf" unless="nojnlpfileassocs">
445 <replace file="${jnlpFile}">
447 <![CDATA[</information>]]></replacetoken>
450 <association mime-type="application-x/ext-file" extensions="fa" />
451 <association mime-type="application-x/ext-file" extensions="fasta" />
452 <association mime-type="application-x/ext-file" extensions="mfa" />
453 <association mime-type="application-x/ext-file" extensions="fastq" />
454 <association mime-type="application-x/ext-file" extensions="blc" />
455 <association mime-type="application-x/ext-file" extensions="msf" />
456 <association mime-type="application-x/ext-file" extensions="pfam" />
457 <association mime-type="application-x/ext-file" extensions="aln"/>
458 <association mime-type="application-x/ext-file" extensions="pir"/>
459 <association mime-type="application-x/ext-file" extensions="amsa"/>
460 <association mime-type="application-x/ext-file" extensions="stk"/>
461 <association mime-type="application-x/ext-file" extensions="jvp"/>
462 </information>]]></replacevalue>
464 <echo message="Added file associations to JNLP file"/>
466 <target name="writejnlpf" depends="-dojnlpfileassoc,-dofakejnlpfileassoc">
469 <target name="buildextclients" depends="init">
470 <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" />
471 <condition property="dontextbuild">
472 <equals arg1="n" arg2="${doextbuild.response}" />
474 <condition property="dontextbuild">
475 <equals arg1="N" arg2="${doextbuild.response}" />
477 <fail if="dontextbuild">
478 Build External Client Code process aborted by user. Jalview source is unchanged.
480 <!-- Currently, this doesn't happen automatically.
481 1. Run WSDL2Java as below, which generates an ext.vamsas +
482 vamsas.<datapackages> fileset.
483 2. refactor ext.vamsas.SpecificserviceWS* to
484 ext.vamsas.ServiceclassWS* that implements the ServiceclassWSI interface.
485 3. Update the jalview.ws.*WServices classes to reflect the
486 interface type, and all locations of this wsdl type that Jalview
490 <path id="axisbuild">
491 <path refid="build.classpath" />
493 <taskdef resource="axis-tasks.properties" classpathref="axisbuild" />
495 <fileset dir="${sourceDir}" id="client">
496 <include name="${wsdl.ClientNS}/*.*" />
500 <axis-wsdl2java output="${sourceDir}" verbose="true" url="${wsdl.MsaWS2}" serverside="false" deployscope="Request" debug="false" helpergen="true" all="true">
502 <mapping namespace="${wsdl.Namespace}" package="${wsdl.ClientNS}" />
503 <mapping namespace="http://dataTypes.vamsas" package="${wsdl.ClientNS}" />
508 <target name="makedist" depends="build, buildPropertiesFile, buildindices">
509 <!-- make the package jar if not already existing -->
510 <mkdir dir="${packageDir}" />
511 <!-- clean dir if it already existed -->
513 <fileset dir="${packageDir}">
514 <include name="*.jar"/>
517 <jar destfile="${packageDir}/${outputJar}" index="true">
519 <attribute name="Main-Class" value="jalview.bin.Jalview" />
520 <attribute name="Permissions" value="all-permissions" />
521 <attribute name="Application-Name" value="Jalview Desktop" />
522 <attribute name="Codebase" value="${application.codebase}" />
524 <fileset dir="${outputDir}/">
525 <exclude name="cache*/**" />
526 <exclude name="*.jar" />
527 <exclude name="*.jar.*" />
528 <exclude name="**/*.jar" />
529 <exclude name="**/*.jar.*" />
533 <copy toDir="${packageDir}" flatten="true">
534 <fileset dir="${outputDir}">
535 <include name="*.jar" />
536 <include name="**/*.jar" />
542 <!-- jalopy code reformatter -->
543 <target name="sourcescrub" depends="init,build">
544 <jalopy destdir="jsrc" classpathref="run.classpath" convention="jalview-jalopy.xml">
545 <fileset dir="${sourceDir}">
546 <include name="*.java" />
547 <include name="**/*.java" />
548 <include name="**/**/*.java" />
555 <!-- Compile, package and obfuscate Jalview Applet -->
556 <target name="makeApplet" depends="obfuscate" description="assemble the final jalviewLite applet jar with or without obfuscation"/>
558 <target name="compileApplet" depends="init,clean">
559 <mkdir dir="${outputDir}" />
560 <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}"
561 classpathref="jalviewlite.deps" includes="jalview/appletgui/**"
562 excludes="ext/**,gui/**,jbgui/**,MCview/**,org/**,vamsas/**,jalview/ext/rbvi/**,jalview/ext/paradise/**" />
565 <target name="packageApplet" depends="compileApplet, buildPropertiesFile">
566 <copy file="${resourceDir}/images/idwidth.gif" toFile="${outputDir}/images/idwidth.gif" />
567 <copy file="${resourceDir}/images/link.gif" toFile="${outputDir}/images/link.gif" />
568 <copy todir="${outputDir}/lang">
569 <fileset dir="${resourceDir}/lang">
570 <include name="**.*"/>
573 <jar destfile="in.jar" index="true">
575 <attribute name="Main-Class" value="jalview.bin.JalviewLite" />
576 <attribute name="Application-Name" value="JalviewLite" />
577 <attribute name="Codebase" value="${applet.codebase}" />
579 <fileset dir="${outputDir}">
580 <include name="com/**" />
581 <include name="MCview/**" />
582 <include name="jalview/**" />
583 <include name=".build_properties" />
584 <include name="images/idwidth.gif" />
585 <include name="images/link.gif" />
586 <include name="lang/**" />
590 <target name="obfuscate" depends="-obfuscatefake,-obfuscatereally">
592 <target name="-obfuscatefake" depends="packageApplet" if="donotobfuscate">
593 <copy file="in.jar" tofile="${jalviewLiteJar}" overwrite="true" />
594 <delete file="in.jar" />
596 <target name="-obfuscatereally" unless="donotobfuscate">
598 <path id="obfuscateDeps.path">
599 <pathelement location="${applet.jre.tools}" />
600 <pathelement location="appletlib/${jmolJar}" />
601 <pathelement location="appletlib/${jsonSimple}" />
602 <pathelement location="appletlib/${javaJson}" />
604 <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
607 <injar file="in.jar" />
608 <outjar file="${jalviewLiteJar}" />
609 <libraryjar refid="obfuscateDeps.path" />
611 <keep access="public" type="class" name="jalview.bin.JalviewLite">
612 <field access="public" />
613 <method access="public" />
614 <constructor access="public" />
616 <keep access="public" type="class" name="jalview.appletgui.AlignFrame">
617 <field access="public" />
618 <method access="public" />
619 <constructor access="public" />
621 <!-- -libraryjars "${obfuscateDeps}"
623 -outjars jalviewApplet.jar
624 -keep public class jalview.bin.JalviewLite
627 <delete file="in.jar" />
630 <target name="castorbinding" depends="init" description="Generate Java bindings to supported Jalview XML models.">
631 <taskdef name="castor-srcgen" classname="org.castor.anttask.CastorCodeGenTask" classpathref="build.classpath" />
633 <fileset dir="${sourceDir}/jalview/schemabinding/version2">
634 <include name="*.java" />
635 <include name="descriptors/*.java" />
638 <castor-srcgen file="${schemaDir}/vamsas.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
639 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
640 <castor-srcgen file="${schemaDir}/JalviewWsParamSet.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
641 <castor-srcgen file="${schemaDir}/jalview.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
643 now build the jalview.binding package with the old schema set
646 <fileset dir="${sourceDir}/jalview/binding/">
647 <include name="**" />
650 <castor-srcgen file="${schemaDir}/vamsasJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
651 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
652 <castor-srcgen file="${schemaDir}/jalviewJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
654 <target name="sourcedist" description="create jalview source distribution" depends="init">
655 <delete file="${source.dist.name}" />
656 <tar destfile="${source.dist.name}" compression="gzip">
657 <tarfileset dir="./" prefix="jalview" preserveLeadingSlashes="true">
658 <include name="LICENSE" />
659 <include name="README" />
660 <include name="build.xml" />
661 <include name="jalview-jalopy.xml" />
662 <include name="JalviewApplet.jpx" />
663 <include name="JalviewX.jpx" />
664 <include name="nbbuild.xml"/>
665 <include name="nbproject/genfiles.properties"/>
666 <include name="nbproject/project.properties"/>
667 <include name="nbproject/project.xml"/>
668 <include name="${sourceDir}/*.java" />
669 <include name="${sourceDir}/**/*.java" />
670 <include name="${sourceDir}/**/*.cdr" />
671 <include name="${libDir}/**/*" />
672 <include name="${resourceDir}/**/*" />
673 <include name="${helpDir}/**/*" />
674 <include name="appletlib/${jmolJar}" />
675 <exclude name="**/*locales" />
676 <exclude name="*locales/**" />
677 <exclude name="utils/InstallAnywhere/**Build.iap_xml" />
678 <exclude name="utils/InstallAnywhere/**Build*/**" />
679 <exclude name="utils/InstallAnywhere/**Build*/**" />
680 <exclude name="utils/InstallAnywhere/**locale*" />
681 <exclude name="utils/InstallAnywhere/**locale*/**" />
682 <include name="${schemaDir}/**/*" />
683 <include name="utils/**/*" />
684 <include name="${docDir}/**/*" />
685 <include name="examples/**/*" />
689 <target name="pubapplet" description="installs the jalviewLite applet and dependent jars into an applet examples directory built under ${outputDir}" depends="makeApplet">
690 <copy todir="${packageDir}/examples">
691 <fileset dir="examples">
692 <include name="**/*"/>
693 <include name="javascript/*"/>
694 <include name="jmol/*"/>
697 <include name="${jalviewLiteJar}" />
699 <fileset dir="appletlib">
700 <include name="**/*"/>
703 <jar update="true" index="true" jarfile="${packageDir}/examples/${jalviewLiteJar}"/>
704 <jar update="true" index="true" jarfile="${packageDir}/examples/${javaJson}"/>
705 <jar update="true" index="true" jarfile="${packageDir}/examples/${jsonSimple}"/>
706 <jar update="true" index="true" jarfile="${packageDir}/examples/${jmolJar}">
708 <attribute name="Application-Name" value="Jmol (bundled with JalviewLite)"/>
709 <!-- <attribute name="Permissions" value="sandbox" /> -->
710 <!--<attribute name="Trusted-Lib" value="true" /> -->
711 <attribute name="Codebase" value="${applet.codebase}"/>
712 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}"/>
715 <signjar sigalg="SHA1WithRSA" storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
716 <fileset dir="${packageDir}/examples">
717 <include name="*.jar" />
720 <presetdef name="ap_applet.jar">
721 <!-- build a signed applet with 'all-permissions' -
722 Needs 'param name="permissions' value="all-permissions"' in applet tag
723 JalviewLite+JmolApplet linked sequence/structure fails
724 Mixed code warnings are raised
726 <jar update="true" index="true">
728 <attribute name="Application-Name" value="JalviewLite" />
729 <attribute name="Permissions" value="all-permissions" />
730 <attribute name="Codebase" value="${applet.codebase}" />
731 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
732 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
736 <presetdef name="applet.jar">
737 <!-- build signed applet with sandbox permissions -
738 Needs 'param name="permissions' value="sandbox"' in applet tag
739 Preserves Pre-Java 1.7_u45 behavior once 'permissions' parameter added to applet tag
742 <jar update="true" index="true">
744 <attribute name="Application-Name" value="JalviewLite" />
745 <attribute name="Permissions" value="sandbox" />
746 <attribute name="Codebase" value="${applet.codebase}" />
747 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
748 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
752 <presetdef name="tl_applet.jar">
753 <!-- build signed applet with trusted library/trusted permissions -
754 Needs 'param name="permissions' value="all-permissions"' in applet tag
756 No mixed code warnings raised
757 Jmol/JalviewLite sequence/structure example doesn't link structures
758 Raises dialog asking user to allow page to control applet via LiveConnect javascript
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" />
768 <attribute name="Trusted-Library" value="true" />
772 <presetdef name="to_applet.jar">
773 <!-- not fully test variant (yet) -->
774 <jar update="true" index="true">
776 <attribute name="Application-Name" value="JalviewLite" />
777 <attribute name="Permissions" value="all-permissions" />
778 <attribute name="Codebase" value="${applet.codebase}" />
779 <attribute name="Trusted-Only" value="true" />
783 <!-- create differently privileged artefacts -->
784 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/u_${jalviewLiteJar}" />
785 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true"/>
786 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/u_${javaJson}" overwrite="true"/>
787 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/u_${jsonSimple}" overwrite="true"/>
788 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/ap_${jalviewLiteJar}" />
789 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/ap_${jmolJar}"/>
790 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/ap_${javaJson}"/>
791 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/ap_${jsonSimple}"/>
792 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jalviewLiteJar}" />
793 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jmolJar}" />
794 <ap_applet.jar jarfile="${packageDir}/examples/ap_${javaJson}" />
795 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jsonSimple}" />
796 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/tl_${jalviewLiteJar}" />
797 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/tl_${jmolJar}" />
798 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/tl_${javaJson}" />
799 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/tl_${jsonSimple}" />
800 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jalviewLiteJar}" />
801 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jmolJar}" />
802 <tl_applet.jar jarfile="${packageDir}/examples/tl_${javaJson}" />
803 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jsonSimple}" />
804 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/to_${jalviewLiteJar}" />
805 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/to_${jmolJar}" />
806 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/to_${javaJson}" />
807 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/to_${jsonSimple}" />
808 <to_applet.jar jarfile="${packageDir}/examples/to_${jalviewLiteJar}" />
809 <to_applet.jar jarfile="${packageDir}/examples/to_${jmolJar}" />
810 <to_applet.jar jarfile="${packageDir}/examples/to_${javaJson}" />
811 <to_applet.jar jarfile="${packageDir}/examples/to_${jsonSimple}" />
812 <!-- finally, create manifest for original jars -->
813 <applet.jar jarfile="${packageDir}/examples/${jalviewLiteJar}" />
814 <applet.jar jarfile="${packageDir}/examples/${jmolJar}" />
815 <applet.jar jarfile="${packageDir}/examples/${javaJson}" />
816 <applet.jar jarfile="${packageDir}/examples/${jsonSimple}" />
818 <!-- todo - write examples/downloads for alternate versions of the applet -->
819 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
821 <fileset dir="${packageDir}/examples">
822 <exclude name="u_*.jar"/>
823 <include name="${jalviewLiteJar}" />
824 <include name="${jmolJar}" />
825 <include name="${javaJson}" />
826 <include name="${jsonSimple}" />
827 <include name="to_${jalviewLiteJar}" />
828 <include name="to_${jmolJar}" />
829 <include name="to_${javaJson}" />
830 <include name="to_${jsonSimple}" />
831 <include name="tl_${jalviewLiteJar}" />
832 <include name="tl_${jmolJar}" />
833 <include name="tl_${javaJson}" />
834 <include name="tl_${jsonSimple}" />
835 <include name="ap_${jalviewLiteJar}" />
836 <include name="ap_${jmolJar}" />
837 <include name="ap_${javaJson}" />
838 <include name="ap_${jsonSimple}" />
841 <!-- bizarre bug causes JmolApplet to always get signed, even if excluded from above. so copy explicitly -->
842 <copy file="appletlib/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true" />
843 <!-- finally, replace any launchApp servlet tags with a version specification -->
844 <replace value="http://www.jalview.org/services/launchApp?version=${JALVIEW_VERSION}"">
845 <replacetoken><![CDATA[http://www.jalview.org/services/launchApp"]]></replacetoken>
846 <fileset dir="${packageDir}/examples">
847 <include name="**/*.html"/>
850 <replace value="http://www.jalview.org/services/launchApp?version=${JALVIEW_VERSION}'">
851 <replacetoken><![CDATA[http://www.jalview.org/services/launchApp']]></replacetoken>
852 <fileset dir="${packageDir}/examples">
853 <include name="**/*.html"/>
858 <target name="sourcedoc" description="Create jalview source documentation pages" depends="init">
859 <javadoc destdir="${javadocDir}">
860 <packageset dir="${sourceDir}" includes="jalview/*,MCView/*">