2 <project name="jalviewX" default="build" 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 <!-- utils is a class path to additional utilities needed for
15 building docs, jars and webstart stuff -->
18 Userdefined build property defaults
20 wsdl.server list (plus namespace mapping info ???) - also want
21 ... to make this a dynamically generatable property
23 Build location - provide a temporary root for speed
24 jarsigner keystore and info
25 Jakarta and axis classpath ?
26 Default argument for starting Jalview (if it exists).
31 <path id="axis.classpath">
32 <!--> <fileset dir="/usr/local/axis/lib">
33 <include name="**/*.jar" />
35 <fileset dir="/usr/local/jakarta-tomcat-5/webapps/axis/WEB-INF/lib">
36 <include name="**/*.jar"/>
37 <include name="*.jar"/>
41 <property name="JALVIEW_VERSION" value="2.03"/>
42 <property name="" value=""/>
43 <property name="libDir" value="lib"/>
44 <property name="resourceDir" value="resources"/>
45 <property name="helpDir" value="help"/>
46 <property name="docDir" value="doc"/>
47 <property name="sourceDir" value="src" />
48 <property name="outputDir" value="classes" />
49 <property name="packageDir" value="dist" />
50 <property name="outputJar" value="jalview.jar" />
51 <property name="wsdl.File" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred?wsdl" />
52 <property name="wsdl.Files" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/vamsas?wsdlFiles" />
53 <property name="wsdl.MsaWS" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/MuscleWS?wsdl" />
54 <property name="wsdl.MsaWS2" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/ClustalWS?wsdl" />
55 <property name="wsdl.MsaWS2" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/ClustalWS?wsdl" />
56 <property name="WSInterf" value="MsaWS" />
57 <property name="WebStartLocation" value="http://www.jalview.org/webstart"/>
58 <property name="wsdl.Namespace" value="vamsas" />
59 <property name="wsdl.ClientNS" value="ext.vamsas" />
61 <path id="build.classpath">
63 <include name="*.jar"/>
64 <include name="**/*.jar"/>
66 <fileset dir="${libDir}">
67 <include name="*.jar"/>
68 <include name="**/*.jar"/>
70 <!-- <fileset dir="old_lib_signed">
71 <include name="lib_axis.jar"/>
75 <!--> <uptodate property="help.uptodate"
76 targetfile="${helpDir}/helpIndex.xml">
79 includes="**/*.html" />
85 <taskdef classpath="utils/roxes-ant-tasks-1.2-2004-01-30.jar" resource="com/roxes/tools/ant/taskdefs.properties"/>
86 <target name="buildPropertiesFile" depends="init">
87 <tstamp prefix="build">
88 <format property="date" pattern="dd MMMM yyyy hh.mm aa"/>
90 <properties file="${outputDir}/.build_properties">
92 ---Jalview Build Details---
94 <property name="VERSION" value="${JALVIEW_VERSION}"/>
95 <property name="BUILD_DATE" value="${build.date}"/>
100 <target name="clean" depends="init">
101 <!-- not efficient yet. -->
102 <delete dir="${outputDir}"/>
105 <target name="distclean" depends="init, clean">
107 <echo message="REMOVING ALL BACKUP/AUTOSAVES!"/>
110 <include name="${outputJar}"/>
111 <include name="#*#"/>
112 <include name="#*.*#"/>
113 <include name="**/#*#"/>
114 <include name="**/#*.*#"/>
116 <include name="*.*~"/>
117 <include name="**/*~"/>
118 <include name="**/*.*~"/>
123 <target name="prepare" depends="init">
124 <mkdir dir="${outputDir}"/>
125 <copy todir="${outputDir}">
127 <include name="${docDir}/**/*.*"/>
128 <include name="${helpDir}/**/*.*"/>
129 <include name="${libDir}/*.jar"/>
131 <fileset dir="${resourceDir}">
132 <include name="**/*.*"/>
137 <target name="build" depends="prepare">
138 <!-- not efficient yet. -->
139 <javac source="1.4" target="1.4"
140 srcdir ="${sourceDir}"
141 destdir="${outputDir}"
142 classpathref="build.classpath">
143 <exclude name="jalview/*applet*"/>
144 <exclude name="com/stevesoft/**"/>
147 <target name="buildindices" depends="init, prepare"
148 unless="help.uptodate">
150 classname="com.sun.java.help.search.Indexer"
151 classpathref="build.classpath"
153 dir="${outputDir}/${helpDir}"
159 <target name="makejars" depends="build, buildPropertiesFile, buildindices">
160 <!-- make the package jar -->
161 <mkdir dir="${packageDir}"/>
163 <jar destfile="${packageDir}/${outputJar}">
164 <fileset dir="${outputDir}/">
165 <exclude name="cache*/**"/>
166 <exclude name="*.jar" />
167 <exclude name="*.jar.*" />
168 <exclude name="**/*.jar" />
169 <exclude name="**/*.jar.*" />
173 <copy toDir="${packageDir}" flatten="true">
174 <fileset dir="${outputDir}">
175 <include name="*.jar"/>
176 <include name="**/*.jar"/>
179 <!-- the default keystore details might need to be edited here -->
181 storepass="alignmentisfun"
182 keypass="alignmentisfun"
183 keystore="keys/.keystore"
189 <fileset dir="${packageDir}">
190 <include name="*.jar"/>
193 <taskdef classpathref="build.classpath" resource="com/roxes/tools/ant/taskdefs.properties"/>
195 <!-- codebase="http://www.jalview.org/jalview/webstart" -->
196 <jnlp toFile="${packageDir}/jalview.jnlp" href="jalview.jnlp"
197 codebase="${WebStartLocation}">
199 <title>Jalview</title>
200 <vendor>The Barton Group</vendor>
201 <homepage href="http://www.jalview.org"/>
202 <description>Jalview Multiple Alignment Editor</description>
203 <description kind="short">Jalview</description>
204 <icon href="logo_big.gif"/>
207 <association mime-type="application-x/ext-file" extensions="fa"/>
208 <association mime-type="application-x/ext-file" extensions="fasta"/>
209 <association mime-type="application-x/ext-file" extensions="fastq"/>
210 <association mime-type="application-x/ext-file" extensions="blc"/>
211 <association mime-type="application-x/ext-file" extensions="msf"/>
212 <association mime-type="application-x/ext-file" extensions="pfam"/>
213 <association mime-type="application-x/ext-file" extensions="aln"/>
214 <association mime-type="application-x/ext-file" extensions="pir"/>
218 <j2se version="1.4+"/>
219 <fileset dir="${packageDir}">
220 <include name="jalview.jar"/>
222 <fileset dir="${packageDir}">
223 <include name="*.jar"/>
224 <exclude name="jalview.jar"/>
226 <property name="jalview.version" value="${JALVIEW_VERSION}"/>
228 <application_desc main_class="jalview.bin.Jalview">
235 <target name="runenv" depends="init">
236 <path id="run.classpath">
237 <pathelement location="${outputDir}"/>
238 <fileset dir="${outputDir}">
239 <include name="${libDir}/*.jar"/>
242 <pathconvert targetos="unix" refid="run.classpath" property="run.classpath"/>
244 <echo>java -classpath ${run.classpath} jalview.bin.Jalview
248 <target name="buildextclients" depends="init">
249 <!-- Currently, this doesn't happen automatically.
250 1. Run WSDL2Java as below, which generates an ext.vamsas +
251 vamsas.<datapackages> fileset.
252 2. refactor ext.vamsas.SpecificserviceWS* to
253 ext.vamsas.ServiceclassWS* that implements the ServiceclassWSI interface.
254 3. Update the jalview.ws.*WServices classes to reflect the
255 interface type, and all locations of this wsdl type that Jalview
259 <path id="axisbuild">
260 <!-- <path refid="axis.classpath"/> -->
261 <path refid="build.classpath"/>
263 <taskdef resource="axis-tasks.properties" classpathref="axisbuild"/>
265 <fileset dir="${sourceDir}" id="client">
266 <include name="${wsdl.ClientNS}/*.*"/>
271 output="${sourceDir}"
275 deployscope="Request"
282 namespace="${wsdl.Namespace}"
283 package="${wsdl.ClientNS}"
285 <mapping namespace="http://dataTypes.vamsas"
286 package="${wsdl.ClientNS}"/>
291 <target name="package" depends="init, build">
294 <!-- jalopy code reformatter -->
295 <target name="sourcescrub" depends="init,build">
296 <jalopy destdir="jsrc" classpathref="run.classpath"
297 convention="jalview-jalopy.xml">
298 <fileset dir="${sourceDir}">
299 <include name="*.java"/>
300 <include name="**/*.java"/>
301 <include name="**/**/*.java"/>
308 <!-- Compile, package and obfuscate Jalview Applet -->
309 <target name="makeApplet" depends="obfuscate"/>
311 <target name="compileApplet" depends="init,clean">
312 <mkdir dir="${outputDir}"/>
313 <javac source="1.2" target="1.1" srcdir="${sourceDir}" destdir="${outputDir}"
314 includes="jalview/analysis/**,jalview/appletgui/**,jalview/datamodel/**jalview/jbappletgui/**,jalview/math/**,jalview/schemes/**"
315 excludes="ext/**,MCview/**,org/**,vamsas/**"/>
318 <target name="packageApplet" depends="compileApplet, buildPropertiesFile">
319 <jar destfile="in.jar">
320 <fileset dir="${outputDir}">
321 <include name="com/**"/>
322 <include name="jalview/**"/>
323 <include name=".build_properties"/>
324 <include name="${resourceDir}/images/idwidth.gif"/>
329 <target name="obfuscate" depends="packageApplet">
330 <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
332 -libraryjars "${java.home}/lib/rt.jar"
334 -outjars jalviewApplet.jar
335 -keep public class jalview.bin.JalviewLite
337 <delete file="in.jar"/>