source: trunk/build.xml @ 1284

Revision 1284, 13.1 KB checked in by curtis, 14 years ago (diff)

Eliminate "LOCI common classes" package.

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