Added clustalW 'realignment' (primitive)
[jalview.git] / build.xml
1 <?xml version="1.0"?>
2   <project name="jalviewX" default="build" basedir=".">
3     <!-- utils is a class path to additional utilities needed for
4     building docs, jars and webstart stuff -->
5
6 <!--
7         Userdefined build property defaults
8
9         wsdl.server list (plus namespace mapping info ???)  - also want
10                 ... to make this a dynamically generatable property
11         WebStart Location
12         Build location - provide a temporary root for speed
13         jarsigner keystore and info
14         Jakarta and axis classpath ?
15         Default argument for starting Jalview (if it exists).
16
17 -->
18
19     <target name="init">
20       <path id="axis.classpath">
21 <!-->        <fileset dir="/usr/local/axis/lib">
22           <include name="**/*.jar" />
23         </fileset>
24         <fileset dir="/usr/local/jakarta-tomcat-5/webapps/axis/WEB-INF/lib">
25           <include name="**/*.jar"/>
26           <include name="*.jar"/>
27         </fileset> -->
28       </path>
29
30       <property name="" value=""/>
31       <property name="libDir" value="lib"/>
32       <property name="resourceDir" value="resources"/>
33       <property name="helpDir" value="help"/>
34       <property name="docDir" value="doc"/>
35       <property name="sourceDir" value="src" />
36       <property name="outputDir" value="classes" />
37       <property name="packageDir" value="dist" />
38       <property name="outputJar" value="jalview.jar" />
39       <property name="wsdl.File" value="http://anaplog.compbio.dundee.ac.uk:8080/axis/services/jpred?wsdl" />
40       <property name="wsdl.Files" value="http://anaplog.compbio.dundee.ac.uk:8080/axis/services/vamsas?wsdlFiles" />
41       <property name="wsdl.MsaWS" value="http://anaplog.compbio.dundee.ac.uk:8080/axis/services/MuscleWS?wsdl" />
42       <property name="wsdl.MsaWS2" value="http://anaplog.compbio.dundee.ac.uk:8080/axis/services/ClustalWS?wsdl" />
43       <property name="wsdl.MsaWS2" value="http://anaplog.compbio.dundee.ac.uk:8080/axis/services/ClustalWS?wsdl" />
44         <property name="WSInterf" value="MsaWS" />
45       <property name="WebStartLocation" value="http://www.compbio.dundee.ac.uk/~jimp/jalviewtest"/>
46       <property name="wsdl.Namespace" value="vamsas" />
47       <property name="wsdl.ClientNS" value="ext.vamsas" />
48
49       <path id="build.classpath">
50         <fileset dir="utils">
51           <include name="*.jar"/>
52           <include name="**/*.jar"/>
53         </fileset>
54         <fileset dir="${libDir}">
55           <include name="*.jar"/>
56           <include name="**/*.jar"/>
57         </fileset>
58 <!--        <fileset dir="old_lib_signed">
59 <include name="lib_axis.jar"/>
60
61         </fileset>-->
62       </path>
63       <!-->    <uptodate property="help.uptodate"
64       targetfile="${helpDir}/helpIndex.xml">
65       <srcfiles
66                  dir="${helpDir}"
67                  includes="**/*.html" />
68                </uptodate>
69       -->
70     </target>
71
72     <target name="clean" depends="init">
73       <!-- not efficient yet. -->
74       <delete dir="${outputDir}"/>
75     </target>
76
77     <target name="distclean" depends="init, clean">
78
79       <echo message="REMOVING ALL BACKUP/AUTOSAVES!"/>
80       <delete>
81         <fileset dir=".">
82           <include name="${outputJar}"/>
83           <include name="#*#"/>
84           <include name="#*.*#"/>
85           <include name="**/#*#"/>
86           <include name="**/#*.*#"/>
87           <include name="*~"/>
88           <include name="*.*~"/>
89           <include name="**/*~"/>
90           <include name="**/*.*~"/>
91         </fileset>
92       </delete>
93     </target>
94
95     <target name="prepare" depends="init">
96       <mkdir dir="${outputDir}"/>
97       <copy todir="${outputDir}">
98         <fileset dir=".">
99
100           <include name="${docDir}/**/*.*"/>
101           <include name="${helpDir}/**/*.*"/>
102           <include name="${libDir}/*.*"/>
103         </fileset>
104         <fileset dir="${resourceDir}">
105           <include name="**/*.*"/>
106         </fileset>
107       </copy>
108     </target>
109
110     <target name="build" depends="prepare">
111       <!-- not efficient yet. -->
112       <javac source="1.4" target="1.4" srcdir="${sourceDir}" destdir="${outputDir}"
113       classpathref="build.classpath" />
114     </target>
115     <target name="buildindices" depends="init, prepare"
116     unless="help.uptodate">
117     <java
118       classname="com.sun.java.help.search.Indexer"
119       classpathref="build.classpath"
120       fork="true"
121       dir="${outputDir}/${helpDir}"
122       >
123       <arg line="html"/>
124     </java>
125     </target>
126
127     <target name="makejars" depends="build, buildindices">
128       <!-- make the package jar -->
129       <mkdir dir="${packageDir}"/>
130
131       <jar destfile="${packageDir}/${outputJar}">
132         <fileset dir="${outputDir}/">
133           <exclude name="*.jar" />
134           <exclude name="*.jar.*" />
135           <exclude name="**/*.jar" />
136           <exclude name="**/*.jar.*" />
137         </fileset>
138       </jar>
139
140       <copy toDir="${packageDir}" flatten="true">
141         <fileset dir="${outputDir}">
142           <include name="*.jar"/>
143           <include name="**/*.jar"/>
144         </fileset>
145       </copy>
146
147       <signjar
148       storepass="alignmentisfun"
149       keypass="alignmentisfun"
150       keystore="keys/.keystore"
151       alias="jalview"
152       lazy="false"
153       verbose="false"
154       >
155
156       <fileset dir="${packageDir}">
157         <include name="*.jar"/>
158       </fileset>
159       </signjar>
160       <taskdef classpathref="build.classpath" resource="com/roxes/tools/ant/taskdefs.properties"/>
161
162       <!--    codebase="http://www.jalview.org/jalview/webstart" -->
163       <jnlp toFile="${packageDir}/Jalview.jnlp" href="Jalview.jnlp"
164       codebase="${WebStartLocation}">
165       <information>
166         <title>Jalview</title>
167         <vendor>Barton Group</vendor>
168         <homepage href="www.jalview.org"/>
169         <description>Jalview Multiple Alignment Editor</description>
170         <description kind="short">Jalview</description>
171         <icon href="BartonGroupBanner.gif"/>
172       </information>
173         <resources>
174           <j2se version="1.3+"/>
175           <fileset dir="${packageDir}">
176             <include name="jalview.jar"/>
177           </fileset>
178           <fileset dir="${packageDir}">
179             <include name="*.jar"/>
180             <exclude name="jalview.jar"/>
181           </fileset>
182         </resources>
183         <application_desc main_class="jalview.bin.Jalview">
184           <argument>http://www.compbio.dundee.ac.uk/~andrew/jalview/glut.msf</argument>
185         </application_desc>
186         <security>
187           <all_permissions/>
188         </security>
189       </jnlp>
190     </target>
191     <target name="runenv" depends="init">
192       <path id="run.classpath">
193         <pathelement location="${outputDir}"/>
194         <fileset dir="${outputDir}">
195           <include name="${libDir}/*.jar"/>
196         </fileset>
197       </path>
198       <pathconvert targetos="unix" refid="run.classpath" property="run.classpath"/>
199
200       <echo>java -classpath ${run.classpath} jalview.bin.Jalview
201       </echo>
202     </target>
203
204     <target name="buildextclients" depends="init">
205 <!-- Currently, we do not do this automatically.
206      1. Run WSDL2Java as below, which generates an ext.vamsas +
207      vamsas.<datapackages> fileset.
208      2. refactor ext.vamsas.SpecificserviceWS* to
209      ext.vamsas.ServiceclassWS* that implements the ServiceclassWSI interface.
210      3. Update the jalview.ws.*WServices classes to reflect the
211      interface type, and all locations of this wsdl type that Jalview
212      might be using.
213      
214 -->
215       <path id="axisbuild">
216         <!--        <path refid="axis.classpath"/> -->
217         <path refid="build.classpath"/>
218       </path>
219       <taskdef resource="axis-tasks.properties" classpathref="axisbuild"/>
220       <move todir="./bak">
221         <fileset dir="${sourceDir}" id="client">
222           <include name="${wsdl.ClientNS}/*.*"/>
223         </fileset>
224       </move>
225
226       <axis-wsdl2java
227       output="${sourceDir}"
228       verbose="true"
229       url="${wsdl.MsaWS2}"
230       serverside="false"
231       deployscope="Request"
232       debug="false"
233       helpergen="true"
234       all="true"
235       >
236       <mappingSet>
237         <mapping
238         namespace="${wsdl.Namespace}"
239         package="${wsdl.ClientNS}"
240         />
241         <mapping namespace="http://dataTypes.vamsas"
242         package="${wsdl.ClientNS}"/>
243         </mappingSet>
244     </axis-wsdl2java>
245
246   </target>
247   <target name="package" depends="init, build">
248
249   </target>
250 </project>