source: tags/loci-tools-2007-May-03/build.xml @ 2747

Revision 2747, 30.8 KB checked in by curtis, 13 years ago (diff)

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