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. 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="testng - run jalview's tests via testNG. Default group is '${testng-groups}'" />
34 <echo message=" you can specify particular test groups as a list via -Dtestng-groups=" />
35 <echo message="See docs/building.html and the comments in build file for other targets." />
36 <echo message="note: compile and makeApplet require the property java118.home to be set to point to a java 1.1.8 jdk." />
37 <echo message="Useful -D flags: -Ddonotobfuscate will prevent applet obfuscation" />
41 <!-- utils is a class path to additional utilities needed for
42 building docs, jars and webstart stuff -->
44 Userdefined build property defaults
46 wsdl.server list (plus namespace mapping info ???) - also want
47 ... to make this a dynamically generatable property
49 Build location - provide a temporary root for speed
50 jarsigner keystore and info
51 Jakarta and axis classpath ?
52 Default argument for starting Jalview (if it exists).
57 <path id="axis.classpath">
59 <fileset dir="/usr/local/axis/lib">
60 <include name="**/*.jar" />
62 <fileset dir="/usr/local/jakarta-tomcat-5/webapps/axis/WEB-INF/lib">
63 <include name="**/*.jar"/>
64 <include name="*.jar"/>
68 <!-- Jalview Version String displayed by application on startup and used to check for updates -->
69 <property name="JALVIEW_VERSION" value="DEVELOPMENT" />
71 <property name="INSTALLATION" value="Source" />
73 <!-- 2.4 (VAMSAS)" -->
74 <!-- Include debugging information in javac true or false -->
75 <property name="javac.debug" value="true" />
77 <!-- JarSigner Key Store for Webstart Distribution -->
78 <property name="jalview.keystore" value="./keys/.keystore" />
79 <!-- Keystore Password -->
80 <property name="jalview.keystore.pass" value="alignmentisfun" />
82 <property name="jalview.key" value="jalview" />
84 <property name="jalview.key.pass" value="alignmentisfun" />
86 <property name="testng-groups" value="Functional"/>
88 <!-- Don't change anything below here unless you know what you are doing! -->
89 <!-- Url path for WebStart in JNLP file -->
90 <property name="WebStartLocation" value="http://www.jalview.org/webstart" />
91 <!-- Webstart Image - looked for in resources/images -->
92 <property name="WebStartImage" value="JalviewLogo_big.png"/>
93 <!-- J2SE version needed for webstart launch -->
94 <!-- Anne's version needs 1.7 - should rebuild VARNA to java 1.6 for release -->
95 <property name="j2sev" value="1.7+"/>
96 <!-- Java Compilation settings - source and target javac version -->
97 <property name="javac.source" value="1.7"/>
98 <property name="javac.target" value="1.7"/>
100 <!-- Permissions for running Java applets and applications. -->
101 <!-- Defaults are those suitable for deploying jalview webstart www.jalview.org -->
102 <property name="application.codebase" value="*.jalview.org" />
103 <!-- and allowing the applet to be deployed from any URL -->
104 <!-- 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 -->
105 <property name="applet.codebase" value="*.jalview.org *.dundee.ac.uk *" />
106 <property name="applet.caller-codebase" value="${applet.codebase}" />
108 <!-- build directory configuration -->
109 <property name="libDir" value="lib" />
110 <property name="resourceDir" value="resources" />
111 <property name="helpDir" value="help" />
112 <property name="docDir" value="doc" />
113 <property name="sourceDir" value="src" />
114 <property name="schemaDir" value="schemas" />
115 <property name="outputDir" value="classes" />
116 <property name="packageDir" value="dist" />
117 <property name="outputJar" value="jalview.jar" />
118 <!-- Jalview Applet JMol Jar Dependency -->
119 <property name="jmolJar" value="JmolApplet-14.2.14_2015.06.11.jar" />
120 <property name="varnaJar" value="VARNAv3-93.jar" />
121 <property name="jsoup" value="jsoup-1.8.1.jar" />
122 <property name="jsonSimple" value="json_simple-1.1.jar" />
123 <property name="javaJson" value="java-json.jar" />
124 <property name="jalviewLiteJar" value="jalviewApplet.jar" />
125 <property name="reportDir" value="test-reports" />
126 <property name="testDir" value="test" />
127 <property name="testOutputDir" value="tests" />
128 <!-- switch to indicate if we should obfuscate jalviewLite -->
129 <!-- <property name="donotobfuscate" value="true"/> -->
130 <!-- switch to exclude associations from generated jnlp files -->
131 <!-- <property name="nojnlpfileassocs" value="true"/> -->
133 <!-- Jalview Web Service Clients - see the comments in 'buildextclients' for details -->
134 <property name="wsdl.File" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred?wsdl" />
135 <property name="wsdl.Files" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/vamsas?wsdlFiles" />
136 <property name="wsdl.MsaWS" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/MuscleWS?wsdl" />
137 <property name="wsdl.MsaWS2" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/ClustalWS?wsdl" />
138 <property name="WSInterf" value="MsaWS" />
139 <property name="wsdl.Namespace" value="vamsas" />
140 <property name="wsdl.ClientNS" value="ext.vamsas" />
141 <!-- the class path for building the application -->
142 <path id="build.classpath">
143 <fileset dir="utils">
144 <include name="*.jar" />
145 <include name="**/*.jar" />
147 <fileset dir="${libDir}">
148 <include name="*.jar" />
149 <include name="**/*.jar" />
151 <fileset dir="${java.home}/lib">
152 <include name="plugin.jar"/>
154 <fileset dir="appletlib">
155 <!-- the JmolApplet includes the JmolApplet console and the application javac seems to always try and build all packages
157 <include name="${jmolJar}" />
158 <include name="${varnaJar}" />
162 <property name="source.dist.name" value="${basedir}/jalview-src.tar.gz" />
163 <!-- The Location of the java 1.1.8 jdk -->
164 <!--<property name="java118.home" value="C:\Sun\jdk1.1.8" /> -->
165 <property name="java118.home" value="${java.home}" />
166 <!-- <property name="applet.jre.tools" value="${java118.home}/lib/classes.zip" />
168 <!-- jre for 1.4 version -->
169 <property name="applet.jre.tools" value="${java.home}/lib/rt.jar"/>
171 <!-- the classpath for building the 1.1 applet -->
172 <path id="jalviewlite.deps">
173 <fileset dir="${java118.home}">
174 <include name="lib/classes.zip" />
176 <fileset dir="${java.home}/lib">
177 <include name="plugin.jar"/>
179 <pathelement location="appletlib/${jmolJar}" />
180 <pathelement location="lib/${varnaJar}" />
181 <pathelement location="lib/${jsoup}" />
182 <pathelement location="lib/${jsonSimple}" />
183 <pathelement location="lib/${javaJson}" />
186 <!-- default location for outputting javadoc -->
187 <property name="javadocDir" value="${packageDir}/javadoc"/>
191 <taskdef classpath="utils/roxes-ant-tasks-1.2-2004-01-30.jar" resource="com/roxes/tools/ant/taskdefs.properties" />
192 <target name="buildPropertiesFile" depends="init">
193 <tstamp prefix="build">
194 <format property="date" pattern="dd MMMM yyyy" />
196 <exec executable="/usr/bin/git" outputproperty="git.commit" failifexecutionfails="false">
197 <arg value="rev-parse"/>
198 <arg value="--short"/>
201 <exec executable="/usr/bin/git" outputproperty="git.branch" failifexecutionfails="false">
202 <arg value="rev-parse"/>
203 <arg value="--abbrev-ref"/>
206 <properties file="${outputDir}/.build_properties">
208 ---Jalview Build Details---
210 <property name="VERSION" value="${JALVIEW_VERSION}" />
211 <property name="INSTALLATION" value="${INSTALLATION} git-commit:${git.commit} [${git.branch}]" />
212 <property name="BUILD_DATE" value="${build.date}" />
217 <target name="clean" depends="init">
218 <!-- not efficient yet. -->
219 <delete dir="${outputDir}" includes="*,**/*"/>
222 <target name="distclean" depends="init, clean">
224 <echo message="REMOVING ALL BACKUP/AUTOSAVES!" />
227 <include name="${outputJar}" />
228 <include name="#*#" />
229 <include name="#*.*#" />
230 <include name="**/#*#" />
231 <include name="**/#*.*#" />
232 <include name="*~" />
233 <include name="*.*~" />
234 <include name="**/*~" />
235 <include name="**/*.*~" />
240 <target name="prepare" depends="init">
241 <mkdir dir="${outputDir}" />
242 <copy todir="${outputDir}">
244 <include name="${docDir}/**/*.*" />
245 <include name="${helpDir}/**/*.*" />
246 <include name="${libDir}/*.jar" />
248 <fileset dir="${resourceDir}">
249 <include name="**/*.*" />
254 <target name="build" depends="prepare">
255 <!-- not efficient yet. -->
256 <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="build.classpath">
257 <exclude name="jalview/*applet*" />
258 <exclude name="jalview/appletgui/**" />
259 <exclude name="com/stevesoft/**" />
264 <target name="testclean" depends="init">
265 <delete dir="${testOutputDir}" includes="*,**/*"/>
268 <target name="prepareTests" depends="init">
269 <mkdir dir="${testOutputDir}" />
270 <copy todir="${testOutputDir}">
272 <include name="${docDir}/**/*.*" />
273 <include name="${helpDir}/**/*.*" />
274 <include name="${libDir}/*.jar" />
276 <fileset dir="${resourceDir}">
277 <include name="**/*.*" />
282 <target name="buildTests" depends="prepareTests">
283 <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${testOutputDir}"
284 debug="${javac.debug}" classpathref="build.classpath" includeantruntime="false" >
286 <javac source="${javac.source}" target="${javac.target}" srcdir="${testDir}" destdir="${testOutputDir}"
287 debug="${javac.debug}" classpathref="build.classpath" includeantruntime="false" >
291 <taskdef name="testng" classname="org.testng.TestNGAntTask" >
292 <classpath location="utils/testnglibs/testng.jar" />
295 <target name="testng" depends="buildTests">
296 <testng classpathref="build.classpath" outputDir="${reportDir}"
297 haltOnFailure="false">
298 <classpath location="${testOutputDir}" />
299 <xmlfileset dir="utils" includes="jalview_testng.xml" />
303 <target name="buildindices" depends="init, prepare" unless="help.uptodate">
304 <java classname="com.sun.java.help.search.Indexer" classpathref="build.classpath" fork="true" dir="${outputDir}/${helpDir}">
309 <target name="makefulldist" depends="makedist">
310 <copy todir="${packageDir}">
311 <fileset dir="${resourceDir}/images">
312 <include name="${WebStartImage}"/>
316 <taskdef classpathref="build.classpath" resource="com/roxes/tools/ant/taskdefs.properties" />
318 <!-- create a dummy jar which will eventually contain the jnlp template -->
319 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
320 <fileset dir="${packageDir}">
321 <include name="jalview.jar" />
325 <mkdir dir="${packageDir}/JNLP-INF"/>
326 <antcall target="writejnlpf">
327 <param name="jnlpFile" value="${packageDir}/JNLP-INF/APPLICATION-TEMPLATE.JNLP"/>
328 <param name="inih" value="*" />
329 <param name="maxh" value="*"/>
332 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
333 <fileset dir="${packageDir}">
334 <include name="JNLP-INF/APPLICATION-TEMPLATE.JNLP" />
338 <antcall target="writejnlpf">
339 <param name="jnlpFile" value="${packageDir}/jalview.jnlp"/>
340 <param name="inih" value="10M" />
341 <param name="maxh" value="256M"/>
344 <antcall target="writejnlpf">
345 <param name="jnlpFile" value="${packageDir}/jalview_1G.jnlp"/>
346 <param name="inih" value="128M" />
347 <param name="maxh" value="512M"/>
350 <antcall target="writejnlpf">
351 <param name="jnlpFile" value="${packageDir}/jalview_2G.jnlp"/>
352 <param name="inih" value="256M" />
353 <param name="maxh" value="1024M"/>
356 <!-- finally, need to postprocess to add in associations at end of 'information' element
358 <xslt in="${packageDir}/jalview_noa_1G.jnlp" out="${packageDir}/jalview_1G.jnlp">
365 <association mime-type="application-x/ext-file" extensions="fa"/>
366 <association mime-type="application-x/ext-file" extensions="fasta"/>
367 <association mime-type="application-x/ext-file" extensions="mfa"/>
368 <association mime-type="application-x/ext-file" extensions="fastq"/>
369 <association mime-type="application-x/ext-file" extensions="blc"/>
370 <association mime-type="application-x/ext-file" extensions="msf"/>
371 <association mime-type="application-x/ext-file" extensions="pfam"/>
372 <association mime-type="application-x/ext-file" extensions="aln"/>
373 <association mime-type="application-x/ext-file" extensions="pir"/>
374 <association mime-type="application-x/ext-file" extensions="amsa"/>
375 <association mime-type="application-x/ext-file" extensions="stk"/>
376 <association mime-type="application-x/ext-file" extensions="jar"/>-->
377 <!-- and sign the jars -->
378 <!-- the default keystore details might need to be edited here -->
379 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false" sigalg="SHA1withRSA">
380 <fileset dir="${packageDir}">
381 <include name="*.jar" />
386 <target name="runenv" depends="init">
387 <path id="run.classpath">
388 <pathelement location="${outputDir}" />
389 <fileset dir="${outputDir}">
390 <include name="${libDir}/*.jar" />
393 <pathconvert targetos="unix" refid="run.classpath" property="run.classpath" />
395 <echo>java -classpath ${run.classpath} jalview.bin.Jalview
399 <target name="-generatejnlpf">
400 <presetdef name="jnlpf">
401 <jnlp codebase="${WebStartLocation}">
403 <title>Jalview</title>
404 <vendor>The Barton Group</vendor>
405 <homepage href="http://www.jalview.org" />
406 <description>Jalview Multiple Alignment Editor</description>
407 <description kind="short">Jalview</description>
408 <icon href="${WebStartImage}" />
412 <j2se version="${j2sev}" initial_heap_size="${inih}" max_heap_size="${maxh}" />
413 <fileset dir="${packageDir}">
414 <include name="jalview.jar" />
416 <fileset dir="${packageDir}">
417 <include name="*.jar" />
418 <include name="*_*.jar" />
419 <exclude name="jalview.jar" />
420 <exclude name="*jnilib.jar"/>
423 <resources os="Mac OS X">
424 <property name="jalview.version" value="${JALVIEW_VERSION}" />
425 <fileset dir="${packageDir}">
426 <include name="*quaqua*.jnilib.jar"/>
430 <application_desc main_class="jalview.bin.Jalview">
438 <jnlpf toFile="${jnlpFile}"/>
442 <target name="-dofakejnlpfileassoc" depends="-generatejnlpf" if="nojnlpfileassocs">
443 <echo message="Not adding JNLP File Associations"/>
446 <target name="-dojnlpfileassoc" depends="-generatejnlpf" unless="nojnlpfileassocs">
447 <replace file="${jnlpFile}">
449 <![CDATA[</information>]]></replacetoken>
452 <association mime-type="application-x/ext-file" extensions="fa" />
453 <association mime-type="application-x/ext-file" extensions="fasta" />
454 <association mime-type="application-x/ext-file" extensions="mfa" />
455 <association mime-type="application-x/ext-file" extensions="fastq" />
456 <association mime-type="application-x/ext-file" extensions="blc" />
457 <association mime-type="application-x/ext-file" extensions="msf" />
458 <association mime-type="application-x/ext-file" extensions="pfam" />
459 <association mime-type="application-x/ext-file" extensions="aln"/>
460 <association mime-type="application-x/ext-file" extensions="pir"/>
461 <association mime-type="application-x/ext-file" extensions="amsa"/>
462 <association mime-type="application-x/ext-file" extensions="stk"/>
463 <association mime-type="application-x/ext-file" extensions="jvp"/>
464 </information>]]></replacevalue>
466 <echo message="Added file associations to JNLP file"/>
468 <target name="writejnlpf" depends="-dojnlpfileassoc,-dofakejnlpfileassoc">
471 <target name="buildextclients" depends="init">
472 <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" />
473 <condition property="dontextbuild">
474 <equals arg1="n" arg2="${doextbuild.response}" />
476 <condition property="dontextbuild">
477 <equals arg1="N" arg2="${doextbuild.response}" />
479 <fail if="dontextbuild">
480 Build External Client Code process aborted by user. Jalview source is unchanged.
482 <!-- Currently, this doesn't happen automatically.
483 1. Run WSDL2Java as below, which generates an ext.vamsas +
484 vamsas.<datapackages> fileset.
485 2. refactor ext.vamsas.SpecificserviceWS* to
486 ext.vamsas.ServiceclassWS* that implements the ServiceclassWSI interface.
487 3. Update the jalview.ws.*WServices classes to reflect the
488 interface type, and all locations of this wsdl type that Jalview
492 <path id="axisbuild">
493 <path refid="build.classpath" />
495 <taskdef resource="axis-tasks.properties" classpathref="axisbuild" />
497 <fileset dir="${sourceDir}" id="client">
498 <include name="${wsdl.ClientNS}/*.*" />
502 <axis-wsdl2java output="${sourceDir}" verbose="true" url="${wsdl.MsaWS2}" serverside="false" deployscope="Request" debug="false" helpergen="true" all="true">
504 <mapping namespace="${wsdl.Namespace}" package="${wsdl.ClientNS}" />
505 <mapping namespace="http://dataTypes.vamsas" package="${wsdl.ClientNS}" />
510 <target name="makedist" depends="build, buildPropertiesFile, buildindices">
511 <!-- make the package jar if not already existing -->
512 <mkdir dir="${packageDir}" />
513 <!-- clean dir if it already existed -->
515 <fileset dir="${packageDir}">
516 <include name="*.jar"/>
519 <jar destfile="${packageDir}/${outputJar}" index="true">
521 <attribute name="Main-Class" value="jalview.bin.Jalview" />
522 <attribute name="Permissions" value="all-permissions" />
523 <attribute name="Application-Name" value="Jalview Desktop" />
524 <attribute name="Codebase" value="${application.codebase}" />
526 <fileset dir="${outputDir}/">
527 <exclude name="cache*/**" />
528 <exclude name="*.jar" />
529 <exclude name="*.jar.*" />
530 <exclude name="**/*.jar" />
531 <exclude name="**/*.jar.*" />
535 <copy toDir="${packageDir}" flatten="true">
536 <fileset dir="${outputDir}">
537 <include name="*.jar" />
538 <include name="**/*.jar" />
544 <!-- jalopy code reformatter -->
545 <target name="sourcescrub" depends="init,build">
546 <jalopy destdir="jsrc" classpathref="run.classpath" convention="jalview-jalopy.xml">
547 <fileset dir="${sourceDir}">
548 <include name="*.java" />
549 <include name="**/*.java" />
550 <include name="**/**/*.java" />
557 <!-- Compile, package and obfuscate Jalview Applet -->
558 <target name="makeApplet" depends="obfuscate" description="assemble the final jalviewLite applet jar with or without obfuscation"/>
560 <target name="compileApplet" depends="init,clean">
561 <mkdir dir="${outputDir}" />
562 <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}"
563 classpathref="jalviewlite.deps" includes="jalview/appletgui/**"
564 excludes="ext/**,gui/**,jbgui/**,MCview/**,org/**,vamsas/**,jalview/ext/rbvi/**,jalview/ext/paradise/**" />
567 <target name="packageApplet" depends="compileApplet, buildPropertiesFile">
568 <copy file="${resourceDir}/images/idwidth.gif" toFile="${outputDir}/images/idwidth.gif" />
569 <copy file="${resourceDir}/images/link.gif" toFile="${outputDir}/images/link.gif" />
570 <copy todir="${outputDir}/lang">
571 <fileset dir="${resourceDir}/lang">
572 <include name="**.*"/>
575 <jar destfile="in.jar" index="true">
577 <attribute name="Main-Class" value="jalview.bin.JalviewLite" />
578 <attribute name="Application-Name" value="JalviewLite" />
579 <attribute name="Codebase" value="${applet.codebase}" />
581 <fileset dir="${outputDir}">
582 <include name="com/**" />
583 <include name="MCview/**" />
584 <include name="jalview/**" />
585 <include name=".build_properties" />
586 <include name="images/idwidth.gif" />
587 <include name="images/link.gif" />
588 <include name="lang/**" />
592 <target name="obfuscate" depends="-obfuscatefake,-obfuscatereally">
594 <target name="-obfuscatefake" depends="packageApplet" if="donotobfuscate">
595 <copy file="in.jar" tofile="${jalviewLiteJar}" overwrite="true" />
596 <delete file="in.jar" />
598 <target name="-obfuscatereally" unless="donotobfuscate">
600 <path id="obfuscateDeps.path">
601 <pathelement location="${applet.jre.tools}" />
602 <pathelement location="appletlib/${jmolJar}" />
603 <pathelement location="appletlib/${jsonSimple}" />
604 <pathelement location="appletlib/${javaJson}" />
606 <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
609 <injar file="in.jar" />
610 <outjar file="${jalviewLiteJar}" />
611 <libraryjar refid="obfuscateDeps.path" />
613 <keep access="public" type="class" name="jalview.bin.JalviewLite">
614 <field access="public" />
615 <method access="public" />
616 <constructor access="public" />
618 <keep access="public" type="class" name="jalview.appletgui.AlignFrame">
619 <field access="public" />
620 <method access="public" />
621 <constructor access="public" />
623 <!-- -libraryjars "${obfuscateDeps}"
625 -outjars jalviewApplet.jar
626 -keep public class jalview.bin.JalviewLite
629 <delete file="in.jar" />
632 <target name="castorbinding" depends="init" description="Generate Java bindings to supported Jalview XML models.">
633 <taskdef name="castor-srcgen" classname="org.castor.anttask.CastorCodeGenTask" classpathref="build.classpath" />
635 <fileset dir="${sourceDir}/jalview/schemabinding/version2">
636 <include name="*.java" />
637 <include name="descriptors/*.java" />
640 <castor-srcgen file="${schemaDir}/vamsas.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
641 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
642 <castor-srcgen file="${schemaDir}/JalviewWsParamSet.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
643 <castor-srcgen file="${schemaDir}/jalview.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
645 now build the jalview.binding package with the old schema set
648 <fileset dir="${sourceDir}/jalview/binding/">
649 <include name="**" />
652 <castor-srcgen file="${schemaDir}/vamsasJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
653 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
654 <castor-srcgen file="${schemaDir}/jalviewJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
656 <target name="sourcedist" description="create jalview source distribution" depends="init">
657 <delete file="${source.dist.name}" />
658 <tar destfile="${source.dist.name}" compression="gzip">
659 <tarfileset dir="./" prefix="jalview" preserveLeadingSlashes="true">
660 <include name="LICENSE" />
661 <include name="README" />
662 <include name="build.xml" />
663 <include name="jalview-jalopy.xml" />
664 <include name="JalviewApplet.jpx" />
665 <include name="JalviewX.jpx" />
666 <include name="nbbuild.xml"/>
667 <include name="nbproject/genfiles.properties"/>
668 <include name="nbproject/project.properties"/>
669 <include name="nbproject/project.xml"/>
670 <include name="${sourceDir}/*.java" />
671 <include name="${sourceDir}/**/*.java" />
672 <include name="${sourceDir}/**/*.cdr" />
673 <include name="${libDir}/**/*" />
674 <include name="${resourceDir}/**/*" />
675 <include name="${helpDir}/**/*" />
676 <include name="appletlib/${jmolJar}" />
677 <exclude name="**/*locales" />
678 <exclude name="*locales/**" />
679 <exclude name="utils/InstallAnywhere/**Build.iap_xml" />
680 <exclude name="utils/InstallAnywhere/**Build*/**" />
681 <exclude name="utils/InstallAnywhere/**Build*/**" />
682 <exclude name="utils/InstallAnywhere/**locale*" />
683 <exclude name="utils/InstallAnywhere/**locale*/**" />
684 <include name="${schemaDir}/**/*" />
685 <include name="utils/**/*" />
686 <include name="${docDir}/**/*" />
687 <include name="examples/**/*" />
691 <target name="pubapplet" description="installs the jalviewLite applet and dependent jars into an applet examples directory built under ${outputDir}" depends="makeApplet">
692 <copy todir="${packageDir}/examples">
693 <fileset dir="examples">
694 <include name="**/*"/>
695 <include name="javascript/*"/>
696 <include name="jmol/*"/>
699 <include name="${jalviewLiteJar}" />
701 <fileset dir="appletlib">
702 <include name="**/*"/>
705 <jar update="true" index="true" jarfile="${packageDir}/examples/${jalviewLiteJar}"/>
706 <jar update="true" index="true" jarfile="${packageDir}/examples/${javaJson}"/>
707 <jar update="true" index="true" jarfile="${packageDir}/examples/${jsonSimple}"/>
708 <jar update="true" index="true" jarfile="${packageDir}/examples/${jmolJar}">
710 <attribute name="Application-Name" value="Jmol (bundled with JalviewLite)"/>
711 <!-- <attribute name="Permissions" value="sandbox" /> -->
712 <!--<attribute name="Trusted-Lib" value="true" /> -->
713 <attribute name="Codebase" value="${applet.codebase}"/>
714 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}"/>
717 <signjar sigalg="SHA1WithRSA" storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
718 <fileset dir="${packageDir}/examples">
719 <include name="*.jar" />
722 <presetdef name="ap_applet.jar">
723 <!-- build a signed applet with 'all-permissions' -
724 Needs 'param name="permissions' value="all-permissions"' in applet tag
725 JalviewLite+JmolApplet linked sequence/structure fails
726 Mixed code warnings are raised
728 <jar update="true" index="true">
730 <attribute name="Application-Name" value="JalviewLite" />
731 <attribute name="Permissions" value="all-permissions" />
732 <attribute name="Codebase" value="${applet.codebase}" />
733 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
734 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
738 <presetdef name="applet.jar">
739 <!-- build signed applet with sandbox permissions -
740 Needs 'param name="permissions' value="sandbox"' in applet tag
741 Preserves Pre-Java 1.7_u45 behavior once 'permissions' parameter added to applet tag
744 <jar update="true" index="true">
746 <attribute name="Application-Name" value="JalviewLite" />
747 <attribute name="Permissions" value="sandbox" />
748 <attribute name="Codebase" value="${applet.codebase}" />
749 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
750 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
754 <presetdef name="tl_applet.jar">
755 <!-- build signed applet with trusted library/trusted permissions -
756 Needs 'param name="permissions' value="all-permissions"' in applet tag
758 No mixed code warnings raised
759 Jmol/JalviewLite sequence/structure example doesn't link structures
760 Raises dialog asking user to allow page to control applet via LiveConnect javascript
764 <jar update="true" index="true">
766 <attribute name="Application-Name" value="JalviewLite" />
767 <attribute name="Permissions" value="all-permissions" />
768 <attribute name="Codebase" value="${applet.codebase}" />
769 <attribute name="Trusted-Only" value="true" />
770 <attribute name="Trusted-Library" value="true" />
774 <presetdef name="to_applet.jar">
775 <!-- not fully test variant (yet) -->
776 <jar update="true" index="true">
778 <attribute name="Application-Name" value="JalviewLite" />
779 <attribute name="Permissions" value="all-permissions" />
780 <attribute name="Codebase" value="${applet.codebase}" />
781 <attribute name="Trusted-Only" value="true" />
785 <!-- create differently privileged artefacts -->
786 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/u_${jalviewLiteJar}" />
787 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true"/>
788 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/u_${javaJson}" overwrite="true"/>
789 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/u_${jsonSimple}" overwrite="true"/>
790 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/ap_${jalviewLiteJar}" />
791 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/ap_${jmolJar}"/>
792 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/ap_${javaJson}"/>
793 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/ap_${jsonSimple}"/>
794 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jalviewLiteJar}" />
795 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jmolJar}" />
796 <ap_applet.jar jarfile="${packageDir}/examples/ap_${javaJson}" />
797 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jsonSimple}" />
798 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/tl_${jalviewLiteJar}" />
799 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/tl_${jmolJar}" />
800 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/tl_${javaJson}" />
801 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/tl_${jsonSimple}" />
802 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jalviewLiteJar}" />
803 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jmolJar}" />
804 <tl_applet.jar jarfile="${packageDir}/examples/tl_${javaJson}" />
805 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jsonSimple}" />
806 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/to_${jalviewLiteJar}" />
807 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/to_${jmolJar}" />
808 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/to_${javaJson}" />
809 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/to_${jsonSimple}" />
810 <to_applet.jar jarfile="${packageDir}/examples/to_${jalviewLiteJar}" />
811 <to_applet.jar jarfile="${packageDir}/examples/to_${jmolJar}" />
812 <to_applet.jar jarfile="${packageDir}/examples/to_${javaJson}" />
813 <to_applet.jar jarfile="${packageDir}/examples/to_${jsonSimple}" />
814 <!-- finally, create manifest for original jars -->
815 <applet.jar jarfile="${packageDir}/examples/${jalviewLiteJar}" />
816 <applet.jar jarfile="${packageDir}/examples/${jmolJar}" />
817 <applet.jar jarfile="${packageDir}/examples/${javaJson}" />
818 <applet.jar jarfile="${packageDir}/examples/${jsonSimple}" />
820 <!-- todo - write examples/downloads for alternate versions of the applet -->
821 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
823 <fileset dir="${packageDir}/examples">
824 <exclude name="u_*.jar"/>
825 <include name="${jalviewLiteJar}" />
826 <include name="${jmolJar}" />
827 <include name="${javaJson}" />
828 <include name="${jsonSimple}" />
829 <include name="to_${jalviewLiteJar}" />
830 <include name="to_${jmolJar}" />
831 <include name="to_${javaJson}" />
832 <include name="to_${jsonSimple}" />
833 <include name="tl_${jalviewLiteJar}" />
834 <include name="tl_${jmolJar}" />
835 <include name="tl_${javaJson}" />
836 <include name="tl_${jsonSimple}" />
837 <include name="ap_${jalviewLiteJar}" />
838 <include name="ap_${jmolJar}" />
839 <include name="ap_${javaJson}" />
840 <include name="ap_${jsonSimple}" />
843 <!-- bizarre bug causes JmolApplet to always get signed, even if excluded from above. so copy explicitly -->
844 <copy file="appletlib/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true" />
845 <!-- finally, replace any launchApp servlet tags with a version specification -->
846 <replace value="http://www.jalview.org/services/launchApp?version=${JALVIEW_VERSION}"">
847 <replacetoken><![CDATA[http://www.jalview.org/services/launchApp"]]></replacetoken>
848 <fileset dir="${packageDir}/examples">
849 <include name="**/*.html"/>
852 <replace value="http://www.jalview.org/services/launchApp?version=${JALVIEW_VERSION}'">
853 <replacetoken><![CDATA[http://www.jalview.org/services/launchApp']]></replacetoken>
854 <fileset dir="${packageDir}/examples">
855 <include name="**/*.html"/>
860 <target name="sourcedoc" description="Create jalview source documentation pages" depends="init">
861 <javadoc destdir="${javadocDir}">
862 <packageset dir="${sourceDir}" includes="jalview/*,MCView/*">