source: trunk/build.xml @ 1277

Revision 1277, 11.7 KB checked in by curtis, 14 years ago (diff)

Initial version of master ant build file. Some targets are not yet complete.

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