source: trunk/build.xml @ 1359

Revision 1359, 18.4 KB checked in by curtis, 14 years ago (diff)

List ome-java.jar as a dependency of Bio-Formats.

Line 
1<!--
2build.xml
3
4Master ant build file for all Java software projects at LOCI.
5Download Apache Ant from http://ant.apache.org/.
6Type "ant -p" for a list of targets.
7
8===============================================================================
9This build file handles the following projects:
10
11Bio-Formats
12    JAR file:      bio-formats.jar
13    Folders:       loci/formats
14                   loci/formats/*
15    Main class:    loci.formats.ImageViewer
16    Dependencies:  ome-java.jar
17    Targets:       jar-formats
18    License:       LGPL
19
20VisBio
21    JAR file:      visbio.jar
22    Folders:       loci/visbio
23                   loci/visbio/*
24    Main class:    loci.visbio.VisBio
25    Dependencies:  bio-formats.jar
26                   commons-httpclient-2.0-rc2.jar (ome-java.jar)
27                   commons-logging.jar (ome-java.jar)
28                   forms-1.0.4.jar
29                   ij.jar
30                   looks-1.2.2.jar
31                   ome-java.jar
32                   visad-lite.jar
33                   xmlrpc-1.2-b1.jar (ome-java.jar)
34    Targets:       jar-visbio
35                   source-visbio
36                   docs-visbio
37                   dist-visbio
38    License:       GPL
39
40LOCI Plugins for ImageJ
41    JAR file:      loci_plugins.jar
42    Folders:       loci/plugins
43                   loci/plugins/*
44                   loci/ome/viewer (temporary)
45    Main class:    loci.plugins.About
46    IJ plugins:    loci.plugins.browser.LociDataBrowser
47                   loci.plugins.LociImporter
48                   loci.plugins.LociExporter
49                   loci.plugins.ome.OMEPlugin
50    Dependencies:  bio-formats.jar
51                   commons-httpclient-2.0-rc2.jar (ome-java.jar)
52                   commons-logging.jar (ome-java.jar)
53                   ome-java.jar
54                   xmlrpc-1.2-b1.jar (ome-java.jar)
55    Targets:       jar-plugins
56    License:       LGPL
57
58OME Metadata Notebook
59    JAR file:      ome-notebook.jar
60    Folders:       loci/ome/notebook
61                   loci/ome/viewer (temporary)
62    Main class:    loci.ome.notebook.MetadataNotebook
63    Dependencies:  bio-formats.jar
64                   commons-httpclient-2.0-rc2.jar (ome-java.jar)
65                   commons-logging.jar (ome-java.jar)
66                   forms-1.0.4.jar
67                   ome-java.jar
68                   xmlrpc-1.2-b1.jar (ome-java.jar)
69    Targets:       jar-notebook
70    License:       LGPL
71
72Leica Converter
73    JAR file:      LeicaConverter.jar
74    Folders:       loci/apps/leica
75    Main class:    loci.apps.leica.LeicaConverter
76    Dependencies:  bio-formats.jar
77                   ome-java.jar
78    Targets:       jar-leica
79    License:       Public domain
80
81QT TIFF Converter
82    JAR file:      QTConverter.jar
83    Folders:       loci/apps/qt
84                   some loci/formats
85    Main class:    loci.apps.qt.QTConverter
86    Dependencies:  None (custom built)
87    Targets:       jar-qt
88    License:       Public domain
89
90Slim Plotter
91    JAR file:      SlimPlotter.jar
92    Folders:       loci/apps/slim
93                   some loci/formats and loci/visbio
94    Main class:    loci.apps.slim.SlimPlotter
95    Dependencies:  lma.jar
96                   visad-lite.jar
97    Targets:       jar-slim
98                   dist-slim
99    License:       Public domain
100
101===============================================================================
102The following external dependencies (in the jar folder) may be required:
103
104Apple eAWT stubs
105    JAR file:  AppleJavaExtensions.jar
106    URL:       http://developer.apple.com/samplecode/AppleJavaExtensions/
107    Notes:     Required to compile VisBio on non-Mac OS X machines
108
109Apache Jakarta Commons HttpClient
110    JAR file:  commons-httpclient-2.0-rc2.jar
111    URL:       http://jakarta.apache.org/commons/httpclient/
112    Notes:     Required for OME Java to communicate with OME servers
113    License:   Apache
114
115Apache Jakarta Commons Logging
116    JAR file:  commons-logging.jar
117    URL:       http://jakarta.apache.org/commons/logging/
118    Notes:     Used by OME Java
119    License:   Apache
120
121JGoodies Forms
122    JAR file:  forms-1.0.4.jar
123    URL:       http://www.jgoodies.com/freeware/forms/index.html
124    Notes:     Used for layout by VisBio and OME Metadata Notebook
125    License:   BSD
126
127ImageJ
128    JAR file:  ij.jar
129    URL:       http://rsb.info.nih.gov/ij/
130    Notes:     Bundled with VisBio to achieve ImageJ interconnectivity
131    License:   Public domain
132
133JGoodies Looks
134    JAR file:  looks-1.2.2.jar
135    URL:       http://www.jgoodies.com/freeware/looks/index.html
136    Notes:     Used for a nicer Look & Feel by VisBio and OME Metadata Notebook
137    License:   BSD
138
139L-M Fit
140    JAR file:  lma.jar
141    URL:       http://users.utu.fi/jaolho/
142    Notes:     Levenberg-Marquardt algorithm for exponential curve fitting
143               with Slim Plotter
144    License:   LGPL
145
146OME Java
147    JAR file:  ome-java.jar
148    URL:       http://openmicroscopy.org/api/java/
149    Notes:     Used by VisBio and the OME Plugin for ImageJ to connect to OME;
150               used by Bio-Formats and the OME Notebook to work with OME-XML
151    License:   LGPL
152
153Apache Jakarta POI
154    JAR file:  poi-2.5.1-final-20040804.jar
155    URL:       http://jakarta.apache.org/poi/
156    Notes:     Not used (previously used by Bio-Formats)
157    License:   Apache
158
159Skin Look and Feel
160    JAR file:  skinlf.jar
161    URL:       http://skinlf.l2fprod.com/
162    Notes:     Not used (may be used in the future for flexible skinning)
163    License:   Custom (BSD-like)
164
165VisAD
166    JAR file:  visad-lite.jar
167    URL:       http://www.ssec.wisc.edu/~billh/visad.html
168    Notes:     Stripped down VisAD library used by VisBio and Slim Plotter
169    License:   LGPL
170
171Apache XML-RPC
172    JAR file:  xmlrpc-1.2-b1.jar
173    URL:       http://ws.apache.org/xmlrpc/
174    Notes:     Required for OME Java to communicate with OME servers
175    License:   Apache
176-->
177
178<project name="LOCI Software" default="compile" basedir=".">
179  <description>
180    Master build file for all Java software projects at LOCI
181  </description>
182
183  <property file="build.properties"/>
184  <property file="${user.home}/.ant-global.properties"/>
185
186  <condition property="isUnix"><os family="unix"/></condition>
187
188  <!-- Global build targets -->
189
190  <target name="init">
191    <tstamp>
192      <format property="DATE" pattern="d MMMMM yyyy"/>
193      <format property="YEAR" pattern="yyyy"/>
194    </tstamp>
195  </target>
196
197  <target name="compile" depends="copy-source"
198    description="compile LOCI software packages from source">
199    <mkdir dir="${classes.dir}"/>
200    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
201      classpath="${ext.jars}" deprecation="true" source="1.4" target="1.4"/>
202  </target>
203
204  <target name="jars"
205    depends="jar-formats, jar-visbio, jar-plugins, jar-notebook, jar-leica, jar-qt, jar-slim"
206    description="generate JAR files for LOCI software packages"/>
207
208  <target name="docs" depends="copy-source"
209    description="generate Javadocs for LOCI software packages">
210    <javadoc sourcepath="${dest.dir}" destdir="${docs.dir}/api"
211      author="true" version="true" use="true" windowtitle="LOCI Software API">
212      <packageset dir="${dest.dir}"/>
213      <doctitle><![CDATA[<h1>LOCI Software</h1>]]></doctitle>
214      <bottom><![CDATA[${copyright}]]></bottom>
215      <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
216    </javadoc>
217  </target>
218
219  <target name="clean" description="remove all build files">
220    <delete dir="${build.dir}"/>
221  </target>
222
223  <!-- Internal build targets -->
224
225  <target name="copy-source" depends="init">
226    <!-- copy binary files without filtering -->
227    <copy todir="${dest.dir}" preservelastmodified="true">
228      <fileset dir="${src.dir}" includes="loci/**"
229        excludes="**/*.class **/*.java **/*.config **/*.txt ${ignore.source}"/>
230    </copy>
231    <!-- copy source files with filtering -->
232    <filter token="date" value="${DATE}"/>
233    <copy todir="${dest.dir}" filtering="true" preservelastmodified="true">
234      <fileset dir="${src.dir}" includes="loci/**"
235        excludes="**/*.class ${ignore.source}"/>
236    </copy>
237  </target>
238
239  <target name="copy-jars">
240    <!-- copy needed external JARs into build jars folder -->
241    <copy todir="${jar.dir}" preservelastmodified="true">
242      <fileset dir="jar"/>
243    </copy>
244  </target>
245
246  <!-- Bio-Formats -->
247
248  <target name="jar-formats" depends="compile, copy-jars"
249    description="generate JAR file for Bio-Formats">
250    <copy todir="${classes.dir}" preservelastmodified="true">
251      <fileset dir="${src.dir}" includes="${formats.resources}"/>
252    </copy>
253    <mkdir dir="${jar.dir}"/>
254    <jar jarfile="${jar.dir}/bio-formats.jar" basedir="${classes.dir}"
255      includes="${formats.files}">
256      <manifest>
257        <attribute name="Main-Class" value="loci.formats.ImageViewer"/>
258      </manifest>
259    </jar>
260  </target>
261
262  <!-- VisBio -->
263
264  <target name="jar-visbio" depends="compile, copy-jars, jar-formats"
265    description="generate JAR file for VisBio">
266    <copy todir="${classes.dir}" preservelastmodified="true">
267      <fileset dir="${src.dir}" includes="${visbio.resources}"/>
268    </copy>
269    <jar jarfile="${jar.dir}/visbio.jar" basedir="${classes.dir}"
270      includes="${visbio.files}">
271      <manifest>
272        <attribute name="Main-Class" value="loci.visbio.VisBio"/>
273        <attribute name="Class-Path" value="${visbio.classpath}"/>
274      </manifest>
275    </jar>
276  </target>
277
278  <target name="source-visbio" depends="copy-source"
279    description="generate source bundle for VisBio">
280    <zip zipfile="${build.dir}/visbio_src.zip" basedir="${dest.dir}"
281      includes="loci/visbio/**"/>
282  </target>
283
284  <target name="docs-visbio" depends="copy-source"
285    description="generate Javadocs for VisBio">
286    <javadoc sourcepath="${dest.dir}" destdir="${visbio.docs-dir}/docs/api"
287      author="true" version="true" use="true" windowtitle="LOCI Software API">
288      <packageset dir="${dest.dir}" includes="loci/visbio/**"/>
289      <doctitle><![CDATA[<h1>VisBio</h1>]]></doctitle>
290      <bottom><![CDATA[${copyright}]]></bottom>
291      <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
292    </javadoc>
293    <zip zipfile="${build.dir}/visbio_docs.zip" basedir="${visbio.docs-dir}"/>
294  </target>
295
296  <target name="dist-visbio" depends="dist-visbio-win32, dist-visbio-win32-nojre, dist-visbio-macosx, dist-visbio-linux, dist-visbio-nojre"/>
297
298  <target name="dist-visbio-win32" depends="jar-visbio, jar-formats">
299    <copy todir="${visbio.win32-dir}" preservelastmodified="true">
300      <fileset dir="dist/visbio/win32"/>
301      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
302      <fileset dir="${jar.dir}" includes="visbio.jar ${visbio.classpath}"/>
303    </copy>
304    <fixcrlf srcdir="${visbio.win32-dir}" eol="dos"
305      includes="*.txt *.cpp *.m plugins/*.txt"/>
306    <untar src="dist/jre-win32.tar.gz" dest="${visbio.win32-dir}"
307      overwrite="false" compression="gzip"/>
308    <zip destfile="${dist.dir}/visbio${visbio.version}_win32.zip"
309      basedir="${dist.dir}/visbio/win32"/>
310  </target>
311
312  <target name="dist-visbio-win32-nojre" depends="jar-visbio, jar-formats">
313    <copy todir="${visbio.win32-nojre-dir}"
314      preservelastmodified="true">
315      <fileset dir="dist/visbio/win32" excludes="launcher.cfg"/>
316      <fileset dir="dist/visbio/win32-nojre"/>
317      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
318      <fileset dir="${jar.dir}" includes="visbio.jar ${visbio.classpath}"/>
319    </copy>
320    <fixcrlf srcdir="${visbio.win32-nojre-dir}" eol="dos"
321      includes="*.txt *.cpp *.m plugins/*.txt"/>
322    <zip destfile="${dist.dir}/visbio${visbio.version}_win32_nojre.zip"
323      basedir="${dist.dir}/visbio/win32-nojre"/>
324  </target>
325
326  <!-- HACK - limit OS to *nix due to file permission issues -->
327  <target name="dist-visbio-macosx" if="isUnix"
328    depends="jar-visbio, jar-formats">
329    <copy todir="${visbio.macosx-dir}"
330      preservelastmodified="true">
331      <fileset dir="dist/visbio/macosx"/>
332      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
333    </copy>
334    <fixcrlf srcdir="${visbio.macosx-dir}" eol="mac"
335      includes="*.txt *.cpp *.m plugins/*.txt"/>
336    <!-- HACK - copy does not preserve permissions; chmod them back -->
337    <chmod perm="+x">
338      <fileset dir="${visbio.macosx-dir}"
339        includes="visbio omeul VisBio.app/Contents/MacOS/JavaApplicationStub"/>
340    </chmod>
341    <copy todir="${visbio.macosx-dir}/VisBio.app/Contents/Resources/Java">
342      <fileset dir="${jar.dir}" includes="visbio.jar ${visbio.classpath}"/>
343    </copy>
344<!--
345    <tar destfile="${dist.dir}/visbio${visbio.version}_macosx.tar.gz"
346      basedir="${dist.dir}/visbio/macosx" compression="gzip"/>
347-->
348    <!-- HACK - tar does not preserve permissions; use exec instead -->
349    <exec executable="tar">
350      <arg value="czf"/>
351      <arg value="${dist.dir}/visbio${visbio.version}_macosx.tar.gz"/>
352      <arg value="-C"/>
353      <arg value="${dist.dir}/visbio/macosx VisBio"/>
354    </exec>
355  </target>
356
357  <!-- HACK - limit OS to *nix due to file permission issues -->
358  <target name="dist-visbio-linux" if="isUnix"
359    depends="jar-visbio, jar-formats">
360    <copy todir="${visbio.linux-dir}" preservelastmodified="true">
361      <fileset dir="dist/visbio/linux"/>
362      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
363      <fileset dir="${jar.dir}" includes="visbio.jar ${visbio.classpath}"/>
364    </copy>
365    <fixcrlf srcdir="${visbio.linux-dir}" eol="unix"
366      includes="*.txt *.cpp *.m plugins/*.txt"/>
367    <!-- HACK - copy does not preserve permissions; chmod them back -->
368    <chmod perm="+x">
369      <fileset dir="${visbio.linux-dir}" includes="visbio omeul"/>
370    </chmod>
371<!--
372    <untar src="dist/jre-linux.tar.gz" dest="${visbio.linux-dir}"
373      overwrite="false" compression="gzip"/>
374-->
375    <!-- HACK - untar does not restore permissions; use exec instead -->
376    <exec executable="tar">
377      <arg value="xzf"/>
378      <arg value="dist/jre-linux.tar.gz"/>
379      <arg value="-C"/>
380      <arg value="${visbio.linux-dir}"/>
381    </exec>
382<!--
383    <tar destfile="${dist.dir}/visbio${visbio.version}_linux.tar.gz"
384      basedir="${dist.dir}/visbio/linux" compression="gzip"/>
385-->
386    <!-- HACK - tar does not preserve permissions; use exec instead -->
387    <exec executable="tar">
388      <arg value="czf"/>
389      <arg value="${dist.dir}/visbio${visbio.version}_linux.tar.gz"/>
390      <arg value="-C"/>
391      <arg value="${dist.dir}/visbio/linux visbio${visbio.version}"/>
392    </exec>
393  </target>
394
395  <!-- HACK - limit OS to *nix due to file permission issues -->
396  <target name="dist-visbio-nojre" if="isUnix"
397    depends="jar-visbio, jar-formats">
398    <copy todir="${visbio.nojre-dir}" preservelastmodified="true">
399      <fileset dir="dist/visbio/linux"/>
400      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
401      <fileset dir="${jar.dir}" includes="visbio.jar ${visbio.classpath}"/>
402    </copy>
403    <fixcrlf srcdir="${visbio.nojre-dir}" eol="unix"
404      includes="*.txt *.cpp *.m plugins/*.txt"/>
405    <!-- HACK - copy does not preserve permissions; chmod them back -->
406    <chmod perm="+x">
407      <fileset dir="${visbio.nojre-dir}" includes="visbio omeul"/>
408    </chmod>
409<!--
410    <tar destfile="${dist.dir}/visbio${visbio.version}.tar.gz"
411      basedir="${dist.dir}/visbio/nojre" compression="gzip"/>
412-->
413    <!-- HACK - tar does not preserve permissions; use exec instead -->
414    <exec executable="tar">
415      <arg value="czf"/>
416      <arg value="${dist.dir}/visbio${visbio.version}.tar.gz"/>
417      <arg value="-C"/>
418      <arg value="${dist.dir}/visbio/nojre visbio${visbio.version}"/>
419    </exec>
420  </target>
421
422  <!-- LOCI Plugins for ImageJ -->
423
424  <target name="jar-plugins" depends="compile, copy-jars, jar-formats"
425    description="generate JAR file for LOCI Plugins for ImageJ">
426    <jar jarfile="${jar.dir}/loci_plugins.jar"
427      basedir="${src.dir}/loci/plugins" includes="plugins.config">
428      <manifest>
429        <attribute name="Main-Class" value="loci.plugins.About"/>
430      </manifest>
431    </jar>
432    <jar jarfile="${jar.dir}/loci_plugins.jar" basedir="${classes.dir}"
433      includes="${plugins.files}" excludes="loci/plugins/plugins.config"
434      update="true">
435    </jar>
436  </target>
437
438  <!-- OME Metadata Notebook -->
439
440  <target name="jar-notebook" depends="compile, copy-jars, jar-formats"
441    description="generate JAR file for OME Metadata Notebook">
442    <copy todir="${classes.dir}" preservelastmodified="true">
443      <fileset dir="${src.dir}" includes="${notebook.resources}"/>
444    </copy>
445    <jar jarfile="${jar.dir}/ome-notebook.jar" basedir="${classes.dir}"
446      includes="${notebook.files}">
447      <manifest>
448        <attribute name="Main-Class"
449          value="loci.ome.notebook.MetadataNotebook"/>
450        <attribute name="Class-Path" value="${notebook.classpath}"/>
451      </manifest>
452    </jar>
453  </target>
454
455  <!-- Leica Converter -->
456
457  <target name="jar-leica" depends="compile, copy-jars, jar-formats"
458    description="generate JAR file for Leica Converter">
459    <jar jarfile="${jar.dir}/LeicaConverter.jar" basedir="${classes.dir}"
460      includes="${leica.files}">
461      <manifest>
462        <attribute name="Main-Class" value="loci.apps.leica.LeicaConverter"/>
463        <attribute name="Class-Path" value="${leica.classpath}"/>
464      </manifest>
465    </jar>
466  </target>
467
468  <!-- QT TIFF Converter -->
469
470  <target name="jar-qt" depends="compile"
471    description="generate JAR file for QT TIFF Converter">
472    <mkdir dir="${jar.dir}"/>
473    <jar jarfile="${jar.dir}/QTConverter.jar" basedir="${classes.dir}"
474      includes="${qt.files}">
475      <manifest>
476        <attribute name="Main-Class" value="loci.apps.qt.QTConverter"/>
477      </manifest>
478    </jar>
479  </target>
480
481  <!-- Slim Plotter -->
482
483  <target name="jar-slim" depends="compile, copy-jars"
484    description="generate JAR file for Slim Plotter">
485    <jar jarfile="${jar.dir}/SlimPlotter.jar" basedir="${classes.dir}"
486      includes="${slim.files}">
487      <manifest>
488        <attribute name="Main-Class" value="loci.apps.slim.SlimPlotter"/>
489        <attribute name="Class-Path" value="${slim.classpath}"/>
490      </manifest>
491    </jar>
492  </target>
493
494  <target name="dist-slim" if="isUnix" depends="copy-jars, jar-slim">
495    <copy todir="${slim.dist-dir}" preservelastmodified="true">
496      <fileset dir="dist/slim"/>
497      <fileset dir="${jar.dir}" includes="SlimPlotter.jar ${slim.classpath}"/>
498    </copy>
499    <!-- HACK - copy does not preserve permissions; chmod them back -->
500    <chmod perm="+x">
501      <fileset dir="${slim.dist-dir}" includes="slim"/>
502    </chmod>
503<!--
504    <zip destfile="${dist.dir}/slim.zip" basedir="${dist.dir}/slim"/>
505-->
506    <!-- HACK - zip does not preserve permissions; use exec instead -->
507    <exec executable="zip" dir="${dist.dir}/slim">
508      <arg value="-r9"/>
509      <arg value="../slim.zip"/>
510      <arg value="SlimPlotter"/>
511    </exec>
512  </target>
513
514</project>
Note: See TracBrowser for help on using the repository browser.