source: trunk/build.xml @ 1281

Revision 1281, 14.2 KB checked in by curtis, 14 years ago (diff)

Fix main class for bio-formats.jar.

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 -projecthelp" for a list of targets.
7
8===============================================================================
9This build file handles the following projects:
10
11LOCI Common Classes
12    JAR file:      loci-common.jar
13    Folders:       loci/ome/viewer
14                   loci/util
15    Main class:    loci.util.About
16    Dependencies:  commons-httpclient-2.0-rc2.jar (ome-java.jar)
17                   commons-logging.jar (ome-java.jar)
18                   ome-java.jar
19                   xmlrpc-1.2-b1.jar (ome-java.jar)
20    Targets:       jar-common
21
22Bio-Formats
23    JAR file:      bio-formats.jar
24    Folders:       loci/formats
25                   loci/formats/*
26    Main class:    loci.formats.ImageViewer
27    Dependencies:  loci-common.jar
28    Targets:       jar-formats
29
30VisBio
31    JAR file:      visbio.jar
32    Folders:       loci/visbio
33                   loci/visbio/*
34    Main class:    loci.visbio.VisBio
35    Dependencies:  bio-formats.jar
36                   commons-httpclient-2.0-rc2.jar (ome-java.jar)
37                   commons-logging.jar (ome-java.jar)
38                   forms-1.0.4.jar
39                   ij.jar
40                   loci-common.jar
41                   looks-1.2.2.jar
42                   ome-java.jar
43                   visad.jar
44                   xmlrpc-1.2-b1.jar (ome-java.jar)
45    Targets:       jar-visbio
46                   visad
47                   dist-visbio
48
49LOCI Plugins for ImageJ
50    JAR file:      loci_plugins.jar
51    Folders:       loci/plugins
52                   loci/plugins/*
53    Main class:    loci.plugins.About
54    IJ plugins:    loci.plugins.browser.LociDataBrowser
55                   loci.plugins.LociImporter
56                   loci.plugins.LociExporter
57                   loci.plugins.ome.OMEPlugin
58    Dependencies:  bio-formats.jar
59                   commons-httpclient-2.0-rc2.jar (ome-java.jar)
60                   commons-logging.jar (ome-java.jar)
61                   loci-common.jar
62                   ome-java.jar
63                   xmlrpc-1.2-b1.jar (ome-java.jar)
64    Targets:       jar-plugins
65
66OME Metadata Notebook
67    JAR file:      ome-notebook.jar
68    Folders:       loci/ome/notebook
69    Main class:    loci.ome.notebook.MetadataNotebook
70    Dependencies:  bio-formats.jar
71                   commons-httpclient-2.0-rc2.jar (ome-java.jar)
72                   commons-logging.jar (ome-java.jar)
73                   forms-1.0.4.jar
74                   loci-common.jar
75                   ome-java.jar
76                   xmlrpc-1.2-b1.jar (ome-java.jar)
77    Targets:       jar-notebook
78
79Leica Converter
80    JAR file:      LeicaConverter.jar
81    Folders:       loci/apps/leica
82    Main class:    loci.apps.leica.LeicaConverter
83    Dependencies:  bio-formats.jar
84                   ome-java.jar
85    Targets:       jar-leica
86
87QT TIFF Converter
88    JAR file:      QTConverter.jar
89    Folders:       loci/apps/qt
90                   some loci/formats and loci/util
91    Main class:    loci.apps.qt.QTConverter
92    Dependencies:  None (custom built)
93    Targets:       jar-qt
94
95Slim Plotter
96    JAR file:      SlimPlotter.jar
97    Folders:       loci/apps/slim
98                   some loci/formats and loci/visbio
99    Main class:    loci.apps.slim.SlimPlotter
100    Dependencies:  visad.jar
101    Targets:       jar-slim
102
103===============================================================================
104The following external dependencies (in the jar folder) may be required:
105
106Apple eAWT stubs
107    JAR file:  AppleJavaExtensions.jar
108    URL:       http://developer.apple.com/samplecode/AppleJavaExtensions/
109    Notes:     Required to compile VisBio on non-Mac OS X machines
110
111Apache Jakarta Commons HttpClient
112    JAR file:  commons-httpclient-2.0-rc2.jar
113    URL:       http://jakarta.apache.org/commons/httpclient/
114    Notes:     Required for OME Java to communicate with OME servers
115
116Apache Jakarta Commons Logging
117    JAR file:  commons-logging.jar
118    URL:       http://jakarta.apache.org/commons/logging/
119    Notes:     Used by OME Java
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
126ImageJ
127    JAR file:  ij.jar
128    URL:       http://rsb.info.nih.gov/ij/
129    Notes:     Bundled with VisBio to achieve ImageJ interconnectivity
130
131JGoodies Looks
132    JAR file:  looks-1.2.2.jar
133    URL:       http://www.jgoodies.com/freeware/looks/index.html
134    Notes:     Used for a nicer Look & Feel by VisBio
135
136OME Java
137    JAR file:  ome-java.jar
138    URL:       http://openmicroscopy.org/api/java/
139    Notes:     Used by VisBio and the OME Plugin for ImageJ to connect to OME;
140               used by Bio-Formats and the OME Notebook to work with OME-XML
141
142Apache Jakarta POI
143    JAR file:  poi-2.5.1-final-20040804.jar
144    URL:       http://jakarta.apache.org/poi/
145    Notes:     Not used (previously used by Bio-Formats)
146
147Skin Look and Feel
148    JAR file:  skinlf.jar
149    URL:       http://skinlf.l2fprod.com/
150    Notes:     Not used (may be used in the future for flexible skinning)
151
152VisAD
153    JAR file:  visad.jar
154    URL:       http://www.ssec.wisc.edu/~billh/visad.html
155    Notes:     Stripped down VisAD library used by VisBio and Slim Plotter
156
157Apache XML-RPC
158    JAR file:  xmlrpc-1.2-b1.jar
159    URL:       http://ws.apache.org/xmlrpc/
160    Notes:     Required for OME Java to communicate with OME servers
161-->
162
163<project name="LOCI Software" default="compile" basedir=".">
164  <description>
165    Master build file for all Java software projects at LOCI
166  </description>
167
168  <!-- Directories -->
169
170  <property name="src.dir" value="."/>
171  <property name="build.dir" value="build"/>
172  <property name="dest.dir" value="${build.dir}/src"/>
173  <property name="classes.dir" value="${build.dir}/classes"/>
174  <property name="jar.dir"  value="${build.dir}/jar"/>
175  <property name="docs.dir" value="${build.dir}/docs"/>
176  <property name="dist.dir" value="${build.dir}/dist"/>
177
178  <!-- External JAR dependencies -->
179
180  <property name="ext.jars" value="jar/AppleJavaExtensions.jar:jar/commons-httpclient-2.0-rc2.jar:jar/commons-logging.jar:jar/forms-1.0.4.jar:jar/ij.jar:jar/looks-1.2.2.jar:jar/ome-java.jar:jar/xmlrpc-1.2-b1.jar"/>
181
182  <!-- Global build targets -->
183
184  <target name="init">
185    <tstamp>
186      <format property="DATE" pattern="d MMMMM yyyy"/>
187      <format property="YEAR" pattern="yyyy"/>
188    </tstamp>
189  </target>
190
191  <target name="compile" depends="copy-source"
192    description="compile LOCI software packages from source">
193    <mkdir dir="${classes.dir}"/>
194    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
195      classpath="${ext.jars}" deprecation="true"/>
196  </target>
197
198  <target name="jars"
199    depends="jar-common, jar-formats, jar-visbio, jar-plugins, jar-notebook, jar-leica, jar-qt, jar-slim"
200    description="generate JAR files for LOCI software packages"/>
201
202  <target name="docs" depends="init"
203    description="generate Javadocs for LOCI software packages">
204    <mkdir dir="${docs.dir}"/>
205    <javadoc sourcepath="${dest.dir}" destdir="${docs.dir}/api"
206      author="true" version="true" use="true" windowtitle="LOCI Software API">
207      <packageset dir="${dest.dir}"/>
208      <doctitle><![CDATA[<h1>LOCI Software</h1>]]></doctitle>
209      <bottom><![CDATA[<i>Copyright &#169; ${YEAR} Laboratory for Optical and Computational Instrumentation</i>]]></bottom>
210      <tag name="todo" scope="all" description="To do:"/>
211      <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
212    </javadoc>
213  </target>
214
215  <target name="clean"
216    description="remove all build files">
217    <delete dir="${build.dir}"/>
218  </target>
219
220  <!-- Internal build targets -->
221
222  <property name="ignore.source"
223    value="loci/plugins/HandleExtraFileTypes.java *.tar.gz"/>
224
225  <target name="copy-source" depends="init">
226    <mkdir dir="${dest.dir}"/>
227    <!-- copy binary files without filtering -->
228    <copy todir="${dest.dir}" preservelastmodified="true">
229      <fileset dir="${src.dir}" includes="loci/**" 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/**" excludes="**/*.class ${ignore.source}"/>
235    </copy>
236  </target>
237
238  <target name="copy-jars">
239    <!-- copy needed external JARs into build jars folder -->
240    <mkdir dir="${jar.dir}"/>
241    <copy todir="${jar.dir}" preservelastmodified="true">
242      <fileset dir="jar"/>
243    </copy>
244  </target>
245
246  <!-- LOCI Common Classes -->
247
248  <property name="common.files" value="loci/ome/viewer/** loci/util/**"/>
249
250  <target name="jar-common" depends="compile, copy-jars"
251    description="generate JAR file for LOCI common classes">
252    <mkdir dir="${jar.dir}"/>
253    <jar jarfile="${jar.dir}/loci-common.jar" basedir="${classes.dir}"
254      includes="${common.files}">
255      <manifest>
256        <attribute name="Main-Class" value="loci.util.About"/>
257      </manifest>
258    </jar>
259  </target>
260
261  <!-- Bio-Formats -->
262
263  <property name="formats.classpath" value="loci-common.jar"/>
264  <property name="formats.files" value="loci/browser/** loci/formats/**"/>
265  <property name="formats.resources" value="loci/formats/*.txt"/>
266
267  <target name="jar-formats" depends="compile, jar-common"
268    description="generate Bio-Formats JAR file">
269    <mkdir dir="${jar.dir}"/>
270    <copy todir="${classes.dir}" preservelastmodified="true">
271      <fileset dir="${src.dir}" includes="${formats.resources}"/>
272    </copy>
273    <jar jarfile="${jar.dir}/bio-formats.jar" basedir="${classes.dir}"
274      includes="${formats.files}">
275      <manifest>
276        <attribute name="Main-Class" value="loci.formats.ImageViewer"/>
277        <attribute name="Class-Path" value="${formats.classpath}"/>
278      </manifest>
279    </jar>
280  </target>
281
282  <!-- VisBio -->
283
284  <property name="visbio.classpath" value="bio-formats.jar commons-httpclient-2.0-rc2.jar commons-logging.jar forms-1.0.4.jar ij.jar loci-common.jar looks-1.2.2.jar ome-java.jar visad.jar xmlrpc-1.2-b1.jar"/>
285  <property name="visbio.files" value="loci/visbio/**"/>
286  <property name="visbio.resources" value="loci/visbio/classes.txt loci/visbio/*.png loci/visbio/*.gif loci/visbio/help/*.html loci/visbio/help/*.png loci/visbio/overlays/*.png loci/visbio/view/*.png"/>
287
288  <target name="jar-visbio"
289    depends="compile, copy-jars, jar-formats, jar-common"
290    description="generate VisBio JAR file">
291    <mkdir dir="${jar.dir}"/>
292    <copy todir="${classes.dir}" preservelastmodified="true">
293      <fileset dir="${src.dir}" includes="${visbio.resources}"/>
294    </copy>
295    <jar jarfile="${jar.dir}/visbio.jar" basedir="${classes.dir}"
296      includes="${visbio.files}">
297      <manifest>
298        <attribute name="Main-Class" value="loci.visbio.VisBio"/>
299        <attribute name="Class-Path" value="${visbio.classpath}"/>
300      </manifest>
301    </jar>
302  </target>
303
304  <target name="dist-visbio" depends="jar-visbio, jar-formats"
305    description="generate VisBio's platform-specific distribution bundles">
306    <!-- TODO -->
307  </target>
308
309  <!-- LOCI Plugins for ImageJ -->
310
311  <target name="jar-plugins"
312    depends="compile, copy-jars, jar-common, jar-formats"
313    description="generate LOCI Plugins for ImageJ JAR file">
314    <mkdir dir="${jar.dir}"/>
315    <!-- TODO -->
316  </target>
317
318  <!-- OME Metadata Notebook -->
319
320  <target name="jar-notebook"
321    depends="compile, copy-jars, jar-common, jar-formats"
322    description="generate OME Metadata Notebook JAR file">
323    <mkdir dir="${jar.dir}"/>
324    <!-- TODO -->
325  </target>
326
327  <!-- Leica Converter -->
328
329  <property name="leica.classpath" value="bio-formats.jar ome-java.jar"/>
330  <property name="leica.files" value="loci/apps/leica/**"/>
331
332  <target name="jar-leica" depends="compile, copy-jars, jar-formats"
333    description="generate Leica Converter JAR file">
334    <mkdir dir="${jar.dir}"/>
335    <jar jarfile="${jar.dir}/LeicaConverter.jar" basedir="${classes.dir}"
336      includes="${leica.files}">
337      <manifest>
338        <attribute name="Main-Class" value="loci.apps.leica.LeicaConverter"/>
339        <attribute name="Class-Path" value="${leica.classpath}"/>
340      </manifest>
341    </jar>
342  </target>
343
344  <!-- QT TIFF Converter -->
345
346  <property name="qt.files" value="loci/apps/qt/* loci/util/FilePattern* loci/util/NumberFilter* loci/formats/BitBuffer* loci/formats/BitWriter* loci/formats/ByteVector* loci/formats/ComboFileFilter* loci/formats/Compression* loci/formats/DataTools* loci/formats/DummyMetadataStore* loci/formats/ExtensionFileFilter* loci/formats/FileStitcher* loci/formats/FormatException* loci/formats/FormatFileFilter* loci/formats/FormatHandler* loci/formats/FormatReader* loci/formats/FormatWriter* loci/formats/IFormatHandler* loci/formats/IFormatReader* loci/formats/ImageTools* loci/formats/LZWTreeNode* loci/formats/LegacyQTTools* loci/formats/MetadataStore* loci/formats/OMEXMLMetadataStore* loci/formats/RandomAccessArray* loci/formats/RandomAccessStream* loci/formats/ReflectException* loci/formats/ReflectedUniverse* loci/formats/TiffRational* loci/formats/TiffTools* loci/formats/in/BaseTiffReader* loci/formats/in/LegacyQTReader* loci/formats/in/QTReader* loci/formats/in/TiffReader* loci/formats/out/TiffWriter*"/>
347
348  <target name="jar-qt" depends="compile"
349    description="generate QT TIFF Converter JAR file">
350    <mkdir dir="${jar.dir}"/>
351    <jar jarfile="${jar.dir}/QTConverter.jar" basedir="${classes.dir}"
352      includes="${qt.files}">
353      <manifest>
354        <attribute name="Main-Class" value="loci.apps.qt.QTConverter"/>
355      </manifest>
356    </jar>
357  </target>
358
359  <!-- Slim Plotter -->
360
361  <property name="slim.classpath" value="visad.jar"/>
362  <property name="slim.files" value="loci/apps/slim/* loci/formats/DataTools* loci/formats/ExtensionFileFilter* loci/formats/ComboFileFilter* loci/visbio/util/OutputConsole* loci/visbio/util/OutputEvent* loci/visbio/util/SwingUtil* loci/visbio/util/LAFUtil*"/>
363
364  <target name="jar-slim" depends="compile, copy-jars"
365    description="generate Slim Plotter JAR file">
366    <mkdir dir="${jar.dir}"/>
367    <jar jarfile="${jar.dir}/SlimPlotter.jar" basedir="${classes.dir}"
368      includes="${slim.files}">
369      <manifest>
370        <attribute name="Main-Class" value="loci.apps.slim.SlimPlotter"/>
371        <attribute name="Class-Path" value="${slim.classpath}"/>
372      </manifest>
373    </jar>
374  </target>
375
376</project>
Note: See TracBrowser for help on using the repository browser.