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 <exec executable="/usr/bin/git" outputproperty="git.commit" failifexecutionfails="false">
193 <arg value="rev-parse"/>
194 <arg value="--short"/>
197 <exec executable="/usr/bin/git" outputproperty="git.branch" failifexecutionfails="false">
198 <arg value="rev-parse"/>
199 <arg value="--abbrev-ref"/>
202 <properties file="${outputDir}/.build_properties">
204 ---Jalview Build Details---
206 <property name="VERSION" value="${JALVIEW_VERSION}" />
207 <property name="INSTALLATION" value="${INSTALLATION} git-commit:${git.commit} [${git.branch}]" />
208 <property name="BUILD_DATE" value="${build.date}" />
213 <target name="clean" depends="init">
214 <!-- not efficient yet. -->
215 <delete dir="${outputDir}" includes="*,**/*"/>
218 <target name="distclean" depends="init, clean">
220 <echo message="REMOVING ALL BACKUP/AUTOSAVES!" />
223 <include name="${outputJar}" />
224 <include name="#*#" />
225 <include name="#*.*#" />
226 <include name="**/#*#" />
227 <include name="**/#*.*#" />
228 <include name="*~" />
229 <include name="*.*~" />
230 <include name="**/*~" />
231 <include name="**/*.*~" />
236 <target name="prepare" depends="init">
237 <mkdir dir="${outputDir}" />
238 <copy todir="${outputDir}">
240 <include name="${docDir}/**/*.*" />
241 <include name="${helpDir}/**/*.*" />
242 <include name="${libDir}/*.jar" />
244 <fileset dir="${resourceDir}">
245 <include name="**/*.*" />
250 <target name="build" depends="prepare">
251 <!-- not efficient yet. -->
252 <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="build.classpath">
253 <exclude name="jalview/*applet*" />
254 <exclude name="jalview/appletgui/**" />
255 <exclude name="com/stevesoft/**" />
260 <target name="testclean" depends="init">
261 <delete dir="${testOutputDir}" includes="*,**/*"/>
264 <target name="prepareTests" depends="init">
265 <mkdir dir="${testOutputDir}" />
266 <copy todir="${testOutputDir}">
268 <include name="${docDir}/**/*.*" />
269 <include name="${helpDir}/**/*.*" />
270 <include name="${libDir}/*.jar" />
272 <fileset dir="${resourceDir}">
273 <include name="**/*.*" />
278 <target name="buildTests" depends="prepareTests">
279 <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${testOutputDir}"
280 debug="${javac.debug}" classpathref="build.classpath" includeantruntime="false" >
282 <javac source="${javac.source}" target="${javac.target}" srcdir="${testDir}" destdir="${testOutputDir}"
283 debug="${javac.debug}" classpathref="build.classpath" includeantruntime="false" >
287 <taskdef name="testng" classname="org.testng.TestNGAntTask" >
288 <classpath location="utils/testnglibs/testng.jar" />
291 <target name="testng" depends="buildTests">
292 <testng classpathref="build.classpath" outputDir="${reportDir}"
293 haltOnFailure="false">
294 <classpath location="${testOutputDir}" />
295 <xmlfileset dir="utils" includes="jalview_testng.xml" />
299 <target name="buildindices" depends="init, prepare" unless="help.uptodate">
300 <java classname="com.sun.java.help.search.Indexer" classpathref="build.classpath" fork="true" dir="${outputDir}/${helpDir}">
305 <target name="makefulldist" depends="makedist">
306 <copy todir="${packageDir}">
307 <fileset dir="${resourceDir}/images">
308 <include name="${WebStartImage}"/>
312 <taskdef classpathref="build.classpath" resource="com/roxes/tools/ant/taskdefs.properties" />
314 <!-- create a dummy jar which will eventually contain the jnlp template -->
315 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
316 <fileset dir="${packageDir}">
317 <include name="jalview.jar" />
321 <mkdir dir="${packageDir}/JNLP-INF"/>
322 <antcall target="writejnlpf">
323 <param name="jnlpFile" value="${packageDir}/JNLP-INF/APPLICATION-TEMPLATE.JNLP"/>
324 <param name="inih" value="*" />
325 <param name="maxh" value="*"/>
328 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
329 <fileset dir="${packageDir}">
330 <include name="JNLP-INF/APPLICATION-TEMPLATE.JNLP" />
334 <antcall target="writejnlpf">
335 <param name="jnlpFile" value="${packageDir}/jalview.jnlp"/>
336 <param name="inih" value="10M" />
337 <param name="maxh" value="256M"/>
340 <antcall target="writejnlpf">
341 <param name="jnlpFile" value="${packageDir}/jalview_1G.jnlp"/>
342 <param name="inih" value="128M" />
343 <param name="maxh" value="512M"/>
346 <antcall target="writejnlpf">
347 <param name="jnlpFile" value="${packageDir}/jalview_2G.jnlp"/>
348 <param name="inih" value="256M" />
349 <param name="maxh" value="1024M"/>
352 <!-- finally, need to postprocess to add in associations at end of 'information' element
354 <xslt in="${packageDir}/jalview_noa_1G.jnlp" out="${packageDir}/jalview_1G.jnlp">
361 <association mime-type="application-x/ext-file" extensions="fa"/>
362 <association mime-type="application-x/ext-file" extensions="fasta"/>
363 <association mime-type="application-x/ext-file" extensions="mfa"/>
364 <association mime-type="application-x/ext-file" extensions="fastq"/>
365 <association mime-type="application-x/ext-file" extensions="blc"/>
366 <association mime-type="application-x/ext-file" extensions="msf"/>
367 <association mime-type="application-x/ext-file" extensions="pfam"/>
368 <association mime-type="application-x/ext-file" extensions="aln"/>
369 <association mime-type="application-x/ext-file" extensions="pir"/>
370 <association mime-type="application-x/ext-file" extensions="amsa"/>
371 <association mime-type="application-x/ext-file" extensions="stk"/>
372 <association mime-type="application-x/ext-file" extensions="jar"/>-->
373 <!-- and sign the jars -->
374 <!-- the default keystore details might need to be edited here -->
375 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false" sigalg="SHA1withRSA">
376 <fileset dir="${packageDir}">
377 <include name="*.jar" />
382 <target name="runenv" depends="init">
383 <path id="run.classpath">
384 <pathelement location="${outputDir}" />
385 <fileset dir="${outputDir}">
386 <include name="${libDir}/*.jar" />
389 <pathconvert targetos="unix" refid="run.classpath" property="run.classpath" />
391 <echo>java -classpath ${run.classpath} jalview.bin.Jalview
395 <target name="-generatejnlpf">
396 <presetdef name="jnlpf">
397 <jnlp codebase="${WebStartLocation}">
399 <title>Jalview</title>
400 <vendor>The Barton Group</vendor>
401 <homepage href="http://www.jalview.org" />
402 <description>Jalview Multiple Alignment Editor</description>
403 <description kind="short">Jalview</description>
404 <icon href="${WebStartImage}" />
408 <j2se version="${j2sev}" initial_heap_size="${inih}" max_heap_size="${maxh}" />
409 <fileset dir="${packageDir}">
410 <include name="jalview.jar" />
412 <fileset dir="${packageDir}">
413 <include name="*.jar" />
414 <include name="*_*.jar" />
415 <exclude name="jalview.jar" />
416 <exclude name="*jnilib.jar"/>
419 <resources os="Mac OS X">
420 <property name="jalview.version" value="${JALVIEW_VERSION}" />
421 <fileset dir="${packageDir}">
422 <include name="*quaqua*.jnilib.jar"/>
426 <application_desc main_class="jalview.bin.Jalview">
434 <jnlpf toFile="${jnlpFile}"/>
438 <target name="-dofakejnlpfileassoc" depends="-generatejnlpf" if="nojnlpfileassocs">
439 <echo message="Not adding JNLP File Associations"/>
442 <target name="-dojnlpfileassoc" depends="-generatejnlpf" unless="nojnlpfileassocs">
443 <replace file="${jnlpFile}">
445 <![CDATA[</information>]]></replacetoken>
448 <association mime-type="application-x/ext-file" extensions="fa" />
449 <association mime-type="application-x/ext-file" extensions="fasta" />
450 <association mime-type="application-x/ext-file" extensions="mfa" />
451 <association mime-type="application-x/ext-file" extensions="fastq" />
452 <association mime-type="application-x/ext-file" extensions="blc" />
453 <association mime-type="application-x/ext-file" extensions="msf" />
454 <association mime-type="application-x/ext-file" extensions="pfam" />
455 <association mime-type="application-x/ext-file" extensions="aln"/>
456 <association mime-type="application-x/ext-file" extensions="pir"/>
457 <association mime-type="application-x/ext-file" extensions="amsa"/>
458 <association mime-type="application-x/ext-file" extensions="stk"/>
459 <association mime-type="application-x/ext-file" extensions="jvp"/>
460 </information>]]></replacevalue>
462 <echo message="Added file associations to JNLP file"/>
464 <target name="writejnlpf" depends="-dojnlpfileassoc,-dofakejnlpfileassoc">
467 <target name="buildextclients" depends="init">
468 <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" />
469 <condition property="dontextbuild">
470 <equals arg1="n" arg2="${doextbuild.response}" />
472 <condition property="dontextbuild">
473 <equals arg1="N" arg2="${doextbuild.response}" />
475 <fail if="dontextbuild">
476 Build External Client Code process aborted by user. Jalview source is unchanged.
478 <!-- Currently, this doesn't happen automatically.
479 1. Run WSDL2Java as below, which generates an ext.vamsas +
480 vamsas.<datapackages> fileset.
481 2. refactor ext.vamsas.SpecificserviceWS* to
482 ext.vamsas.ServiceclassWS* that implements the ServiceclassWSI interface.
483 3. Update the jalview.ws.*WServices classes to reflect the
484 interface type, and all locations of this wsdl type that Jalview
488 <path id="axisbuild">
489 <path refid="build.classpath" />
491 <taskdef resource="axis-tasks.properties" classpathref="axisbuild" />
493 <fileset dir="${sourceDir}" id="client">
494 <include name="${wsdl.ClientNS}/*.*" />
498 <axis-wsdl2java output="${sourceDir}" verbose="true" url="${wsdl.MsaWS2}" serverside="false" deployscope="Request" debug="false" helpergen="true" all="true">
500 <mapping namespace="${wsdl.Namespace}" package="${wsdl.ClientNS}" />
501 <mapping namespace="http://dataTypes.vamsas" package="${wsdl.ClientNS}" />
506 <target name="makedist" depends="build, buildPropertiesFile, buildindices">
507 <!-- make the package jar if not already existing -->
508 <mkdir dir="${packageDir}" />
509 <!-- clean dir if it already existed -->
511 <fileset dir="${packageDir}">
512 <include name="*.jar"/>
515 <jar destfile="${packageDir}/${outputJar}" index="true">
517 <attribute name="Main-Class" value="jalview.bin.Jalview" />
518 <attribute name="Permissions" value="all-permissions" />
519 <attribute name="Application-Name" value="Jalview Desktop" />
520 <attribute name="Codebase" value="${application.codebase}" />
522 <fileset dir="${outputDir}/">
523 <exclude name="cache*/**" />
524 <exclude name="*.jar" />
525 <exclude name="*.jar.*" />
526 <exclude name="**/*.jar" />
527 <exclude name="**/*.jar.*" />
531 <copy toDir="${packageDir}" flatten="true">
532 <fileset dir="${outputDir}">
533 <include name="*.jar" />
534 <include name="**/*.jar" />
540 <!-- jalopy code reformatter -->
541 <target name="sourcescrub" depends="init,build">
542 <jalopy destdir="jsrc" classpathref="run.classpath" convention="jalview-jalopy.xml">
543 <fileset dir="${sourceDir}">
544 <include name="*.java" />
545 <include name="**/*.java" />
546 <include name="**/**/*.java" />
553 <!-- Compile, package and obfuscate Jalview Applet -->
554 <target name="makeApplet" depends="obfuscate" description="assemble the final jalviewLite applet jar with or without obfuscation"/>
556 <target name="compileApplet" depends="init,clean">
557 <mkdir dir="${outputDir}" />
558 <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}"
559 classpathref="jalviewlite.deps" includes="jalview/appletgui/**"
560 excludes="ext/**,gui/**,jbgui/**,MCview/**,org/**,vamsas/**,jalview/ext/rbvi/**,jalview/ext/paradise/**" />
563 <target name="packageApplet" depends="compileApplet, buildPropertiesFile">
564 <copy file="${resourceDir}/images/idwidth.gif" toFile="${outputDir}/images/idwidth.gif" />
565 <copy file="${resourceDir}/images/link.gif" toFile="${outputDir}/images/link.gif" />
566 <copy todir="${outputDir}/lang">
567 <fileset dir="${resourceDir}/lang">
568 <include name="**.*"/>
571 <jar destfile="in.jar" index="true">
573 <attribute name="Main-Class" value="jalview.bin.JalviewLite" />
574 <attribute name="Application-Name" value="JalviewLite" />
575 <attribute name="Codebase" value="${applet.codebase}" />
577 <fileset dir="${outputDir}">
578 <include name="com/**" />
579 <include name="MCview/**" />
580 <include name="jalview/**" />
581 <include name=".build_properties" />
582 <include name="images/idwidth.gif" />
583 <include name="images/link.gif" />
584 <include name="lang/**" />
588 <target name="obfuscate" depends="-obfuscatefake,-obfuscatereally">
590 <target name="-obfuscatefake" depends="packageApplet" if="donotobfuscate">
591 <copy file="in.jar" tofile="${jalviewLiteJar}" overwrite="true" />
592 <delete file="in.jar" />
594 <target name="-obfuscatereally" unless="donotobfuscate">
596 <path id="obfuscateDeps.path">
597 <pathelement location="${applet.jre.tools}" />
598 <pathelement location="appletlib/${jmolJar}" />
599 <pathelement location="appletlib/${jsonSimple}" />
600 <pathelement location="appletlib/${javaJson}" />
602 <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
605 <injar file="in.jar" />
606 <outjar file="${jalviewLiteJar}" />
607 <libraryjar refid="obfuscateDeps.path" />
609 <keep access="public" type="class" name="jalview.bin.JalviewLite">
610 <field access="public" />
611 <method access="public" />
612 <constructor access="public" />
614 <keep access="public" type="class" name="jalview.appletgui.AlignFrame">
615 <field access="public" />
616 <method access="public" />
617 <constructor access="public" />
619 <!-- -libraryjars "${obfuscateDeps}"
621 -outjars jalviewApplet.jar
622 -keep public class jalview.bin.JalviewLite
625 <delete file="in.jar" />
628 <target name="castorbinding" depends="init" description="Generate Java bindings to supported Jalview XML models.">
629 <taskdef name="castor-srcgen" classname="org.castor.anttask.CastorCodeGenTask" classpathref="build.classpath" />
631 <fileset dir="${sourceDir}/jalview/schemabinding/version2">
632 <include name="*.java" />
633 <include name="descriptors/*.java" />
636 <castor-srcgen file="${schemaDir}/vamsas.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
637 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
638 <castor-srcgen file="${schemaDir}/JalviewWsParamSet.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
639 <castor-srcgen file="${schemaDir}/jalview.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
641 now build the jalview.binding package with the old schema set
644 <fileset dir="${sourceDir}/jalview/binding/">
645 <include name="**" />
648 <castor-srcgen file="${schemaDir}/vamsasJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
649 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
650 <castor-srcgen file="${schemaDir}/jalviewJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
652 <target name="sourcedist" description="create jalview source distribution" depends="init">
653 <delete file="${source.dist.name}" />
654 <tar destfile="${source.dist.name}" compression="gzip">
655 <tarfileset dir="./" prefix="jalview" preserveLeadingSlashes="true">
656 <include name="LICENSE" />
657 <include name="README" />
658 <include name="build.xml" />
659 <include name="jalview-jalopy.xml" />
660 <include name="JalviewApplet.jpx" />
661 <include name="JalviewX.jpx" />
662 <include name="nbbuild.xml"/>
663 <include name="nbproject/genfiles.properties"/>
664 <include name="nbproject/project.properties"/>
665 <include name="nbproject/project.xml"/>
666 <include name="${sourceDir}/*.java" />
667 <include name="${sourceDir}/**/*.java" />
668 <include name="${sourceDir}/**/*.cdr" />
669 <include name="${libDir}/**/*" />
670 <include name="${resourceDir}/**/*" />
671 <include name="${helpDir}/**/*" />
672 <include name="appletlib/${jmolJar}" />
673 <exclude name="**/*locales" />
674 <exclude name="*locales/**" />
675 <exclude name="utils/InstallAnywhere/**Build.iap_xml" />
676 <exclude name="utils/InstallAnywhere/**Build*/**" />
677 <exclude name="utils/InstallAnywhere/**Build*/**" />
678 <exclude name="utils/InstallAnywhere/**locale*" />
679 <exclude name="utils/InstallAnywhere/**locale*/**" />
680 <include name="${schemaDir}/**/*" />
681 <include name="utils/**/*" />
682 <include name="${docDir}/**/*" />
683 <include name="examples/**/*" />
687 <target name="pubapplet" description="installs the jalviewLite applet and dependent jars into an applet examples directory built under ${outputDir}" depends="makeApplet">
688 <copy todir="${packageDir}/examples">
689 <fileset dir="examples">
690 <include name="**/*"/>
691 <include name="javascript/*"/>
692 <include name="jmol/*"/>
695 <include name="${jalviewLiteJar}" />
697 <fileset dir="appletlib">
698 <include name="**/*"/>
701 <jar update="true" index="true" jarfile="${packageDir}/examples/${jalviewLiteJar}"/>
702 <jar update="true" index="true" jarfile="${packageDir}/examples/${javaJson}"/>
703 <jar update="true" index="true" jarfile="${packageDir}/examples/${jsonSimple}"/>
704 <jar update="true" index="true" jarfile="${packageDir}/examples/${jmolJar}">
706 <attribute name="Application-Name" value="Jmol (bundled with JalviewLite)"/>
707 <!-- <attribute name="Permissions" value="sandbox" /> -->
708 <!--<attribute name="Trusted-Lib" value="true" /> -->
709 <attribute name="Codebase" value="${applet.codebase}"/>
710 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}"/>
713 <signjar sigalg="SHA1WithRSA" storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
714 <fileset dir="${packageDir}/examples">
715 <include name="*.jar" />
718 <presetdef name="ap_applet.jar">
719 <!-- build a signed applet with 'all-permissions' -
720 Needs 'param name="permissions' value="all-permissions"' in applet tag
721 JalviewLite+JmolApplet linked sequence/structure fails
722 Mixed code warnings are raised
724 <jar update="true" index="true">
726 <attribute name="Application-Name" value="JalviewLite" />
727 <attribute name="Permissions" value="all-permissions" />
728 <attribute name="Codebase" value="${applet.codebase}" />
729 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
730 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
734 <presetdef name="applet.jar">
735 <!-- build signed applet with sandbox permissions -
736 Needs 'param name="permissions' value="sandbox"' in applet tag
737 Preserves Pre-Java 1.7_u45 behavior once 'permissions' parameter added to applet tag
740 <jar update="true" index="true">
742 <attribute name="Application-Name" value="JalviewLite" />
743 <attribute name="Permissions" value="sandbox" />
744 <attribute name="Codebase" value="${applet.codebase}" />
745 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
746 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
750 <presetdef name="tl_applet.jar">
751 <!-- build signed applet with trusted library/trusted permissions -
752 Needs 'param name="permissions' value="all-permissions"' in applet tag
754 No mixed code warnings raised
755 Jmol/JalviewLite sequence/structure example doesn't link structures
756 Raises dialog asking user to allow page to control applet via LiveConnect javascript
760 <jar update="true" index="true">
762 <attribute name="Application-Name" value="JalviewLite" />
763 <attribute name="Permissions" value="all-permissions" />
764 <attribute name="Codebase" value="${applet.codebase}" />
765 <attribute name="Trusted-Only" value="true" />
766 <attribute name="Trusted-Library" value="true" />
770 <presetdef name="to_applet.jar">
771 <!-- not fully test variant (yet) -->
772 <jar update="true" index="true">
774 <attribute name="Application-Name" value="JalviewLite" />
775 <attribute name="Permissions" value="all-permissions" />
776 <attribute name="Codebase" value="${applet.codebase}" />
777 <attribute name="Trusted-Only" value="true" />
781 <!-- create differently privileged artefacts -->
782 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/u_${jalviewLiteJar}" />
783 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true"/>
784 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/u_${javaJson}" overwrite="true"/>
785 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/u_${jsonSimple}" overwrite="true"/>
786 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/ap_${jalviewLiteJar}" />
787 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/ap_${jmolJar}"/>
788 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/ap_${javaJson}"/>
789 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/ap_${jsonSimple}"/>
790 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jalviewLiteJar}" />
791 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jmolJar}" />
792 <ap_applet.jar jarfile="${packageDir}/examples/ap_${javaJson}" />
793 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jsonSimple}" />
794 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/tl_${jalviewLiteJar}" />
795 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/tl_${jmolJar}" />
796 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/tl_${javaJson}" />
797 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/tl_${jsonSimple}" />
798 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jalviewLiteJar}" />
799 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jmolJar}" />
800 <tl_applet.jar jarfile="${packageDir}/examples/tl_${javaJson}" />
801 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jsonSimple}" />
802 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/to_${jalviewLiteJar}" />
803 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/to_${jmolJar}" />
804 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/to_${javaJson}" />
805 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/to_${jsonSimple}" />
806 <to_applet.jar jarfile="${packageDir}/examples/to_${jalviewLiteJar}" />
807 <to_applet.jar jarfile="${packageDir}/examples/to_${jmolJar}" />
808 <to_applet.jar jarfile="${packageDir}/examples/to_${javaJson}" />
809 <to_applet.jar jarfile="${packageDir}/examples/to_${jsonSimple}" />
810 <!-- finally, create manifest for original jars -->
811 <applet.jar jarfile="${packageDir}/examples/${jalviewLiteJar}" />
812 <applet.jar jarfile="${packageDir}/examples/${jmolJar}" />
813 <applet.jar jarfile="${packageDir}/examples/${javaJson}" />
814 <applet.jar jarfile="${packageDir}/examples/${jsonSimple}" />
816 <!-- todo - write examples/downloads for alternate versions of the applet -->
817 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
819 <fileset dir="${packageDir}/examples">
820 <exclude name="u_*.jar"/>
821 <include name="${jalviewLiteJar}" />
822 <include name="${jmolJar}" />
823 <include name="${javaJson}" />
824 <include name="${jsonSimple}" />
825 <include name="to_${jalviewLiteJar}" />
826 <include name="to_${jmolJar}" />
827 <include name="to_${javaJson}" />
828 <include name="to_${jsonSimple}" />
829 <include name="tl_${jalviewLiteJar}" />
830 <include name="tl_${jmolJar}" />
831 <include name="tl_${javaJson}" />
832 <include name="tl_${jsonSimple}" />
833 <include name="ap_${jalviewLiteJar}" />
834 <include name="ap_${jmolJar}" />
835 <include name="ap_${javaJson}" />
836 <include name="ap_${jsonSimple}" />
839 <!-- bizarre bug causes JmolApplet to always get signed, even if excluded from above. so copy explicitly -->
840 <copy file="appletlib/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true" />
841 <!-- finally, replace any launchApp servlet tags with a version specification -->
842 <replace value="http://www.jalview.org/services/launchApp?version=${JALVIEW_VERSION}"">
843 <replacetoken><![CDATA[http://www.jalview.org/services/launchApp"]]></replacetoken>
844 <fileset dir="${packageDir}/examples">
845 <include name="**/*.html"/>
848 <replace value="http://www.jalview.org/services/launchApp?version=${JALVIEW_VERSION}'">
849 <replacetoken><![CDATA[http://www.jalview.org/services/launchApp']]></replacetoken>
850 <fileset dir="${packageDir}/examples">
851 <include name="**/*.html"/>
856 <target name="sourcedoc" description="Create jalview source documentation pages" depends="init">
857 <javadoc destdir="${javadocDir}">
858 <packageset dir="${sourceDir}" includes="jalview/*,MCView/*">