source: trunk/build.xml @ 1782

Revision 1782, 30.2 KB checked in by curtis, 14 years ago (diff)

Add jj2000-5.1.jar to ant targets, as appropriate.

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