source: trunk/build.xml @ 3309

Revision 3309, 31.3 KB checked in by melissa, 12 years ago (diff)

Added support for Imaris 5.5 (HDF-based).

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