source: trunk/build.xml @ 1319

Revision 1319, 18.2 KB checked in by curtis, 14 years ago (diff)

Add License to information about each JAR file.

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