source: tags/loci-tools-2007-Mar-16/build.xml @ 2471

Revision 2471, 29.0 KB checked in by curtis, 13 years ago (diff)

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