source: trunk/build.xml @ 3381

Revision 3381, 32.6 KB checked in by curtis, 13 years ago (diff)

Remove cruft.

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