source: tags/loci-tools-2007-Feb-7/build.xml @ 2240

Revision 2240, 30.4 KB checked in by curtis, 13 years ago (diff)

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