2 <project name="jalviewX" default="usage" basedir=".">
3 <!-- we use jalopy to format our sources -->
5 classname="de.hunsicker.jalopy.plugin.ant.AntPlugin">
7 <fileset dir="utils/jalopy/lib">
8 <include name="*.jar" />
14 <echo message="~~~Jalview Ant build.xml Usage~~~~"/>
15 <echo message="Targets available:"/>
16 <echo message="usage - default target, displays this message"/>
17 <echo message="buildindices - generates JavaHelpSearch from the help files"/>
18 <echo message="build - compiles all necessary files for Application"/>
19 <echo message="makedist - compiles and places all necessary jar files into directory dist"/>
20 <echo message="makefulldist - signs all jar files and builds jnlp file for full distribution"/>
21 <echo message="compileApplet - compiles all necessary files for Applet"/>
22 <echo message="makeApplet - compiles, then packages and obfuscates the Applet"/>
26 <!-- utils is a class path to additional utilities needed for
27 building docs, jars and webstart stuff -->
30 Userdefined build property defaults
32 wsdl.server list (plus namespace mapping info ???) - also want
33 ... to make this a dynamically generatable property
35 Build location - provide a temporary root for speed
36 jarsigner keystore and info
37 Jakarta and axis classpath ?
38 Default argument for starting Jalview (if it exists).
43 <path id="axis.classpath">
44 <!--> <fileset dir="/usr/local/axis/lib">
45 <include name="**/*.jar" />
47 <fileset dir="/usr/local/jakarta-tomcat-5/webapps/axis/WEB-INF/lib">
48 <include name="**/*.jar"/>
49 <include name="*.jar"/>
53 <property name="JALVIEW_VERSION" value="ANNOTATION_TEST"/>
54 <property name="" value=""/>
55 <property name="libDir" value="lib"/>
56 <property name="resourceDir" value="resources"/>
57 <property name="helpDir" value="help"/>
58 <property name="docDir" value="doc"/>
59 <property name="sourceDir" value="src" />
60 <property name="outputDir" value="classes" />
61 <property name="packageDir" value="dist" />
62 <property name="outputJar" value="jalview.jar" />
63 <property name="wsdl.File" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred?wsdl" />
64 <property name="wsdl.Files" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/vamsas?wsdlFiles" />
65 <property name="wsdl.MsaWS" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/MuscleWS?wsdl" />
66 <property name="wsdl.MsaWS2" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/ClustalWS?wsdl" />
67 <property name="wsdl.MsaWS2" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/ClustalWS?wsdl" />
68 <property name="WSInterf" value="MsaWS" />
69 <property name="WebStartLocation" value="http://www.jalview.org/webstart"/>
70 <property name="wsdl.Namespace" value="vamsas" />
71 <property name="wsdl.ClientNS" value="ext.vamsas" />
73 <path id="build.classpath">
75 <include name="*.jar"/>
76 <include name="**/*.jar"/>
78 <fileset dir="${libDir}">
79 <include name="*.jar"/>
80 <include name="**/*.jar"/>
82 <!-- <fileset dir="old_lib_signed">
83 <include name="lib_axis.jar"/>
87 <!--> <uptodate property="help.uptodate"
88 targetfile="${helpDir}/helpIndex.xml">
91 includes="**/*.html" />
97 <taskdef classpath="utils/roxes-ant-tasks-1.2-2004-01-30.jar" resource="com/roxes/tools/ant/taskdefs.properties"/>
98 <target name="buildPropertiesFile" depends="init">
99 <tstamp prefix="build">
100 <format property="date" pattern="dd MMMM yyyy"/>
102 <properties file="${outputDir}/.build_properties">
104 ---Jalview Build Details---
106 <property name="VERSION" value="${JALVIEW_VERSION}"/>
107 <property name="BUILD_DATE" value="${build.date}"/>
112 <target name="clean" depends="init">
113 <!-- not efficient yet. -->
114 <delete dir="${outputDir}"/>
117 <target name="distclean" depends="init, clean">
119 <echo message="REMOVING ALL BACKUP/AUTOSAVES!"/>
122 <include name="${outputJar}"/>
123 <include name="#*#"/>
124 <include name="#*.*#"/>
125 <include name="**/#*#"/>
126 <include name="**/#*.*#"/>
128 <include name="*.*~"/>
129 <include name="**/*~"/>
130 <include name="**/*.*~"/>
135 <target name="prepare" depends="init">
136 <mkdir dir="${outputDir}"/>
137 <copy todir="${outputDir}">
139 <include name="${docDir}/**/*.*"/>
140 <include name="${helpDir}/**/*.*"/>
141 <include name="${libDir}/*.jar"/>
143 <fileset dir="${resourceDir}">
144 <include name="**/*.*"/>
149 <target name="build" depends="prepare">
150 <!-- not efficient yet. -->
151 <javac source="1.4" target="1.4"
152 srcdir ="${sourceDir}"
153 destdir="${outputDir}"
154 classpathref="build.classpath">
155 <exclude name="jalview/*applet*"/>
156 <exclude name="com/stevesoft/**"/>
159 <target name="buildindices" depends="init, prepare"
160 unless="help.uptodate">
162 classname="com.sun.java.help.search.Indexer"
163 classpathref="build.classpath"
165 dir="${outputDir}/${helpDir}"
171 <target name="makefulldist" depends="makedist">
172 <!-- the default keystore details might need to be edited here -->
174 storepass="alignmentisfun"
175 keypass="alignmentisfun"
176 keystore="keys/.keystore"
182 <fileset dir="${packageDir}">
183 <include name="*.jar"/>
186 <taskdef classpathref="build.classpath" resource="com/roxes/tools/ant/taskdefs.properties"/>
188 <!-- codebase="http://www.jalview.org/jalview/webstart" -->
189 <jnlp toFile="${packageDir}/jalview.jnlp" href="jalview.jnlp"
190 codebase="${WebStartLocation}">
192 <title>Jalview</title>
193 <vendor>The Barton Group</vendor>
194 <homepage href="http://www.jalview.org"/>
195 <description>Jalview Multiple Alignment Editor</description>
196 <description kind="short">Jalview</description>
197 <icon href="logo_big.gif"/>
200 <association mime-type="application-x/ext-file" extensions="fa"/>
201 <association mime-type="application-x/ext-file" extensions="fasta"/>
202 <association mime-type="application-x/ext-file" extensions="fastq"/>
203 <association mime-type="application-x/ext-file" extensions="blc"/>
204 <association mime-type="application-x/ext-file" extensions="msf"/>
205 <association mime-type="application-x/ext-file" extensions="pfam"/>
206 <association mime-type="application-x/ext-file" extensions="aln"/>
207 <association mime-type="application-x/ext-file" extensions="pir"/>
211 <j2se version="1.4+"/>
212 <fileset dir="${packageDir}">
213 <include name="jalview.jar"/>
215 <fileset dir="${packageDir}">
216 <include name="*.jar"/>
217 <exclude name="jalview.jar"/>
219 <property name="jalview.version" value="${JALVIEW_VERSION}"/>
221 <application_desc main_class="jalview.bin.Jalview">
228 <target name="runenv" depends="init">
229 <path id="run.classpath">
230 <pathelement location="${outputDir}"/>
231 <fileset dir="${outputDir}">
232 <include name="${libDir}/*.jar"/>
235 <pathconvert targetos="unix" refid="run.classpath" property="run.classpath"/>
237 <echo>java -classpath ${run.classpath} jalview.bin.Jalview
241 <target name="buildextclients" depends="init">
242 <!-- Currently, this doesn't happen automatically.
243 1. Run WSDL2Java as below, which generates an ext.vamsas +
244 vamsas.<datapackages> fileset.
245 2. refactor ext.vamsas.SpecificserviceWS* to
246 ext.vamsas.ServiceclassWS* that implements the ServiceclassWSI interface.
247 3. Update the jalview.ws.*WServices classes to reflect the
248 interface type, and all locations of this wsdl type that Jalview
252 <path id="axisbuild">
253 <!-- <path refid="axis.classpath"/> -->
254 <path refid="build.classpath"/>
256 <taskdef resource="axis-tasks.properties" classpathref="axisbuild"/>
258 <fileset dir="${sourceDir}" id="client">
259 <include name="${wsdl.ClientNS}/*.*"/>
264 output="${sourceDir}"
268 deployscope="Request"
275 namespace="${wsdl.Namespace}"
276 package="${wsdl.ClientNS}"
278 <mapping namespace="http://dataTypes.vamsas"
279 package="${wsdl.ClientNS}"/>
284 <target name="makedist" depends="build, buildPropertiesFile, buildindices">
285 <!-- make the package jar -->
286 <mkdir dir="${packageDir}"/>
288 <jar destfile="${packageDir}/${outputJar}">
290 <attribute name="Main-Class" value="jalview.bin.Jalview"/>
292 <fileset dir="${outputDir}/">
293 <exclude name="cache*/**"/>
294 <exclude name="*.jar" />
295 <exclude name="*.jar.*" />
296 <exclude name="**/*.jar" />
297 <exclude name="**/*.jar.*" />
301 <copy toDir="${packageDir}" flatten="true">
302 <fileset dir="${outputDir}">
303 <include name="*.jar"/>
304 <include name="**/*.jar"/>
311 <target name="package" depends="init, build">
314 <!-- jalopy code reformatter -->
315 <target name="sourcescrub" depends="init,build">
316 <jalopy destdir="jsrc" classpathref="run.classpath"
317 convention="jalview-jalopy.xml">
318 <fileset dir="${sourceDir}">
319 <include name="*.java"/>
320 <include name="**/*.java"/>
321 <include name="**/**/*.java"/>
328 <!-- Compile, package and obfuscate Jalview Applet -->
329 <target name="makeApplet" depends="obfuscate"/>
331 <target name="compileApplet" depends="init,clean">
332 <mkdir dir="${outputDir}"/>
333 <javac source="1.2" target="1.1" srcdir="${sourceDir}" destdir="${outputDir}"
334 includes="jalview/analysis/**,jalview/appletgui/**,jalview/datamodel/**jalview/jbappletgui/**,jalview/math/**,jalview/schemes/**"
335 excludes="ext/**,MCview/**,org/**,vamsas/**"/>
338 <target name="packageApplet" depends="compileApplet, buildPropertiesFile">
339 <copy file="${resourceDir}/images/idwidth.gif" toFile="${outputDir}/images/idwidth.gif"/>
340 <jar destfile="in.jar">
342 <attribute name="Main-Class" value="jalview.bin.JalviewLite"/>
344 <fileset dir="${outputDir}">
345 <include name="com/**"/>
346 <include name="MCview/**"/>
347 <include name="jalview/**"/>
348 <include name=".build_properties"/>
349 <include name="images/idwidth.gif"/>
354 <target name="obfuscate" depends="packageApplet">
355 <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
357 -libraryjars "${java.home}/lib/rt.jar"
359 -outjars jalviewApplet.jar
360 -keep public class jalview.bin.JalviewLite
363 <delete file="in.jar"/>