source: tags/loci-tools-2008-Jul-01/build.xml @ 4152

Revision 4152, 41.1 KB checked in by melissa, 12 years ago (diff)

2008 Jul 01 release of LOCI Tools

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/* (except auto)
15    Main class:    loci.formats.ImageViewer
16    Dependencies:  bufr-1.1.00.jar (reflected)
17                   clibwrapper_jiio.jar (reflected)
18                   grib-5.1.03.jar (reflected)
19                   jai_imageio.jar (reflected)
20                   mdbtools-java.jar (reflected)
21                   netcdf-4.0.jar (reflected)
22                   ome-java.jar (reflected, except in loci/formats/ome)
23                   omero-client.jar (reflected)
24                   omero-common.jar (reflected)
25                   spring.jar (reflected)
26                   jbossall-client.jar (reflected)
27                   poi-loci.jar (reflected)
28                   slf4j-jdk14.jar (reflected)
29    Targets:       style-formats
30                   compile-formats
31                   jar-formats
32    License:       GPL
33
34VisBio
35    JAR file:      visbio.jar
36    Folders:       loci/visbio
37                   loci/visbio/*
38    Main class:    loci.visbio.VisBio
39    Dependencies:  bio-formats.jar
40                   bufr-1.1.00.jar (bio-formats.jar)
41                   clibwrapper_jiio.jar (bio-formats.jar)
42                   commons-httpclient-2.0-rc2.jar (ome-java.jar)
43                   commons-logging.jar (ome-java.jar)
44                   forms-1.0.4.jar
45                   grib-5.1.03.jar (bio-formats.jar)
46                   ij.jar
47                   jai_imageio.jar (bio-formats.jar)
48                   looks-1.2.2.jar
49                   mdbtools-java.jar (bio-formats.jar)
50                   netcdf-4.0.jar (bio-formats.jar)
51                   ome-java.jar
52                   omero-client.jar (bio-formats.jar)
53                   omero-common.jar (bio-formats.jar)
54                   spring.jar (bio-formats.jar)
55                   jbossall-client.jar (bio-formats.jar)
56                   poi-loci.jar (bio-formats.jar)
57                   slf4j-jdk14.jar (bio-formats.jar)
58                   visad-lite.jar
59                   xmlrpc-1.2-b1.jar (ome-java.jar)
60    Targets:       style-visbio
61                   compile-visbio
62                   jar-visbio
63                   source-visbio
64                   docs-visbio
65                   dist-visbio
66    License:       GPL
67
68LOCI Plugins for ImageJ
69    JAR file:      loci_plugins.jar
70    Folders:       loci/plugins
71                   loci/ome/upload
72                   loci/ome/util
73    Main class:    loci.plugins.About
74    IJ plugins:    loci.plugins.Colorizer
75                   loci.plugins.LociExporter
76                   loci.plugins.LociFunctions
77                   loci.plugins.LociImporter
78                   loci.plugins.LociUploader
79                   loci.plugins.Slicer
80    Dependencies:  bio-formats.jar
81                   bufr-1.1.00.jar (bio-formats.jar)
82                   clibwrapper_jiio.jar (bio-formats.jar)
83                   commons-httpclient-2.0-rc2.jar (ome-java.jar)
84                   commons-logging.jar (ome-java.jar)
85                   grib-5.1.03.jar (bio-formats.jar)
86                   jai_imageio.jar (bio-formats.jar)
87                   mdbtools-java.jar (bio-formats.jar)
88                   netcdf-4.0.jar (bio-formats.jar)
89                   ome-java.jar (bio-formats.jar)
90                   omero-client.jar (bio-formats.jar)
91                   omero-common.jar (bio-formats.jar)
92                   spring.jar (bio-formats.jar)
93                   jbossall-client.jar (bio-formats.jar)
94                   poi-loci.jar (bio-formats.jar)
95                   slf4j-jdk14.jar (bio-formats.jar)
96                   xmlrpc-1.2-b1.jar (ome-java.jar)
97    Targets:       style-plugins
98                   compile-plugins
99                   jar-plugins
100    License:       LGPL
101
102OME Notes
103    JAR file:      ome-notes.jar
104    Folder:        loci/ome/notes
105    Main class:    loci.ome.notes.Notes
106    Dependencies:  bio-formats.jar
107                   bufr-1.1.00.jar (bio-formats.jar)
108                   clibwrapper_jiio.jar (bio-formats.jar)
109                   commons-httpclient-2.0-rc2.jar (ome-java.jar)
110                   commons-logging.jar (ome-java.jar)
111                   forms-1.0.4.jar
112                   grib-5.1.03.jar (bio-formats.jar)
113                   jai_imageio.jar (bio-formats.jar)
114                   mdbtools-java.jar (bio-formats.jar)
115                   netcdf-4.0.jar (bio-formats.jar)
116                   ome-java.jar
117                   omero-client.jar (bio-formats.jar)
118                   omero-common.jar (bio-formats.jar)
119                   spring.jar (bio-formats.jar)
120                   jbossall-client.jar (bio-formats.jar)
121                   poi-loci.jar (bio-formats.jar)
122                   slf4j-jdk14.jar (bio-formats.jar)
123                   xmlrpc-1.2-b1.jar (ome-java.jar)
124    Targets:       style-notes
125                   compile-notes
126                   jar-notes
127    License:       LGPL
128
129JVMLink
130    JAR file:      jvmlink.jar
131    Folder:        loci/jvmlink
132    Main class:    loci.jvmlink.JVMLinkServer
133    Dependencies:  bio-formats.jar
134    Targets:       style-jvmlink
135                   compile-jvmlink
136                   jar-jvmlink
137    License:       BSD
138
139Slim Plotter
140    JAR file:      SlimPlotter.jar
141    Folders:       loci/slim
142                   some loci/visbio
143    Main class:    loci.slim.SlimPlotter
144    Dependencies:  bio-formats.jar
145                   lma.jar
146                   visad-lite.jar
147    Targets:       style-slim
148                   compile-slim
149                   jar-slim
150                   dist-slim
151    License:       GPL
152
153OME Metadata Editor
154    JAR file:      ome-editor.jar
155    Folders:       loci/ome/editor
156                   loci/ome/viewer
157    Main class:    loci.ome.editor.MetadataEditor
158    Dependencies:  bio-formats.jar
159                   bufr-1.1.00.jar (bio-formats.jar)
160                   clibwrapper_jiio.jar (bio-formats.jar)
161                   commons-httpclient-2.0-rc2.jar (ome-java.jar)
162                   commons-logging.jar (ome-java.jar)
163                   forms-1.0.4.jar
164                   grib-5.1.03.jar (bio-formats.jar)
165                   jai_imageio.jar (bio-formats.jar)
166                   mdbtools-java.jar (bio-formats.jar)
167                   netcdf-4.0.jar (bio-formats.jar)
168                   ome-java.jar
169                   poi-loci.jar (bio-formats.jar)
170                   slf4j-jdk14.jar (bio-formats.jar)
171                   xmlrpc-1.2-b1.jar (ome-java.jar)
172    Targets:       style-editor
173                   compile-editor
174                   jar-editor
175    License:       LGPL
176
177LOCI Checkstyle checks
178    JAR file:      loci-checks.jar
179    Folders:       loci/checks
180    Main class:    loci.checks.About
181    Dependencies:  checkstyle-all-4.2.jar
182    Targets:       style-checks
183                   compile-checks
184                   jar-checks
185    License:       Public domain
186
187===============================================================================
188The following external dependencies (in the jar folder) may be required:
189
190Apple eAWT stubs
191    JAR file:  AppleJavaExtensions.jar
192    URL:       http://developer.apple.com/samplecode/AppleJavaExtensions/
193    Notes:     required to compile VisBio on non-Mac OS X machines
194
195Ant-Contrib
196    JAR file:  ant-contrib-1.0b1.jar
197    URL:       http://ant-contrib.sourceforge.net/
198    Notes:     used by tools target to iterate over JAR files ("for" task)
199    License:   Apache
200
201Checkstyle
202    JAR file:  checkstyle-all-4.2.jar
203    URL:       http://checkstyle.sourceforge.net/
204    Notes:     used by style targets to check source code style conventions
205    License:   LGPL
206
207Apache Jakarta Commons HttpClient
208    JAR file:  commons-httpclient-2.0-rc2.jar
209    URL:       http://jakarta.apache.org/commons/httpclient/
210    Notes:     required for OME-Java to communicate with OME servers
211    License:   Apache
212
213Apache Jakarta Commons Logging
214    JAR file:  commons-logging.jar
215    URL:       http://jakarta.apache.org/commons/logging/
216    Notes:     used by OME-Java
217    License:   Apache
218
219JGoodies Forms
220    JAR file:  forms-1.0.4.jar
221    URL:       http://www.jgoodies.com/freeware/forms/index.html
222    Notes:     used for layout by VisBio, 4D Data Browser and OME Notes
223    License:   BSD
224
225ImageJ
226    JAR file:  ij.jar
227    URL:       http://rsb.info.nih.gov/ij/
228    Notes:     used by LOCI plugins for ImageJ;
229               bundled with VisBio to achieve ImageJ interconnectivity
230    License:   Public domain
231
232Java Advanced Imaging Image I/O Tools
233    JAR files: jai_imageio.jar, clibwrapper_jiio.jar
234    URL:       https://jai-imageio.dev.java.net/
235    Notes:     used by Bio-Formats via reflection for JPEG2000 support
236               (ND2, JP2) and lossless JPEG decompression (DICOM)
237    License:   BSD
238
239JUnit
240    JAR file:  junit.jar
241    URL:       http://www.junit.org/
242    Notes:     unit testing framework used for a few VisBio unit tests
243    License:   Common Public License
244
245JGoodies Looks
246    JAR file:  looks-1.2.2.jar
247    URL:       http://www.jgoodies.com/freeware/looks/index.html
248    Notes:     used for a nicer Look & Feel by VisBio and OME Metadata Editor
249    License:   BSD
250
251MDB Tools (Java port)
252    JAR file:  mdbtools-java.jar
253    URLs:      http://mdbtools.sourceforge.net/
254               http://sourceforge.net/forum/message.php?msg_id=2550619
255    Notes:     used by Bio-Formats for Zeiss LSM metadata in MDB database files
256    License:   LGPL
257
258L-M Fit
259    JAR file:  lma.jar
260    URL:       http://users.utu.fi/jaolho/
261    Notes:     Levenberg-Marquardt algorithm for exponential curve fitting,
262               used by Slim Plotter
263    License:   LGPL
264
265NetCDF
266    JAR files: netcdf-4.0.jar, bufr-1.1.00.jar, grib-5.1.03.jar, slf4j-jdk14.jar
267    URL:       http://www.unidata.ucar.edu/software/netcdf-java/
268    Notes:     used by Bio-Formats via reflection for HDF support (Imaris 5.5)
269    License:   LGPL
270
271OME-Java
272    JAR file:  ome-java.jar
273    URL:       http://openmicroscopy.org/api/java/
274    Notes:     used by VisBio and the OME upload and download plugins for
275               ImageJ to connect to OME;
276               used by Bio-Formats and OME Notes to work with OME-XML
277    License:   LGPL
278
279OMERO Common
280    JAR file:  omero-common.jar
281    URL:       http://trac.openmicroscopy.org.uk/omero/wiki/MilestoneDownloads
282    Notes:     used by VisBio and Bio-Formats to connect to OMERO
283    License:   LGPL
284
285OMERO Client
286    JAR file:  omero-client.jar
287    URL:       http://trac.openmicroscopy.org.uk/omero/wiki/MilestoneDownloads
288    Notes:     used by VisBio and Bio-Formats to connect to OMERO
289    License:   LGPL
290
291Spring
292    JAR file:  spring.jar
293    URL:       http://springframework.org
294    Notes:     used by VisBio and Bio-Formats to connect to OMERO
295    License:   Apache
296
297JBoss
298    JAR file:  jbossall-client.jar
299    URL:       http://jboss.org
300    Notes:     used by VisBio and Bio-Formats to connect to OMERO
301    License:   LGPL
302
303Apache Jakarta POI
304    JAR file:  poi-loci.jar
305    URL:       http://jakarta.apache.org/poi/
306    Notes:     based on poi-2.5.1-final-20040804.jar, with bugfixes for OLE v2
307               and memory efficiency improvements;
308               used by Bio-Formats via reflection for OLE support
309               (CXD, IPW, OIB, ZVI);
310               used by VisBio overlays logic for XLS export feature
311    License:   Apache
312
313Skin Look and Feel
314    JAR file:  skinlf.jar
315    URL:       http://skinlf.l2fprod.com/
316    Notes:     not used (may be used in the future for flexible skinning)
317    License:   Custom (BSD-like)
318
319TestNG
320    JAR file:  testng-5.7-jdk14.jar
321    URL:       http://testng.org/
322    Notes:     testing framework used for LOCI software automated test suite
323    License:   Apache
324
325VisAD
326    JAR file:  visad-lite.jar
327    URL:       http://www.ssec.wisc.edu/~billh/visad.html
328    Notes:     stripped down VisAD library used by VisBio and Slim Plotter
329               for interactive visualization
330    License:   LGPL
331
332Apache XML-RPC
333    JAR file:  xmlrpc-1.2-b1.jar
334    URL:       http://ws.apache.org/xmlrpc/
335    Notes:     required for OME-Java to communicate with OME servers
336    License:   Apache
337-->
338
339<project name="LOCI Software" default="jars" basedir=".">
340  <description>
341    Master build file for all Java software projects at LOCI
342  </description>
343
344  <property file="build.properties"/>
345  <property file="${user.home}/.ant-global.properties"/>
346
347  <condition property="isUnix"><os family="unix"/></condition>
348
349  <!-- Non-core ant tasks -->
350
351  <path id="cp-testng">
352    <pathelement location="${classes.dir}"/>
353    <fileset dir="jar">
354      <include name="*.jar"/>
355    </fileset>
356  </path>
357
358  <taskdef name="testng" classpathref="cp-testng"
359    classname="org.testng.TestNGAntTask"/>
360
361  <!-- NB - We do not reference build/jar/loci-checks.jar directly, as doing so
362    causes loci-checks.jar to be locked by some file systems (Windows in
363    particular), which causes the clean and clean-jars targets to fail. -->
364  <taskdef resource="checkstyletask.properties"
365    classpath="jar/checkstyle-all-4.2.jar:jar/loci-checks.jar"/>
366
367  <taskdef resource="net/sf/antcontrib/antcontrib.properties"
368    classpath="jar/ant-contrib-1.0b1.jar"/>
369  <!-- HACK - some environments do not install the antcontrib tasks properly
370    from antcontrib.properties above; also load them from antlib.xml -->
371  <taskdef resource="net/sf/antcontrib/antlib.xml"
372    classpath="jar/ant-contrib-1.0b1.jar"/>
373
374  <!--
375  <taskdef resource="proguard/ant/task.properties"
376    classpath="jar/proguard.jar"/>
377  -->
378
379  <!-- Global build targets -->
380
381  <target name="init">
382    <tstamp>
383      <format property="DATE" pattern="d MMMMM yyyy"/>
384      <format property="YEAR" pattern="yyyy"/>
385    </tstamp>
386  </target>
387
388  <target name="style"
389    depends="style-formats, style-visbio, style-plugins, style-notes,
390      style-editor, style-slim, style-checks"
391    description="check source code style for LOCI software packages"/>
392
393<!--
394  <target name="compile" depends="copy-source"
395    description="compile classes for LOCI software packages">
396    <mkdir dir="${classes.dir}"/>
397    <javac srcdir="${dest.dir}" destdir="${classes.dir}" debug="true"
398      classpath="${ext.jars}" deprecation="true" source="1.4" target="1.4"/>
399  </target>
400-->
401  <target name="compile"
402    depends="compile-formats, compile-visbio, compile-plugins, compile-notes,
403      compile-jvmlink, compile-slim, compile-editor, compile-tests,
404      compile-checks"
405    description="compile classes for LOCI software packages"/>
406
407  <target name="jars"
408    depends="jar-formats, jar-visbio, jar-plugins, jar-notes,
409      jar-jvmlink, jar-slim, jar-editor, jar-checks"
410    description="generate JAR files for LOCI software packages"/>
411
412  <target name="tools" depends="jars"
413    description="create JAR file encompassing several LOCI tools">
414    <for list="${tools.libraries}" param="jar" delimiter=" " trim="true">
415      <sequential>
416        <available file="${jar.dir}/@{jar}" property="@{jar}.present"/>
417        <if>
418          <equals arg1="${@{jar}.present}" arg2="true" />
419          <then>
420            <unjar src="${jar.dir}/@{jar}" dest="${tools.dir}">
421              <patternset>
422                <exclude name="META-INF/**"/>
423              </patternset>
424            </unjar>
425          </then>
426        </if>
427      </sequential>
428    </for>
429    <jar jarfile="${jar.dir}/${tools.jar}" basedir="${tools.dir}">
430      <manifest>
431        <attribute name="Main-Class" value="${tools.main}"/>
432      </manifest>
433    </jar>
434    <delete dir="${tools.dir}"/>
435  </target>
436
437  <target name="docs" depends="copy-source"
438    description="generate javadocs for LOCI software packages">
439    <javadoc sourcepath="${dest.dir}" destdir="${docs.dir}/api"
440      classpath="${ext.jars}" author="true" version="true" use="true"
441      nodeprecated="true" windowtitle="LOCI Software API">
442      <packageset dir="${dest.dir}"/>
443      <doctitle><![CDATA[<h1>LOCI Software</h1>]]></doctitle>
444      <bottom><![CDATA[${copyright.begin} ${YEAR} ${copyright.end}]]></bottom>
445      <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
446      <link href="http://www.ssec.wisc.edu/~dglo/docs/"/>
447      <link href="http://rsbweb.nih.gov/ij/developer/api/"/>
448      <link href="http://www.jdocs.com/formlayout/1.0.4/api/"/>
449      <link href="http://www.jdocs.com/looks/1.2.2/api/"/>
450    </javadoc>
451  </target>
452
453  <target name="clean" description="remove all build files">
454    <delete dir="${build.dir}"/>
455  </target>
456
457  <target name="clean-classes" description="remove classes from build folder">
458    <delete dir="${classes.dir}"/>
459  </target>
460
461  <target name="clean-dist"
462    description="remove distribution bundles from build folder">
463    <delete dir="${dist.dir}"/>
464  </target>
465
466  <target name="clean-docs" description="remove javadocs from build folder">
467    <delete dir="${docs.dir}"/>
468  </target>
469
470  <target name="clean-jars" description="remove JAR files from build folder">
471    <delete dir="${jar.dir}"/>
472  </target>
473
474  <target name="clean-src" description="remove source files from build folder">
475    <delete dir="${dest.dir}"/>
476  </target>
477
478  <target name="dev-compile" description="compile classes in-place (no copy)">
479    <!-- By default, source files should compile under Java 1.4 -->
480    <javac srcdir="." destdir="." debug="true" classpath="${ext.jars}"
481      deprecation="true" source="1.4" target="1.4"
482      includes="loci/**" excludes="${java15.dirs}"/>
483    <!-- Source files requiring Java 1.5 -->
484    <javac srcdir="." destdir="." debug="true" classpath="${ext.jars}"
485      deprecation="true" source="1.5" target="1.5" includes="${java15.dirs}"/>
486  </target>
487
488  <target name="dev-clean" description="remove classes in-place (no copy)">
489    <delete>
490      <fileset dir="." includes="loci/**/*.class"/>
491    </delete>
492  </target>
493
494  <target name="test-all" depends="compile"
495    description="run all automated tests">
496    <testng classpathref="cp-testng" sourceDir="${dest.dir}"
497      annotations="Javadoc" groups="all" testname="All tests"
498      listener="loci.tests.testng.DotTestListener"
499      suitename="LOCI software test suite">
500      <classfileset dir="${classes.dir}" includes="${testng.classes}"/>
501      <sysproperty key="testng.filename" value="${testng.filename}"/>
502      <sysproperty key="testng.directory" value="${testng.directory}"/>
503      <sysproperty key="testng.multiplier" value="${testng.multiplier}"/>
504      <sysproperty key="lurawave.license" value="${lurawave.license}"/>
505      <jvmarg value="-mx${testng.memory}"/>
506    </testng>
507  </target>
508
509  <target name="test-config" depends="compile"
510    description="generate config files for automated test suite">
511    <testng classpathref="cp-testng" sourceDir="${dest.dir}"
512      annotations="Javadoc" groups="config" testname="Config generation"
513      listener="loci.tests.testng.DotTestListener"
514      suitename="LOCI software test suite">
515      <classfileset dir="${classes.dir}" includes="${testng.classes}"/>
516      <sysproperty key="testng.directory" value="${testng.directory}"/>
517      <sysproperty key="testng.multiplier" value="${testng.multiplier}"/>
518      <sysproperty key="lurawave.license" value="${lurawave.license}"/>
519      <jvmarg value="-mx${testng.memory}"/>
520    </testng>
521  </target>
522
523  <target name="test-fast" depends="compile"
524    description="run automated tests in group 'fast'">
525    <testng classpathref="cp-testng" sourceDir="${dest.dir}"
526      annotations="Javadoc" groups="fast" testname="Fast tests"
527      listener="loci.tests.testng.DotTestListener"
528      suitename="LOCI software test suite">
529      <classfileset dir="${classes.dir}" includes="${testng.classes}"/>
530      <sysproperty key="testng.directory" value="${testng.directory}"/>
531      <sysproperty key="testng.multiplier" value="${testng.multiplier}"/>
532      <sysproperty key="lurawave.license" value="${lurawave.license}"/>
533      <jvmarg value="-Xmx${testng.memory}"/>
534    </testng>
535  </target>
536
537  <target name="test-pixels" depends="compile"
538    description="run automated tests in group 'pixels'">
539    <testng classpathref="cp-testng" sourceDir="${dest.dir}"
540      annotations="Javadoc" groups="pixels" testname="Pixels tests"
541      listener="loci.tests.testng.DotTestListener"
542      suitename="LOCI software test suite">
543      <classfileset dir="${classes.dir}" includes="${testng.classes}"/>
544      <sysproperty key="testng.directory" value="${testng.directory}"/>
545      <sysproperty key="testng.multiplier" value="${testng.multiplier}"/>
546      <sysproperty key="lurawave.license" value="${lurawave.license}"/>
547      <jvmarg value="-Xmx${testng.memory}"/>
548    </testng>
549  </target>
550
551  <target name="test-xml" depends="compile"
552    description="run automated tests in group 'xml'">
553    <testng classpathref="cp-testng" sourceDir="${dest.dir}"
554      annotations="Javadoc" groups="xml" testname="XML tests"
555      listener="loci.tests.testng.DotTestListener"
556      suitename="LOCI software test suite">
557      <classfileset dir="${classes.dir}" includes="${testng.classes}"/>
558      <sysproperty key="testng.directory" value="${testng.directory}"/>
559      <sysproperty key="testng.multiplier" value="${testng.multiplier}"/>
560      <sysproperty key="lurawave.license" value="${lurawave.license}"/>
561      <jvmarg value="-Xmx${testng.memory}"/>
562    </testng>
563  </target>
564
565  <!-- Internal build targets -->
566
567  <target name="copy-resources-formats">
568    <copy todir="${classes.dir}" preservelastmodified="true">
569      <fileset dir="${src.dir}" includes="${formats.resources}"/>
570    </copy>
571  </target>
572
573  <target name="copy-resources-visbio">
574    <copy todir="${classes.dir}" preservelastmodified="true">
575      <fileset dir="${src.dir}" includes="${visbio.resources}"/>
576    </copy>
577  </target>
578
579  <target name="copy-resources-plugins">
580    <copy todir="${classes.dir}" preservelastmodified="true">
581      <fileset dir="${src.dir}" includes="${plugins.resources}"/>
582    </copy>
583  </target>
584
585  <target name="copy-resources-notes">
586    <copy todir="${classes.dir}" preservelastmodified="true">
587      <fileset dir="${src.dir}" includes="${notes.resources}"/>
588    </copy>
589  </target>
590
591  <target name="copy-resources-editor">
592    <copy todir="${classes.dir}" preservelastmodified="true">
593      <fileset dir="${src.dir}" includes="${editor.resources}"/>
594    </copy>
595  </target>
596
597  <target name="copy-resources-checks">
598    <copy todir="${classes.dir}" preservelastmodified="true">
599      <fileset dir="${src.dir}" includes="${checks.resources}"/>
600    </copy>
601  </target>
602
603  <target name="copy-source" depends="init, copy-resources-formats,
604    copy-resources-visbio, copy-resources-plugins, copy-resources-notes,
605                copy-resources-editor, copy-resources-checks">
606    <!-- copy binary files without filtering -->
607    <copy todir="${dest.dir}" preservelastmodified="true">
608      <fileset dir="${src.dir}" includes="loci/**"
609        excludes="**/*.java **/*.config **/*.txt ${ignore.source}"/>
610    </copy>
611    <!-- copy source files with filtering -->
612    <filter token="date" value="${DATE}"/>
613    <filter token="year" value="${YEAR}"/>
614    <filter token="visbio.version" value="${visbio.version}"/>
615    <copy todir="${dest.dir}" filtering="true" preservelastmodified="true">
616      <fileset dir="${src.dir}" includes="loci/**"
617        excludes="${ignore.source}"/>
618    </copy>
619  </target>
620
621  <target name="copy-jars">
622    <!-- copy needed external JARs into build jars folder -->
623    <copy todir="${jar.dir}" preservelastmodified="true">
624      <fileset dir="jar"/>
625    </copy>
626  </target>
627
628  <!-- Bio-Formats -->
629
630  <target name="style-formats" depends="copy-source, jar-checks"
631    description="check source code style for Bio-Formats">
632    <checkstyle config="checkstyle.xml" failOnViolation="false">
633      <fileset dir="${dest.dir}" includes="${formats.source}"/>
634    </checkstyle>
635  </target>
636
637  <target name="compile-formats" depends="copy-source"
638    description="compile classes for Bio-Formats">
639    <mkdir dir="${classes.dir}"/>
640    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
641      includes="${formats.source}" excludes="${formats.exclude}"
642      classpath="${ext.jars}"
643      debug="true" deprecation="true" source="1.4" target="1.4"/>
644  </target>
645
646  <target name="jar-formats" depends="compile-formats, copy-jars"
647    description="generate JAR file for Bio-Formats">
648    <mkdir dir="${jar.dir}"/>
649    <jar jarfile="${jar.dir}/${formats.jar}" basedir="${classes.dir}"
650      includes="${formats.files}">
651      <manifest>
652        <attribute name="Main-Class" value="${formats.main}"/>
653        <attribute name="Class-Path" value="${formats.classpath}"/>
654      </manifest>
655    </jar>
656  </target>
657
658  <!-- VisBio -->
659
660  <target name="style-visbio" depends="copy-source, jar-checks"
661    description="check source code style for VisBio">
662    <checkstyle config="checkstyle.xml" failOnViolation="false">
663      <fileset dir="${dest.dir}" includes="${visbio.source}"/>
664    </checkstyle>
665  </target>
666
667  <target name="compile-visbio" depends="copy-source"
668    description="compile classes for VisBio">
669    <mkdir dir="${classes.dir}"/>
670    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
671      includes="${visbio.source}" classpath="${ext.jars}"
672      debug="true" deprecation="true" source="1.4" target="1.4"/>
673  </target>
674
675  <target name="jar-visbio" depends="compile-visbio, copy-jars, jar-formats"
676    description="generate JAR file for VisBio">
677    <jar jarfile="${jar.dir}/${visbio.jar}" basedir="${classes.dir}"
678      includes="${visbio.files}">
679      <manifest>
680        <attribute name="Main-Class" value="${visbio.main}"/>
681        <attribute name="Class-Path" value="${visbio.classpath}"/>
682      </manifest>
683    </jar>
684  </target>
685
686  <target name="source-visbio" depends="copy-source"
687    description="generate source bundle for VisBio">
688    <zip zipfile="${build.dir}/visbio_src.zip" basedir="${dest.dir}"
689      includes="loci/visbio/**"/>
690  </target>
691
692  <target name="docs-visbio" depends="copy-source"
693    description="generate javadocs for VisBio">
694    <javadoc sourcepath="${dest.dir}" destdir="${visbio.docs-dir}/docs/api"
695      classpath="${ext.jars}" author="true" version="true" use="true"
696      nodeprecated="true" windowtitle="LOCI Software API">
697      <packageset dir="${dest.dir}" includes="loci/visbio/**"/>
698      <doctitle><![CDATA[<h1>VisBio</h1>]]></doctitle>
699      <bottom><![CDATA[${copyright.begin} ${YEAR} ${copyright.end}]]></bottom>
700      <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
701      <link href="http://www.ssec.wisc.edu/~dglo/docs/"/>
702      <link href="http://rsbweb.nih.gov/ij/developer/api/"/>
703      <link href="http://www.jdocs.com/formlayout/1.0.4/api/"/>
704      <link href="http://www.jdocs.com/looks/1.2.2/api/"/>
705    </javadoc>
706    <zip zipfile="${build.dir}/visbio_docs.zip" basedir="${visbio.docs-dir}"/>
707  </target>
708
709  <target name="dist-visbio"
710    depends="dist-visbio-win32, dist-visbio-win32-nojre, dist-visbio-macosx,
711      dist-visbio-linux, dist-visbio-nojre"
712    description="create distribution bundles for VisBio"/>
713
714  <target name="dist-visbio-win32" depends="jar-visbio, jar-formats"
715    description="create distribution bundle for VisBio: Windows w/ JRE">
716    <copy todir="${visbio.win32-dir}/VisBio" preservelastmodified="true">
717      <fileset dir="dist/visbio/win32"/>
718      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
719      <fileset dir="${jar.dir}" includes="${visbio.jar} ${visbio.classpath}"/>
720    </copy>
721    <fixcrlf srcdir="${visbio.win32-dir}/VisBio" eol="dos"
722      includes="${visbio.text-files}"/>
723    <untar src="dist/jre-win32.tar.gz" dest="${visbio.win32-dir}/VisBio"
724      overwrite="false" compression="gzip"/>
725    <zip destfile="${dist.dir}/visbio${visbio.version}_win32.zip"
726      basedir="${visbio.win32-dir}"/>
727  </target>
728
729  <target name="dist-visbio-win32-nojre" depends="jar-visbio, jar-formats"
730    description="create distribution bundle for VisBio: Windows no JRE">
731    <copy todir="${visbio.win32-nojre-dir}/VisBio"
732      preservelastmodified="true">
733      <fileset dir="dist/visbio/win32" excludes="launcher.cfg"/>
734      <fileset dir="dist/visbio/win32-nojre"/>
735      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
736      <fileset dir="${jar.dir}" includes="${visbio.jar} ${visbio.classpath}"/>
737    </copy>
738    <fixcrlf srcdir="${visbio.win32-nojre-dir}/VisBio" eol="dos"
739      includes="${visbio.text-files}"/>
740    <zip destfile="${dist.dir}/visbio${visbio.version}_win32_nojre.zip"
741      basedir="${visbio.win32-nojre-dir}"/>
742  </target>
743
744  <!-- HACK - limit OS to *nix due to file permission issues -->
745  <target name="dist-visbio-macosx" if="isUnix"
746    depends="jar-visbio, jar-formats"
747    description="create distribution bundle for VisBio: Mac OS X">
748    <copy todir="${visbio.macosx-dir}/VisBio"
749      preservelastmodified="true">
750      <fileset dir="dist/visbio/macosx"/>
751      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
752    </copy>
753    <fixcrlf srcdir="${visbio.macosx-dir}/VisBio" eol="mac"
754      includes="${visbio.text-files}"/>
755    <!-- HACK - copy does not preserve permissions; chmod them back -->
756    <chmod perm="+x">
757      <fileset dir="${visbio.macosx-dir}/VisBio"
758        includes="${visbio.macosx-exec}"/>
759    </chmod>
760    <copy
761      todir="${visbio.macosx-dir}/VisBio/VisBio.app/Contents/Resources/Java">
762      <fileset dir="${jar.dir}" includes="${visbio.jar} ${visbio.classpath}"/>
763    </copy>
764<!--
765    <tar destfile="${dist.dir}/visbio${visbio.version}_macosx.tar.gz"
766      basedir="${visbio.macosx-dir}" compression="gzip"/>
767-->
768    <!-- HACK - tar does not preserve permissions; use exec instead -->
769    <echo>Building tar: visbio${visbio.version}_macosx.tar.gz</echo>
770    <exec executable="tar">
771      <arg value="czf"/>
772      <arg value="${dist.dir}/visbio${visbio.version}_macosx.tar.gz"/>
773      <arg value="-C"/>
774      <arg value="${visbio.macosx-dir}"/>
775      <arg value="VisBio"/>
776    </exec>
777  </target>
778
779  <!-- HACK - limit OS to *nix due to file permission issues -->
780  <target name="dist-visbio-linux" if="isUnix"
781    depends="jar-visbio, jar-formats"
782    description="create distribution bundle for VisBio: Linux w/ JRE">
783    <copy todir="${visbio.linux-dir}/visbio${visbio.version}"
784      preservelastmodified="true">
785      <fileset dir="dist/visbio/linux"/>
786      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
787      <fileset dir="${jar.dir}" includes="${visbio.jar} ${visbio.classpath}"/>
788    </copy>
789    <fixcrlf srcdir="${visbio.linux-dir}/visbio${visbio.version}" eol="unix"
790      includes="${visbio.text-files}"/>
791    <!-- HACK - copy does not preserve permissions; chmod them back -->
792    <chmod perm="+x">
793      <fileset dir="${visbio.linux-dir}/visbio${visbio.version}"
794        includes="${visbio.linux-exec}"/>
795    </chmod>
796<!--
797    <untar src="dist/jre-linux.tar.gz"
798      dest="${visbio.linux-dir}/visbio${visbio.version}"
799      overwrite="false" compression="gzip"/>
800-->
801    <!-- HACK - untar does not restore permissions; use exec instead -->
802    <echo>Expanding: jre-linux.tar.gz</echo>
803    <exec executable="tar">
804      <arg value="xzf"/>
805      <arg value="dist/jre-linux.tar.gz"/>
806      <arg value="-C"/>
807      <arg value="${visbio.linux-dir}/visbio${visbio.version}"/>
808    </exec>
809<!--
810    <tar destfile="${dist.dir}/visbio${visbio.version}_linux.tar.gz"
811      basedir="${visbio.linux-dir}" compression="gzip"/>
812-->
813    <!-- HACK - tar does not preserve permissions; use exec instead -->
814    <echo>Building tar: visbio${visbio.version}_linux.tar.gz</echo>
815    <exec executable="tar">
816      <arg value="czf"/>
817      <arg value="${dist.dir}/visbio${visbio.version}_linux.tar.gz"/>
818      <arg value="-C"/>
819      <arg value="${visbio.linux-dir}"/>
820      <arg value="visbio${visbio.version}"/>
821    </exec>
822  </target>
823
824  <!-- HACK - limit OS to *nix due to file permission issues -->
825  <target name="dist-visbio-nojre" if="isUnix"
826    depends="jar-visbio, jar-formats"
827    description="create distribution bundle for VisBio: cross-platform">
828    <copy todir="${visbio.nojre-dir}/visbio${visbio.version}"
829      preservelastmodified="true">
830      <fileset dir="dist/visbio/linux"/>
831      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
832      <fileset dir="${jar.dir}" includes="${visbio.jar} ${visbio.classpath}"/>
833    </copy>
834    <fixcrlf srcdir="${visbio.nojre-dir}/visbio${visbio.version}" eol="unix"
835      includes="${visbio.text-files}"/>
836    <!-- HACK - copy does not preserve permissions; chmod them back -->
837    <chmod perm="+x">
838      <fileset dir="${visbio.nojre-dir}/visbio${visbio.version}"
839        includes="${visbio.linux-exec}"/>
840    </chmod>
841<!--
842    <tar destfile="${dist.dir}/visbio${visbio.version}.tar.gz"
843      basedir="${visbio.nojre-dir}" compression="gzip"/>
844-->
845    <!-- HACK - tar does not preserve permissions; use exec instead -->
846    <echo>Building tar: visbio${visbio.version}.tar.gz</echo>
847    <exec executable="tar">
848      <arg value="czf"/>
849      <arg value="${dist.dir}/visbio${visbio.version}.tar.gz"/>
850      <arg value="-C"/>
851      <arg value="${visbio.nojre-dir}"/>
852      <arg value="visbio${visbio.version}"/>
853    </exec>
854  </target>
855
856  <!-- LOCI Plugins for ImageJ -->
857
858  <target name="style-plugins" depends="copy-source, jar-checks"
859    description="check source code style for LOCI Plugins for ImageJ">
860    <checkstyle config="checkstyle.xml" failOnViolation="false">
861      <fileset dir="${dest.dir}" includes="${plugins.source}"/>
862    </checkstyle>
863  </target>
864
865  <target name="compile-plugins" depends="copy-source"
866    description="compile classes for LOCI Plugins for ImageJ">
867    <mkdir dir="${classes.dir}"/>
868    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
869      includes="${plugins.source}" classpath="${ext.jars}"
870      debug="true" deprecation="true" source="1.4" target="1.4"/>
871  </target>
872
873  <target name="jar-plugins" depends="compile-plugins, copy-jars, jar-formats"
874    description="generate JAR file for LOCI Plugins for ImageJ">
875    <jar jarfile="${jar.dir}/${plugins.jar}" basedir="${src.dir}/loci/plugins"
876      includes="plugins.config IJ_Props.txt">
877      <manifest>
878        <attribute name="Main-Class" value="${plugins.main}"/>
879      </manifest>
880    </jar>
881    <jar jarfile="${jar.dir}/${plugins.jar}" basedir="${classes.dir}"
882      includes="${plugins.files}"
883      excludes="loci/plugins/plugins.config loci/plugins/IJ_Props.txt"
884      update="true">
885    </jar>
886  </target>
887
888  <!-- OME Notes -->
889
890  <target name="style-notes" depends="copy-source, jar-checks"
891    description="check source code style for OME Notes">
892    <checkstyle config="checkstyle.xml" failOnViolation="false">
893      <fileset dir="${dest.dir}" includes="${notes.source}"/>
894    </checkstyle>
895  </target>
896
897  <target name="compile-notes" depends="copy-source"
898    description="compile classes for OME Notes">
899    <mkdir dir="${classes.dir}"/>
900    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
901      includes="${notes.source}" classpath="${ext.jars}"
902      debug="true" deprecation="true" source="1.4" target="1.4"/>
903  </target>
904
905  <target name="jar-notes"
906    depends="compile-notes, copy-jars, jar-formats"
907    description="generate JAR file for OME Notes">
908    <jar jarfile="${jar.dir}/${notes.jar}" basedir="${classes.dir}"
909      includes="${notes.files}">
910      <manifest>
911        <attribute name="Main-Class" value="${notes.main}"/>
912        <attribute name="Class-Path" value="${notes.classpath}"/>
913      </manifest>
914    </jar>
915  </target>
916
917  <!-- JVMLink -->
918
919  <target name="style-jvmlink" depends="copy-source, jar-checks"
920    description="check source code style for JVMLink">
921    <checkstyle config="checkstyle.xml" failOnViolation="false">
922      <fileset dir="${dest.dir}" includes="${jvmlink.source}"/>
923    </checkstyle>
924  </target>
925
926  <target name="compile-jvmlink" depends="copy-source"
927    description="compile classes for JVMLink">
928    <mkdir dir="${classes.dir}"/>
929    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
930      includes="${jvmlink.source}" classpath="${ext.jars}"
931      debug="true" deprecation="true" source="1.4" target="1.4"/>
932  </target>
933
934  <target name="jar-jvmlink"
935    depends="compile-formats, compile-jvmlink, copy-jars"
936    description="generate JAR file for JVMLink">
937    <jar jarfile="${jar.dir}/${jvmlink.jar}" basedir="${classes.dir}"
938      includes="${jvmlink.files}">
939      <manifest>
940        <attribute name="Main-Class" value="${jvmlink.main}"/>
941        <!--<attribute name="Class-Path" value="${jvmlink.classpath}"/>-->
942      </manifest>
943    </jar>
944  </target>
945
946  <!-- Slim Plotter -->
947
948  <target name="style-slim" depends="copy-source, jar-checks"
949    description="check source code style for Slim Plotter">
950    <checkstyle config="checkstyle.xml" failOnViolation="false">
951      <fileset dir="${dest.dir}" includes="${slim.source}"/>
952    </checkstyle>
953  </target>
954
955  <target name="compile-slim" depends="copy-source"
956    description="compile classes for Slim Plotter">
957    <mkdir dir="${classes.dir}"/>
958    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
959      includes="${slim.source}" classpath="${ext.jars}"
960      debug="true" deprecation="true" source="1.4" target="1.4"/>
961  </target>
962
963  <target name="jar-slim" depends="compile-slim, copy-jars"
964    description="generate JAR file for Slim Plotter">
965    <jar jarfile="${jar.dir}/${slim.jar}" basedir="${classes.dir}"
966      includes="${slim.files}">
967      <manifest>
968        <attribute name="Main-Class" value="${slim.main}"/>
969        <attribute name="Class-Path" value="${slim.classpath}"/>
970      </manifest>
971    </jar>
972  </target>
973
974  <target name="dist-slim" if="isUnix"
975    depends="copy-jars, jar-formats, jar-slim"
976    description="create distribution bundle for Slim Plotter">
977    <copy todir="${slim.dist-dir}" preservelastmodified="true">
978      <fileset dir="dist/slim"/>
979      <fileset dir="${jar.dir}" includes="${slim.jar} ${slim.classpath}"/>
980    </copy>
981    <!-- HACK - copy does not preserve permissions; chmod them back -->
982    <chmod perm="+x">
983      <fileset dir="${slim.dist-dir}" includes="${slim.exec}"/>
984    </chmod>
985<!--
986    <zip destfile="${dist.dir}/slim.zip" basedir="${dist.dir}/slim"/>
987-->
988    <!-- HACK - zip does not preserve permissions; use exec instead -->
989    <exec executable="zip" dir="${dist.dir}/slim">
990      <arg value="-r9"/>
991      <arg value="../slim.zip"/>
992      <arg value="SlimPlotter"/>
993    </exec>
994  </target>
995
996  <!-- OME Metadata Editor -->
997
998  <target name="style-editor" depends="copy-source, jar-checks"
999    description="check source code style for OME Metadata Editor">
1000    <checkstyle config="checkstyle.xml" failOnViolation="false">
1001      <fileset dir="${dest.dir}" includes="${editor.source}"/>
1002    </checkstyle>
1003  </target>
1004
1005  <target name="compile-editor" depends="copy-source"
1006    description="compile classes for OME Metadata Editor">
1007    <mkdir dir="${classes.dir}"/>
1008    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
1009      includes="${editor.source}" classpath="${ext.jars}"
1010      debug="true" deprecation="true" source="1.4" target="1.4"/>
1011  </target>
1012
1013  <target name="jar-editor"
1014    depends="compile-editor, copy-jars, jar-formats"
1015    description="generate JAR file for OME Metadata Editor">
1016    <jar jarfile="${jar.dir}/${editor.jar}" basedir="${classes.dir}"
1017      includes="${editor.files}">
1018      <manifest>
1019        <attribute name="Main-Class" value="${editor.main}"/>
1020        <attribute name="Class-Path" value="${editor.classpath}"/>
1021      </manifest>
1022    </jar>
1023  </target>
1024
1025  <!-- Automated tests -->
1026
1027  <target name="style-tests" depends="copy-source, jar-checks"
1028    description="check source code style for testing framework">
1029    <checkstyle config="checkstyle.xml" failOnViolation="false">
1030      <fileset dir="${dest.dir}" includes="${tests.source}"/>
1031    </checkstyle>
1032  </target>
1033
1034  <target name="compile-tests" depends="copy-source"
1035    description="compile classes for testing framework">
1036    <mkdir dir="${classes.dir}"/>
1037    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
1038      includes="${tests.source}" classpath="${ext.jars}"
1039      debug="true" deprecation="true" source="1.4" target="1.4"/>
1040  </target>
1041
1042  <!-- LOCI Checkstyle checks -->
1043
1044  <target name="style-checks" depends="copy-source, jar-checks"
1045    description="check source code style for LOCI Checkstyle checks">
1046    <checkstyle config="checkstyle.xml" failOnViolation="false">
1047      <fileset dir="${dest.dir}" includes="${checks.source}"/>
1048    </checkstyle>
1049  </target>
1050
1051  <target name="compile-checks" depends="copy-source"
1052    description="compile classes for LOCI Checkstyle checks">
1053    <mkdir dir="${classes.dir}"/>
1054    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
1055      includes="${checks.source}" classpath="${ext.jars}"
1056      debug="true" deprecation="true" source="1.4" target="1.4"/>
1057  </target>
1058
1059  <target name="jar-checks" depends="compile-checks, copy-jars"
1060    description="generate JAR file for LOCI Checkstyle checks">
1061    <jar jarfile="${jar.dir}/${checks.jar}" basedir="${classes.dir}"
1062      includes="${checks.files}">
1063      <manifest>
1064        <attribute name="Main-Class" value="${checks.main}"/>
1065        <attribute name="Class-Path" value="${checks.classpath}"/>
1066      </manifest>
1067    </jar>
1068  </target>
1069
1070  <!-- ImageJ -->
1071
1072  <target name="ij-jws" depends="tools"
1073    description="create JAR file encompassing ImageJ plus LOCI plugins">
1074    <for list="${ij-jws.libraries}" param="jar" delimiter=" " trim="true">
1075      <sequential>
1076        <unjar src="${jar.dir}/@{jar}" dest="${ij-jws.dir}">
1077          <patternset>
1078            <exclude name="META-INF/**"/>
1079          </patternset>
1080        </unjar>
1081      </sequential>
1082    </for>
1083    <jar jarfile="${jar.dir}/${ij-jws.jar}" basedir="${ij-jws.dir}">
1084      <manifest>
1085        <attribute name="Main-Class" value="${ij-jws.main}"/>
1086      </manifest>
1087    </jar>
1088    <delete dir="${ij-jws.dir}"/>
1089  </target>
1090
1091</project>
Note: See TracBrowser for help on using the repository browser.