3 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
4 * Copyright (C) $$Year-Rel$$ The Jalview Authors
6 * This file is part of Jalview.
8 * Jalview is free software: you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
18 * The Jalview Authors are detailed in the 'AUTHORS' file.
20 <project name="jalviewX" default="usage" basedir=".">
21 <target name="help" depends="usage" />
22 <target name="usage" depends="init">
23 <echo message="~~~Jalview Ant build.xml Usage~~~~" />
24 <echo message="Targets include:" />
25 <echo message="usage - default target, displays this message" />
26 <echo message="buildindices - generates JavaHelpSearch from the help files" />
27 <echo message="build - compiles all necessary files for Application" />
28 <echo message="makedist - compiles and places all necessary jar files into directory dist" />
29 <echo message="makefulldist - signs all jar files and builds jnlp file for full distribution" />
30 <echo message=" this needs a keystore and key. Add -Dtimestamp to timestamp signed jars"/>
31 <echo message=" See docs/building.html for more information." />
32 <echo message="compileApplet - compiles all necessary files for Applet" />
33 <echo message="makeApplet - compiles, then packages and obfuscates the Applet" />
34 <echo message="testng - run jalview's tests via testNG. Default group is '${testng-groups}'" />
35 <echo message=" you can specify particular test groups as a list via -Dtestng-groups=" />
36 <echo message="See docs/building.html and the comments in build file for other targets." />
37 <echo message="note: compile and makeApplet require the property java118.home to be set to point to a java 1.1.8 jdk." />
38 <echo message="Useful -D flags: -Ddonotobfuscate will prevent applet obfuscation" />
42 <!-- utils is a class path to additional utilities needed for
43 building docs, jars and webstart stuff -->
45 Userdefined build property defaults
47 wsdl.server list (plus namespace mapping info ???) - also want
48 ... to make this a dynamically generatable property
50 Build location - provide a temporary root for speed
51 jarsigner keystore and info
52 Jakarta and axis classpath ?
53 Default argument for starting Jalview (if it exists).
58 <path id="axis.classpath">
60 <fileset dir="/usr/local/axis/lib">
61 <include name="**/*.jar" />
63 <fileset dir="/usr/local/jakarta-tomcat-5/webapps/axis/WEB-INF/lib">
64 <include name="**/*.jar"/>
65 <include name="*.jar"/>
69 <!-- Jalview Version String displayed by application on startup and used to check for updates -->
70 <property name="JALVIEW_VERSION" value="DEVELOPMENT" />
72 <property name="INSTALLATION" value="Source" />
74 <!-- 2.4 (VAMSAS)" -->
75 <!-- Include debugging information in javac true or false -->
76 <property name="javac.debug" value="true" />
78 <!-- JarSigner Key Store for Webstart Distribution -->
79 <property name="jalview.keystore" value="./keys/.keystore" />
80 <!-- Keystore Password -->
81 <property name="jalview.keystore.pass" value="alignmentisfun" />
83 <property name="jalview.key" value="jalview" />
85 <property name="jalview.key.pass" value="alignmentisfun" />
86 <!-- time stamp server URL -->
87 <property name="jalview.tsaurl" value="" />
88 <!-- locally valid proxy for signing with external time server -->
89 <property name="proxyPort" value="80"/>
90 <property name="proxyHost" value="sqid"/>
92 <!-- default TestNG groups to run -->
93 <property name="testng-groups" value="Functional" />
95 <!-- Don't change anything below here unless you know what you are doing! -->
96 <!-- Url path for WebStart in JNLP file -->
97 <property name="WebStartLocation" value="http://www.jalview.org/webstart" />
98 <!-- Webstart Image - looked for in resources/images -->
99 <property name="WebStartImage" value="JalviewLogo_big.png" />
100 <!-- J2SE version needed for webstart launch -->
101 <!-- Anne's version needs 1.7 - should rebuild VARNA to java 1.6 for release -->
102 <property name="j2sev" value="1.7+" />
103 <!-- Java Compilation settings - source and target javac version -->
104 <property name="javac.source" value="1.7" />
105 <property name="javac.target" value="1.7" />
107 <!-- Permissions for running Java applets and applications. -->
108 <!-- Defaults are those suitable for deploying jalview webstart www.jalview.org -->
109 <property name="application.codebase" value="*.jalview.org" />
110 <!-- and allowing the applet to be deployed from any URL -->
111 <!-- 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 -->
112 <property name="applet.codebase" value="*.jalview.org *.dundee.ac.uk *" />
113 <property name="applet.caller-codebase" value="${applet.codebase}" />
115 <!-- build directory configuration -->
116 <property name="libDir" value="lib" />
117 <property name="resourceDir" value="resources" />
118 <property name="helpDir" value="help" />
119 <property name="docDir" value="doc" />
120 <property name="sourceDir" value="src" />
121 <property name="schemaDir" value="schemas" />
122 <property name="outputDir" value="classes" />
123 <property name="packageDir" value="dist" />
124 <property name="outputJar" value="jalview.jar" />
125 <!-- Jalview Applet JMol Jar Dependency -->
126 <property name="jmolJar" value="JmolApplet-14.2.14_2015.06.11.jar" />
127 <property name="varnaJar" value="VARNAv3-93.jar" />
128 <property name="jsoup" value="jsoup-1.8.1.jar" />
129 <property name="jsonSimple" value="json_simple-1.1.jar" />
130 <property name="javaJson" value="java-json.jar" />
131 <property name="jalviewLiteJar" value="jalviewApplet.jar" />
132 <property name="reportDir" value="test-reports" />
133 <property name="testDir" value="test" />
134 <property name="testOutputDir" value="tests" />
135 <!-- switch to indicate if we should obfuscate jalviewLite -->
136 <!-- <property name="donotobfuscate" value="true"/> -->
137 <!-- switch to exclude associations from generated jnlp files -->
138 <!-- <property name="nojnlpfileassocs" value="true"/> -->
140 <!-- Jalview Web Service Clients - see the comments in 'buildextclients' for details -->
141 <property name="wsdl.File" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred?wsdl" />
142 <property name="wsdl.Files" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/vamsas?wsdlFiles" />
143 <property name="wsdl.MsaWS" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/MuscleWS?wsdl" />
144 <property name="wsdl.MsaWS2" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/ClustalWS?wsdl" />
145 <property name="WSInterf" value="MsaWS" />
146 <property name="wsdl.Namespace" value="vamsas" />
147 <property name="wsdl.ClientNS" value="ext.vamsas" />
148 <!-- the class path for building the application -->
149 <path id="build.classpath">
150 <fileset dir="utils">
151 <include name="*.jar" />
152 <include name="**/*.jar" />
154 <fileset dir="${libDir}">
155 <include name="*.jar" />
156 <include name="**/*.jar" />
158 <fileset dir="${java.home}/lib">
159 <include name="plugin.jar" />
161 <fileset dir="appletlib">
162 <!-- the JmolApplet includes the JmolApplet console and the application javac seems to always try and build all packages
164 <include name="${jmolJar}" />
165 <include name="${varnaJar}" />
168 <path id="test.classpath">
169 <pathelement path="${outputDir}" />
170 <path refid="build.classpath" />
172 <property name="source.dist.name" value="${basedir}/jalview-src.tar.gz" />
173 <!-- The Location of the java 1.1.8 jdk -->
174 <!--<property name="java118.home" value="C:\Sun\jdk1.1.8" /> -->
175 <property name="java118.home" value="${java.home}" />
176 <!-- <property name="applet.jre.tools" value="${java118.home}/lib/classes.zip" />
178 <!-- jre for 1.4 version -->
179 <property name="applet.jre.tools" value="${java.home}/lib/rt.jar" />
181 <!-- the classpath for building the 1.1 applet -->
182 <path id="jalviewlite.deps">
183 <fileset dir="${java118.home}">
184 <include name="lib/classes.zip" />
186 <fileset dir="${java.home}/lib">
187 <include name="plugin.jar" />
189 <pathelement location="appletlib/${jmolJar}" />
190 <pathelement location="lib/${varnaJar}" />
191 <pathelement location="appletlib/${jsoup}" />
192 <pathelement location="appletlib/${jsonSimple}" />
193 <pathelement location="appletlib/${javaJson}" />
196 <!-- default location for outputting javadoc -->
197 <property name="javadocDir" value="${packageDir}/javadoc" />
201 <taskdef classpath="utils/roxes-ant-tasks-1.2-2004-01-30.jar" resource="com/roxes/tools/ant/taskdefs.properties" />
202 <target name="buildPropertiesFile" depends="init">
203 <tstamp prefix="build">
204 <format property="date" pattern="dd MMMM yyyy" />
206 <exec executable="/usr/bin/git" outputproperty="git.commit" failifexecutionfails="false">
207 <arg value="rev-parse" />
208 <arg value="--short" />
211 <exec executable="/usr/bin/git" outputproperty="git.branch" failifexecutionfails="false">
212 <arg value="rev-parse" />
213 <arg value="--abbrev-ref" />
216 <properties file="${outputDir}/.build_properties">
218 ---Jalview Build Details---
220 <property name="VERSION" value="${JALVIEW_VERSION}" />
221 <property name="INSTALLATION" value="${INSTALLATION} git-commit:${git.commit} [${git.branch}]" />
222 <property name="BUILD_DATE" value="${build.date}" />
227 <target name="clean" depends="init">
228 <!-- not efficient yet. -->
229 <delete dir="${outputDir}" includes="*,**/*" />
232 <target name="distclean" depends="init, clean">
234 <echo message="REMOVING ALL BACKUP/AUTOSAVES!" />
237 <include name="${outputJar}" />
238 <include name="#*#" />
239 <include name="#*.*#" />
240 <include name="**/#*#" />
241 <include name="**/#*.*#" />
242 <include name="*~" />
243 <include name="*.*~" />
244 <include name="**/*~" />
245 <include name="**/*.*~" />
250 <target name="prepare" depends="init">
251 <mkdir dir="${outputDir}" />
252 <copy todir="${outputDir}">
254 <include name="${docDir}/**/*.*" />
255 <include name="${helpDir}/**/*.*" />
256 <include name="${libDir}/*.jar" />
258 <fileset dir="${resourceDir}">
259 <include name="**/*.*" />
264 <target name="build" depends="prepare">
265 <!-- not efficient yet. -->
266 <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="build.classpath">
267 <exclude name="jalview/*applet*" />
268 <exclude name="jalview/appletgui/**" />
269 <exclude name="com/stevesoft/**" />
274 <target name="testclean" depends="init">
275 <delete dir="${testOutputDir}" includes="*,**/*" />
278 <target name="prepareTests" depends="init,testclean">
279 <mkdir dir="${testOutputDir}" />
282 <target name="buildTests" depends="build,buildindices,prepareTests">
283 <javac source="${javac.source}" target="${javac.target}" srcdir="${testDir}" destdir="${testOutputDir}" debug="${javac.debug}" classpathref="test.classpath" includeantruntime="false">
287 <taskdef resource="testngtasks" classpath="utils/testnglibs/testng.jar" />
289 <target name="testng" depends="buildTests">
290 <testng outputDir="${reportDir}" haltOnFailure="false" groups="${testng-groups}" mode="testng"
293 <pathelement location="${testOutputDir}" />
294 <path refid="test.classpath" />
296 <classfileset dir="${testOutputDir}" includes="**/*.class" />
300 <target name="buildindices" depends="init, prepare" unless="help.uptodate">
301 <java classname="com.sun.java.help.search.Indexer" classpathref="build.classpath" fork="true" dir="${outputDir}/${helpDir}">
306 <target name="preparejnlp" depends="makedist">
307 <copy todir="${packageDir}">
308 <fileset dir="${resourceDir}/images">
309 <include name="${WebStartImage}" />
313 <taskdef classpathref="build.classpath" resource="com/roxes/tools/ant/taskdefs.properties" />
315 <!-- create a dummy jar which will eventually contain the jnlp template -->
316 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
317 <fileset dir="${packageDir}">
318 <include name="jalview.jar" />
322 <mkdir dir="${packageDir}/JNLP-INF" />
323 <antcall target="writejnlpf">
324 <param name="jnlpFile" value="${packageDir}/JNLP-INF/APPLICATION-TEMPLATE.JNLP" />
325 <param name="inih" value="*" />
326 <param name="maxh" value="*" />
329 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
330 <fileset dir="${packageDir}">
331 <include name="JNLP-INF/APPLICATION-TEMPLATE.JNLP" />
335 <antcall target="writejnlpf">
336 <param name="jnlpFile" value="${packageDir}/jalview.jnlp" />
337 <param name="inih" value="10M" />
338 <param name="maxh" value="256M" />
341 <antcall target="writejnlpf">
342 <param name="jnlpFile" value="${packageDir}/jalview_1G.jnlp" />
343 <param name="inih" value="128M" />
344 <param name="maxh" value="512M" />
347 <antcall target="writejnlpf">
348 <param name="jnlpFile" value="${packageDir}/jalview_2G.jnlp" />
349 <param name="inih" value="256M" />
350 <param name="maxh" value="1024M" />
353 <!-- finally, need to postprocess to add in associations at end of 'information' element
355 <xslt in="${packageDir}/jalview_noa_1G.jnlp" out="${packageDir}/jalview_1G.jnlp">
362 <association mime-type="application-x/ext-file" extensions="fa"/>
363 <association mime-type="application-x/ext-file" extensions="fasta"/>
364 <association mime-type="application-x/ext-file" extensions="mfa"/>
365 <association mime-type="application-x/ext-file" extensions="fastq"/>
366 <association mime-type="application-x/ext-file" extensions="blc"/>
367 <association mime-type="application-x/ext-file" extensions="msf"/>
368 <association mime-type="application-x/ext-file" extensions="pfam"/>
369 <association mime-type="application-x/ext-file" extensions="aln"/>
370 <association mime-type="application-x/ext-file" extensions="pir"/>
371 <association mime-type="application-x/ext-file" extensions="amsa"/>
372 <association mime-type="application-x/ext-file" extensions="stk"/>
373 <association mime-type="application-x/ext-file" extensions="jar"/>-->
376 <target name="-jarsignwithtsa" depends="makedist,preparejnlp" if="timestamp">
377 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false" sigalg="SHA1withRSA"
378 tsaproxyhost="${proxyHost}" tsaproxyport="${proxyPort}" tsaurl="${jalview.tsaurl}">
379 <fileset dir="${packageDir}">
380 <include name="*.jar" />
384 <target name="-jarsignnotsa" depends="makedist,preparejnlp" unless="timestamp">
385 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false" sigalg="SHA1withRSA">
386 <fileset dir="${packageDir}">
387 <include name="*.jar" />
392 <target name="makefulldist" depends="makedist,preparejnlp,-jarsignwithtsa,-jarsignnotsa">
393 <!-- and sign the jars -->
394 <!-- the default keystore details might need to be edited here -->
397 <target name="runenv" depends="init">
398 <path id="run.classpath">
399 <pathelement location="${outputDir}" />
400 <fileset dir="${outputDir}">
401 <include name="${libDir}/*.jar" />
404 <pathconvert targetos="unix" refid="run.classpath" property="run.classpath" />
406 <echo>java -classpath ${run.classpath} jalview.bin.Jalview
410 <target name="-generatejnlpf">
411 <presetdef name="jnlpf">
412 <jnlp codebase="${WebStartLocation}">
414 <title>Jalview</title>
415 <vendor>The Barton Group</vendor>
416 <homepage href="http://www.jalview.org" />
417 <description>Jalview Multiple Alignment Editor</description>
418 <description kind="short">Jalview</description>
419 <icon href="${WebStartImage}" />
423 <j2se version="${j2sev}" initial_heap_size="${inih}" max_heap_size="${maxh}" />
424 <fileset dir="${packageDir}">
425 <include name="jalview.jar" />
427 <fileset dir="${packageDir}">
428 <include name="*.jar" />
429 <include name="*_*.jar" />
430 <exclude name="jalview.jar" />
431 <exclude name="*jnilib.jar" />
433 <property name="jalview.version" value="${JALVIEW_VERSION}" />
435 <resources os="Mac OS X">
436 <fileset dir="${packageDir}">
437 <include name="*quaqua*.jnilib.jar" />
441 <application_desc main_class="jalview.bin.Jalview">
449 <jnlpf toFile="${jnlpFile}" />
453 <target name="-dofakejnlpfileassoc" depends="-generatejnlpf" if="nojnlpfileassocs">
454 <echo message="Not adding JNLP File Associations" />
457 <target name="-dojnlpfileassoc" depends="-generatejnlpf" unless="nojnlpfileassocs">
458 <replace file="${jnlpFile}">
460 <![CDATA[</information>]]></replacetoken>
463 <association mime-type="application-x/ext-file" extensions="fa" />
464 <association mime-type="application-x/ext-file" extensions="fasta" />
465 <association mime-type="application-x/ext-file" extensions="mfa" />
466 <association mime-type="application-x/ext-file" extensions="fastq" />
467 <association mime-type="application-x/ext-file" extensions="blc" />
468 <association mime-type="application-x/ext-file" extensions="msf" />
469 <association mime-type="application-x/ext-file" extensions="pfam" />
470 <association mime-type="application-x/ext-file" extensions="aln"/>
471 <association mime-type="application-x/ext-file" extensions="pir"/>
472 <association mime-type="application-x/ext-file" extensions="amsa"/>
473 <association mime-type="application-x/ext-file" extensions="stk"/>
474 <association mime-type="application-x/ext-file" extensions="jvp"/>
475 </information>]]></replacevalue>
477 <echo message="Added file associations to JNLP file" />
479 <target name="writejnlpf" depends="-dojnlpfileassoc,-dofakejnlpfileassoc">
482 <target name="buildextclients" depends="init">
483 <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" />
484 <condition property="dontextbuild">
485 <equals arg1="n" arg2="${doextbuild.response}" />
487 <condition property="dontextbuild">
488 <equals arg1="N" arg2="${doextbuild.response}" />
490 <fail if="dontextbuild">
491 Build External Client Code process aborted by user. Jalview source is unchanged.
493 <!-- Currently, this doesn't happen automatically.
494 1. Run WSDL2Java as below, which generates an ext.vamsas +
495 vamsas.<datapackages> fileset.
496 2. refactor ext.vamsas.SpecificserviceWS* to
497 ext.vamsas.ServiceclassWS* that implements the ServiceclassWSI interface.
498 3. Update the jalview.ws.*WServices classes to reflect the
499 interface type, and all locations of this wsdl type that Jalview
503 <path id="axisbuild">
504 <path refid="build.classpath" />
506 <taskdef resource="axis-tasks.properties" classpathref="axisbuild" />
508 <fileset dir="${sourceDir}" id="client">
509 <include name="${wsdl.ClientNS}/*.*" />
513 <axis-wsdl2java output="${sourceDir}" verbose="true" url="${wsdl.MsaWS2}" serverside="false" deployscope="Request" debug="false" helpergen="true" all="true">
515 <mapping namespace="${wsdl.Namespace}" package="${wsdl.ClientNS}" />
516 <mapping namespace="http://dataTypes.vamsas" package="${wsdl.ClientNS}" />
521 <target name="makedist" depends="build, buildPropertiesFile, buildindices">
522 <!-- make the package jar if not already existing -->
523 <mkdir dir="${packageDir}" />
524 <!-- clean dir if it already existed -->
526 <fileset dir="${packageDir}">
527 <include name="*.jar" />
530 <jar destfile="${packageDir}/${outputJar}" index="true">
532 <attribute name="Main-Class" value="jalview.bin.Jalview" />
533 <attribute name="Permissions" value="all-permissions" />
534 <attribute name="Application-Name" value="Jalview Desktop" />
535 <attribute name="Codebase" value="${application.codebase}" />
537 <fileset dir="${outputDir}/">
538 <exclude name="cache*/**" />
539 <exclude name="*.jar" />
540 <exclude name="*.jar.*" />
541 <exclude name="**/*.jar" />
542 <exclude name="**/*.jar.*" />
546 <copy toDir="${packageDir}" flatten="true">
547 <fileset dir="${outputDir}">
548 <include name="*.jar" />
549 <include name="**/*.jar" />
555 <!-- jalopy code reformatter -->
556 <target name="sourcescrub" depends="init,build">
557 <jalopy destdir="jsrc" classpathref="run.classpath" convention="jalview-jalopy.xml">
558 <fileset dir="${sourceDir}">
559 <include name="*.java" />
560 <include name="**/*.java" />
561 <include name="**/**/*.java" />
568 <!-- Compile, package and obfuscate Jalview Applet -->
569 <target name="makeApplet" depends="obfuscate" description="assemble the final jalviewLite applet jar with or without obfuscation" />
571 <target name="compileApplet" depends="init,clean">
572 <mkdir dir="${outputDir}" />
573 <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="jalviewlite.deps" includes="jalview/appletgui/**" excludes="ext/**,gui/**,jbgui/**,MCview/**,org/**,vamsas/**,jalview/ext/rbvi/**,jalview/ext/paradise/**,jalview/ext/ensembl/**,jalview/ext/so" />
576 <target name="packageApplet" depends="compileApplet, buildPropertiesFile">
577 <copy file="${resourceDir}/images/idwidth.gif" toFile="${outputDir}/images/idwidth.gif" />
578 <copy file="${resourceDir}/images/link.gif" toFile="${outputDir}/images/link.gif" />
579 <copy todir="${outputDir}/lang">
580 <fileset dir="${resourceDir}/lang">
581 <include name="**.*" />
584 <jar destfile="in.jar" index="true">
586 <attribute name="Main-Class" value="jalview.bin.JalviewLite" />
587 <attribute name="Application-Name" value="JalviewLite" />
588 <attribute name="Codebase" value="${applet.codebase}" />
590 <fileset dir="${outputDir}">
591 <include name="com/**" />
592 <include name="MCview/**" />
593 <include name="jalview/**" />
594 <include name=".build_properties" />
595 <include name="images/idwidth.gif" />
596 <include name="images/link.gif" />
597 <include name="lang/**" />
601 <target name="obfuscate" depends="-obfuscatefake,-obfuscatereally">
603 <target name="-obfuscatefake" depends="packageApplet" if="donotobfuscate">
604 <copy file="in.jar" tofile="${jalviewLiteJar}" overwrite="true" />
605 <delete file="in.jar" />
607 <target name="-obfuscatereally" unless="donotobfuscate">
609 <path id="obfuscateDeps.path">
610 <pathelement location="${applet.jre.tools}" />
611 <pathelement location="appletlib/${jmolJar}" />
612 <pathelement location="lib/${varnaJar}" />
613 <pathelement location="appletlib/${jsoup}" />
614 <pathelement location="appletlib/${jsonSimple}" />
615 <pathelement location="appletlib/${javaJson}" />
616 <fileset dir="${java.home}/lib">
617 <include name="plugin.jar" />
620 <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
622 <proguard verbose="true" >
623 <injar file="in.jar" />
624 <outjar file="${jalviewLiteJar}" />
625 <libraryjar refid="obfuscateDeps.path" />
627 <keep access="public" type="class" name="jalview.bin.JalviewLite">
628 <field access="public" />
629 <method access="public" />
630 <constructor access="public" />
632 <keep access="public" type="class" name="jalview.appletgui.AlignFrame">
633 <field access="public" />
634 <method access="public" />
635 <constructor access="public" />
638 <keep name="jalview.json.binding**">
643 <keep access="public" type="class" name="MCview.PDBfile">
644 <field access="public" />
645 <method access="public" />
646 <constructor access="public" />
649 <keep access="public" type="class" name="jalview.ws.jws1.Annotate3D">
650 <field access="public" />
651 <method access="public" />
652 <constructor access="public" />
655 <keep access="public" type="class" name="jalview.ext.jmol.JmolParser">
656 <field access="public" />
657 <method access="public" />
658 <constructor access="public" />
662 <!-- -libraryjars "${obfuscateDeps}"
664 -outjars jalviewApplet.jar
665 -keep public class jalview.bin.JalviewLite
668 <delete file="in.jar" />
671 <target name="castorbinding" depends="init" description="Generate Java bindings to supported Jalview XML models.">
672 <taskdef name="castor-srcgen" classname="org.castor.anttask.CastorCodeGenTask" classpathref="build.classpath" />
674 <fileset dir="${sourceDir}/jalview/schemabinding/version2">
675 <include name="*.java" />
676 <include name="descriptors/*.java" />
679 <castor-srcgen file="${schemaDir}/vamsas.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
680 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
681 <castor-srcgen file="${schemaDir}/JalviewWsParamSet.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
682 <castor-srcgen file="${schemaDir}/jalview.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
684 now build the jalview.binding package with the old schema set
687 <fileset dir="${sourceDir}/jalview/binding/">
688 <include name="**" />
691 <castor-srcgen file="${schemaDir}/vamsasJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
692 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
693 <castor-srcgen file="${schemaDir}/jalviewJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
695 <target name="sourcedist" description="create jalview source distribution" depends="init">
696 <delete file="${source.dist.name}" />
697 <tar destfile="${source.dist.name}" compression="gzip">
698 <tarfileset dir="./" prefix="jalview" preserveLeadingSlashes="true">
699 <include name="LICENSE" />
700 <include name="README" />
701 <include name="build.xml" />
702 <include name="jalview-jalopy.xml" />
703 <include name="JalviewApplet.jpx" />
704 <include name="JalviewX.jpx" />
705 <include name="nbbuild.xml" />
706 <include name="nbproject/genfiles.properties" />
707 <include name="nbproject/project.properties" />
708 <include name="nbproject/project.xml" />
709 <include name="${sourceDir}/*.java" />
710 <include name="${sourceDir}/**/*.java" />
711 <include name="${sourceDir}/**/*.cdr" />
712 <include name="${libDir}/**/*" />
713 <include name="${resourceDir}/**/*" />
714 <include name="${helpDir}/**/*" />
715 <include name="appletlib/${jmolJar}" />
716 <include name="appletlib/${jsonSimple}" />
717 <include name="appletlib/${javaJson}" />
718 <exclude name="**/*locales" />
719 <exclude name="*locales/**" />
720 <exclude name="utils/InstallAnywhere/**Build.iap_xml" />
721 <exclude name="utils/InstallAnywhere/**Build*/**" />
722 <exclude name="utils/InstallAnywhere/**Build*/**" />
723 <exclude name="utils/InstallAnywhere/**locale*" />
724 <exclude name="utils/InstallAnywhere/**locale*/**" />
725 <include name="${schemaDir}/**/*" />
726 <include name="utils/**/*" />
727 <include name="${docDir}/**/*" />
728 <include name="examples/**/*" />
732 <target name="prepubapplet_1" depends="makeApplet">
733 <copy todir="${packageDir}/examples">
734 <fileset dir="examples">
735 <include name="**/*" />
736 <include name="javascript/*" />
737 <include name="jmol/*" />
740 <include name="${jalviewLiteJar}" />
742 <fileset dir="appletlib">
743 <include name="**/*" />
746 <jar update="true" index="true" jarfile="${packageDir}/examples/${jalviewLiteJar}" />
747 <jar update="true" index="true" jarfile="${packageDir}/examples/${javaJson}" />
748 <jar update="true" index="true" jarfile="${packageDir}/examples/${jsonSimple}" />
749 <jar update="true" index="true" jarfile="${packageDir}/examples/${jmolJar}">
751 <attribute name="Application-Name" value="Jmol (bundled with JalviewLite)" />
752 <!-- <attribute name="Permissions" value="sandbox" /> -->
753 <!--<attribute name="Trusted-Lib" value="true" /> -->
754 <attribute name="Codebase" value="${applet.codebase}" />
755 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
759 <presetdef name="ap_applet.jar">
760 <!-- build a signed applet with 'all-permissions' -
761 Needs 'param name="permissions' value="all-permissions"' in applet tag
762 JalviewLite+JmolApplet linked sequence/structure fails
763 Mixed code warnings are raised
765 <jar update="true" index="true">
767 <attribute name="Application-Name" value="JalviewLite" />
768 <attribute name="Permissions" value="all-permissions" />
769 <attribute name="Codebase" value="${applet.codebase}" />
770 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
771 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
775 <presetdef name="applet.jar">
776 <!-- build signed applet with sandbox permissions -
777 Needs 'param name="permissions' value="sandbox"' in applet tag
778 Preserves Pre-Java 1.7_u45 behavior once 'permissions' parameter added to applet tag
781 <jar update="true" index="true">
783 <attribute name="Application-Name" value="JalviewLite" />
784 <attribute name="Permissions" value="sandbox" />
785 <attribute name="Codebase" value="${applet.codebase}" />
786 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
787 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
791 <presetdef name="tl_applet.jar">
792 <!-- build signed applet with trusted library/trusted permissions -
793 Needs 'param name="permissions' value="all-permissions"' in applet tag
795 No mixed code warnings raised
796 Jmol/JalviewLite sequence/structure example doesn't link structures
797 Raises dialog asking user to allow page to control applet via LiveConnect javascript
801 <jar update="true" index="true">
803 <attribute name="Application-Name" value="JalviewLite" />
804 <attribute name="Permissions" value="all-permissions" />
805 <attribute name="Codebase" value="${applet.codebase}" />
806 <attribute name="Trusted-Only" value="true" />
807 <attribute name="Trusted-Library" value="true" />
811 <presetdef name="to_applet.jar">
812 <!-- not fully test variant (yet) -->
813 <jar update="true" index="true">
815 <attribute name="Application-Name" value="JalviewLite" />
816 <attribute name="Permissions" value="all-permissions" />
817 <attribute name="Codebase" value="${applet.codebase}" />
818 <attribute name="Trusted-Only" value="true" />
822 <!-- create differently privileged artefacts -->
823 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/u_${jalviewLiteJar}" />
824 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true" />
825 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/u_${javaJson}" overwrite="true" />
826 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/u_${jsonSimple}" overwrite="true" />
827 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/ap_${jalviewLiteJar}" />
828 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/ap_${jmolJar}" />
829 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/ap_${javaJson}" />
830 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/ap_${jsonSimple}" />
831 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jalviewLiteJar}" />
832 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jmolJar}" />
833 <ap_applet.jar jarfile="${packageDir}/examples/ap_${javaJson}" />
834 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jsonSimple}" />
835 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/tl_${jalviewLiteJar}" />
836 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/tl_${jmolJar}" />
837 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/tl_${javaJson}" />
838 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/tl_${jsonSimple}" />
839 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jalviewLiteJar}" />
840 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jmolJar}" />
841 <tl_applet.jar jarfile="${packageDir}/examples/tl_${javaJson}" />
842 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jsonSimple}" />
843 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/to_${jalviewLiteJar}" />
844 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/to_${jmolJar}" />
845 <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/to_${javaJson}" />
846 <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/to_${jsonSimple}" />
847 <to_applet.jar jarfile="${packageDir}/examples/to_${jalviewLiteJar}" />
848 <to_applet.jar jarfile="${packageDir}/examples/to_${jmolJar}" />
849 <to_applet.jar jarfile="${packageDir}/examples/to_${javaJson}" />
850 <to_applet.jar jarfile="${packageDir}/examples/to_${jsonSimple}" />
851 <!-- finally, create manifest for original jars -->
852 <applet.jar jarfile="${packageDir}/examples/${jalviewLiteJar}" />
853 <applet.jar jarfile="${packageDir}/examples/${jmolJar}" />
854 <applet.jar jarfile="${packageDir}/examples/${javaJson}" />
855 <applet.jar jarfile="${packageDir}/examples/${jsonSimple}" />
857 <!-- todo - write examples/downloads for alternate versions of the applet
858 probably don't need to do this now since we don't have alternate versions anymore !-->
860 <target name="-signapplet" depends="prepubapplet_1">
861 <fileset id="signappletjarset" dir="${packageDir}/examples">
862 <exclude name="u_*.jar" />
863 <include name="${jalviewLiteJar}" />
864 <include name="${jmolJar}" />
865 <include name="${javaJson}" />
866 <include name="${jsonSimple}" />
867 <include name="to_${jalviewLiteJar}" />
868 <include name="to_${jmolJar}" />
869 <include name="to_${javaJson}" />
870 <include name="to_${jsonSimple}" />
871 <include name="tl_${jalviewLiteJar}" />
872 <include name="tl_${jmolJar}" />
873 <include name="tl_${javaJson}" />
874 <include name="tl_${jsonSimple}" />
875 <include name="ap_${jalviewLiteJar}" />
876 <include name="ap_${jmolJar}" />
877 <include name="ap_${javaJson}" />
878 <include name="ap_${jsonSimple}" />
881 <target name="-signappletnotsa" unless="timestamp" depends="-signapplet">
882 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
883 <fileset refid="signappletjarset" />
887 <target name="-signapplettsa" if="timestamp" depends="-signapplet">
888 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false" tsaproxyhost="${proxyHost}" tsaproxyport="${proxyPort}" tsaurl="${jalview.tsaurl}">
889 <fileset refid="signappletjarset" />
893 <target name="signApplet" description="internal target to sign applet" depends="-signappletnotsa,-signapplettsa" />
895 <target name="pubapplet" description="installs the jalviewLite applet and dependent jars into an applet examples directory built under ${outputDir}" depends="makeApplet, signApplet">
897 <!-- bizarre bug causes JmolApplet to always get signed, even if excluded from above. so copy explicitly -->
898 <copy file="appletlib/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true" />
899 <copy file="appletlib/${jsonSimple}" tofile="${packageDir}/examples/u_${jsonSimple}" overwrite="true" />
900 <copy file="appletlib/${javaJson}" tofile="${packageDir}/examples/u_${javaJson}" overwrite="true" />
901 <!-- finally, replace any launchApp servlet tags with a version specification -->
902 <replace value="http://www.jalview.org/services/launchApp?version=${JALVIEW_VERSION}"">
904 <![CDATA[http://www.jalview.org/services/launchApp"]]>
906 <fileset dir="${packageDir}/examples">
907 <include name="**/*.html" />
910 <replace value="http://www.jalview.org/services/launchApp?version=${JALVIEW_VERSION}'">
912 <![CDATA[http://www.jalview.org/services/launchApp']]>
914 <fileset dir="${packageDir}/examples">
915 <include name="**/*.html" />
920 <target name="sourcedoc" description="Create jalview source documentation pages" depends="init">
921 <javadoc destdir="${javadocDir}">
922 <packageset dir="${sourceDir}" includes="jalview/*,MCView/*">