source: tags/loci-tools-2007-Dec-28/build.xml @ 3515

Revision 3515, 33.9 KB checked in by melissa, 12 years ago (diff)

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