source: trunk/build.xml @ 3089

Revision 3089, 30.1 KB checked in by curtis, 13 years ago (diff)

Do not include deprecated methods in Javadoc.

Line 
1<!--
2build.xml
3
4Master ant build file for all Java software projects at LOCI.
5Download Apache Ant from http://ant.apache.org/.
6Type "ant -p" for a list of targets.
7
8===============================================================================
9This build file handles the following projects:
10
11Bio-Formats
12    JAR file:      bio-formats.jar
13    Folders:       loci/formats
14                   loci/formats/*
15    Main class:    loci.formats.ImageViewer
16    Dependencies:  jai_imageio.jar (reflected)
17                   mdbtools-java.jar (reflected)
18                   ome-java.jar (reflected)
19                   poi-loci.jar (reflected)
20    Targets:       style-formats
21                   compile-formats
22                   jar-formats
23    License:       LGPL
24
25VisBio
26    JAR file:      visbio.jar
27    Folders:       loci/visbio
28                   loci/visbio/*
29    Main class:    loci.visbio.VisBio
30    Dependencies:  bio-formats.jar
31                   commons-httpclient-2.0-rc2.jar (ome-java.jar)
32                   commons-logging.jar (ome-java.jar)
33                   forms-1.0.4.jar
34                   ij.jar
35                   jai_imageio.jar (bio-formats.jar)
36                   looks-1.2.2.jar
37                   mdbtools-java.jar (bio-formats.jar)
38                   ome-java.jar
39                   poi-loci.jar (bio-formats.jar)
40                   visad-lite.jar
41                   xmlrpc-1.2-b1.jar (ome-java.jar)
42    Targets:       style-visbio
43                   compile-visbio
44                   jar-visbio
45                   source-visbio
46                   docs-visbio
47                   dist-visbio
48    License:       GPL
49
50LOCI Plugins for ImageJ
51    JAR file:      loci_plugins.jar
52    Folders:       loci/plugins
53                   loci/plugins/browser
54                   loci/ome/upload
55                   loci/ome/util
56    Main class:    loci.plugins.About
57    IJ plugins:    loci.plugins.browser.LociDataBrowser
58                   loci.plugins.LociImporter
59                   loci.plugins.LociExporter
60                   loci.plugins.LociUploader
61                   loci.plugins.ome.OMEPlugin
62    Dependencies:  bio-formats.jar
63                   commons-httpclient-2.0-rc2.jar (ome-java.jar)
64                   commons-logging.jar (ome-java.jar)
65                   jai_imageio.jar (bio-formats.jar)
66                   mdbtools-java.jar (bio-formats.jar)
67                   ome-java.jar (bio-formats.jar)
68                   poi-loci.jar (bio-formats.jar)
69                   xmlrpc-1.2-b1.jar (ome-java.jar)
70    Targets:       style-plugins
71                   compile-plugins
72                   jar-plugins
73    License:       LGPL
74
75OME Notes
76    JAR file:      ome-notes.jar
77    Folder:        loci/ome/notes
78    Main class:    loci.ome.notes.Notes
79    Dependencies:  bio-formats.jar
80                   commons-httpclient-2.0-rc2.jar (ome-java.jar)
81                   commons-logging.jar (ome-java.jar)
82                   forms-1.0.4.jar
83                   jai_imageio.jar (bio-formats.jar)
84                   mdbtools-java.jar (bio-formats.jar)
85                   ome-java.jar
86                   poi-loci.jar (bio-formats.jar)
87                   xmlrpc-1.2-b1.jar (ome-java.jar)
88    Targets:       style-notes
89                   compile-notes
90                   jar-notes
91    License:       LGPL
92
93OME Metadata Editor
94    JAR file:      ome-editor.jar
95    Folders:       loci/ome/editor
96                   loci/ome/viewer
97    Main class:    loci.ome.editor.MetadataEditor
98    Dependencies:  bio-formats.jar
99                   commons-httpclient-2.0-rc2.jar (ome-java.jar)
100                   commons-logging.jar (ome-java.jar)
101                   forms-1.0.4.jar
102                   jai_imageio.jar (bio-formats.jar)
103                   mdbtools-java.jar (bio-formats.jar)
104                   ome-java.jar
105                   poi-loci.jar (bio-formats.jar)
106                   xmlrpc-1.2-b1.jar (ome-java.jar)
107    Targets:       style-editor
108                   compile-editor
109                   jar-editor
110    License:       LGPL
111
112Slim Plotter
113    JAR file:      SlimPlotter.jar
114    Folders:       loci/apps/slim
115                   some loci/visbio
116    Main class:    loci.apps.slim.SlimPlotter
117    Dependencies:  bio-formats.jar
118                   lma.jar
119                   visad-lite.jar
120    Targets:       style-slim
121                   compile-slim
122                   jar-slim
123                   dist-slim
124    License:       Public domain
125
126LOCI Checkstyle checks
127    JAR file:      loci-checks.jar
128    Folders:       loci/checks
129    Main class:    loci.checks.About
130    Dependencies:  checkstyle-all-4.2.jar
131    Targets:       style-checks
132                   compile-checks
133                   jar-checks
134    License:       Public domain
135
136===============================================================================
137The following external dependencies (in the jar folder) may be required:
138
139Apple eAWT stubs
140    JAR file:  AppleJavaExtensions.jar
141    URL:       http://developer.apple.com/samplecode/AppleJavaExtensions/
142    Notes:     Required to compile VisBio on non-Mac OS X machines
143
144Ant-Contrib
145    JAR file:  ant-contrib-1.0b1.jar
146    URL:       http://ant-contrib.sourceforge.net/
147    Notes:     Used by tools target to iterate over JAR files ("for" task)
148    License:   Apache
149
150Checkstyle
151    JAR file:  checkstyle-all-4.2.jar
152    URL:       http://checkstyle.sourceforge.net/
153    Notes:     Used by style targets to check source code style conventions
154    License:   LGPL
155
156Apache Jakarta Commons HttpClient
157    JAR file:  commons-httpclient-2.0-rc2.jar
158    URL:       http://jakarta.apache.org/commons/httpclient/
159    Notes:     Required for OME Java to communicate with OME servers
160    License:   Apache
161
162Apache Jakarta Commons Logging
163    JAR file:  commons-logging.jar
164    URL:       http://jakarta.apache.org/commons/logging/
165    Notes:     Used by OME Java
166    License:   Apache
167
168JGoodies Forms
169    JAR file:  forms-1.0.4.jar
170    URL:       http://www.jgoodies.com/freeware/forms/index.html
171    Notes:     Used for layout by VisBio, 4D Data Browser and OME Notes
172    License:   BSD
173
174ImageJ
175    JAR file:  ij.jar
176    URL:       http://rsb.info.nih.gov/ij/
177    Notes:     Bundled with VisBio to achieve ImageJ interconnectivity
178    License:   Public domain
179
180Java Advanced Imaging Image I/O Tools
181    JAR file:  jai_imageio.jar
182    URL:       https://jai-imageio.dev.java.net/
183    Notes:     Used by Bio-Formats for JPEG2000 support (ND2, JP2)
184    License:   BSD
185
186JGoodies Looks
187    JAR file:  looks-1.2.2.jar
188    URL:       http://www.jgoodies.com/freeware/looks/index.html
189    Notes:     Used for a nicer Look & Feel by VisBio and OME Metadata Editor
190    License:   BSD
191
192MDB Tools (Java port)
193    JAR file:  mdbtools-java.jar
194    URLs:      http://mdbtools.sourceforge.net/
195               http://sourceforge.net/forum/message.php?msg_id=2550619
196    Notes:     Used by Bio-Formats for Zeiss LSM metadata in MDB database files
197    License:   LGPL
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 Notes 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-notes,
267      style-editor, 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-notes, compile-editor, compile-slim"
281    description="compile classes for LOCI software packages"/>
282
283  <target name="jars"
284    depends="jar-formats, jar-visbio, jar-plugins, jar-notes,
285      jar-editor, 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      nodeprecated="true" windowtitle="LOCI Software API">
312      <packageset dir="${dest.dir}"/>
313      <doctitle><![CDATA[<h1>LOCI Software</h1>]]></doctitle>
314      <bottom><![CDATA[${copyright.begin} ${YEAR} ${copyright.end}]]></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      classpath="${ext.jars}" author="true" version="true" use="true"
459      nodeprecated="true" windowtitle="LOCI Software API">
460      <packageset dir="${dest.dir}" includes="loci/visbio/**"/>
461      <doctitle><![CDATA[<h1>VisBio</h1>]]></doctitle>
462      <bottom><![CDATA[${copyright.begin} ${YEAR} ${copyright.end}]]></bottom>
463      <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
464      <link href="http://www.ssec.wisc.edu/~dglo/docs/"/>
465      <link href="http://rsbweb.nih.gov/ij/developer/api/"/>
466      <link href="http://www.jdocs.com/formlayout/1.0.4/api/"/>
467      <link href="http://www.jdocs.com/looks/1.2.2/api/"/>
468    </javadoc>
469    </javadoc>
470    <zip zipfile="${build.dir}/visbio_docs.zip" basedir="${visbio.docs-dir}"/>
471  </target>
472
473  <target name="dist-visbio"
474    depends="dist-visbio-win32, dist-visbio-win32-nojre, dist-visbio-macosx,
475      dist-visbio-linux, dist-visbio-nojre"
476    description="create distribution bundles for VisBio"/>
477
478  <target name="dist-visbio-win32" depends="jar-visbio, jar-formats"
479    description="create distribution bundle for VisBio: Windows w/ JRE">
480    <copy todir="${visbio.win32-dir}/VisBio" preservelastmodified="true">
481      <fileset dir="dist/visbio/win32"/>
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-dir}/VisBio" eol="dos"
486      includes="${visbio.text-files}"/>
487    <untar src="dist/jre-win32.tar.gz" dest="${visbio.win32-dir}/VisBio"
488      overwrite="false" compression="gzip"/>
489    <zip destfile="${dist.dir}/visbio${visbio.version}_win32.zip"
490      basedir="${visbio.win32-dir}"/>
491  </target>
492
493  <target name="dist-visbio-win32-nojre" depends="jar-visbio, jar-formats"
494    description="create distribution bundle for VisBio: Windows no JRE">
495    <copy todir="${visbio.win32-nojre-dir}/VisBio"
496      preservelastmodified="true">
497      <fileset dir="dist/visbio/win32" excludes="launcher.cfg"/>
498      <fileset dir="dist/visbio/win32-nojre"/>
499      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
500      <fileset dir="${jar.dir}" includes="${visbio.jar} ${visbio.classpath}"/>
501    </copy>
502    <fixcrlf srcdir="${visbio.win32-nojre-dir}/VisBio" eol="dos"
503      includes="${visbio.text-files}"/>
504    <zip destfile="${dist.dir}/visbio${visbio.version}_win32_nojre.zip"
505      basedir="${visbio.win32-nojre-dir}"/>
506  </target>
507
508  <!-- HACK - limit OS to *nix due to file permission issues -->
509  <target name="dist-visbio-macosx" if="isUnix"
510    depends="jar-visbio, jar-formats"
511    description="create distribution bundle for VisBio: Mac OS X">
512    <copy todir="${visbio.macosx-dir}/VisBio"
513      preservelastmodified="true">
514      <fileset dir="dist/visbio/macosx"/>
515      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
516    </copy>
517    <fixcrlf srcdir="${visbio.macosx-dir}/VisBio" eol="mac"
518      includes="${visbio.text-files}"/>
519    <!-- HACK - copy does not preserve permissions; chmod them back -->
520    <chmod perm="+x">
521      <fileset dir="${visbio.macosx-dir}/VisBio"
522        includes="${visbio.macosx-exec}"/>
523    </chmod>
524    <copy
525      todir="${visbio.macosx-dir}/VisBio/VisBio.app/Contents/Resources/Java">
526      <fileset dir="${jar.dir}" includes="${visbio.jar} ${visbio.classpath}"/>
527    </copy>
528<!--
529    <tar destfile="${dist.dir}/visbio${visbio.version}_macosx.tar.gz"
530      basedir="${visbio.macosx-dir}" compression="gzip"/>
531-->
532    <!-- HACK - tar does not preserve permissions; use exec instead -->
533    <echo>Building tar: visbio${visbio.version}_macosx.tar.gz</echo>
534    <exec executable="tar">
535      <arg value="czf"/>
536      <arg value="${dist.dir}/visbio${visbio.version}_macosx.tar.gz"/>
537      <arg value="-C"/>
538      <arg value="${visbio.macosx-dir}"/>
539      <arg value="VisBio"/>
540    </exec>
541  </target>
542
543  <!-- HACK - limit OS to *nix due to file permission issues -->
544  <target name="dist-visbio-linux" if="isUnix"
545    depends="jar-visbio, jar-formats"
546    description="create distribution bundle for VisBio: Linux w/ JRE">
547    <copy todir="${visbio.linux-dir}/visbio${visbio.version}"
548      preservelastmodified="true">
549      <fileset dir="dist/visbio/linux"/>
550      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
551      <fileset dir="${jar.dir}" includes="${visbio.jar} ${visbio.classpath}"/>
552    </copy>
553    <fixcrlf srcdir="${visbio.linux-dir}/visbio${visbio.version}" eol="unix"
554      includes="${visbio.text-files}"/>
555    <!-- HACK - copy does not preserve permissions; chmod them back -->
556    <chmod perm="+x">
557      <fileset dir="${visbio.linux-dir}/visbio${visbio.version}"
558        includes="${visbio.linux-exec}"/>
559    </chmod>
560<!--
561    <untar src="dist/jre-linux.tar.gz"
562      dest="${visbio.linux-dir}/visbio${visbio.version}"
563      overwrite="false" compression="gzip"/>
564-->
565    <!-- HACK - untar does not restore permissions; use exec instead -->
566    <echo>Expanding: jre-linux.tar.gz</echo>
567    <exec executable="tar">
568      <arg value="xzf"/>
569      <arg value="dist/jre-linux.tar.gz"/>
570      <arg value="-C"/>
571      <arg value="${visbio.linux-dir}/visbio${visbio.version}"/>
572    </exec>
573<!--
574    <tar destfile="${dist.dir}/visbio${visbio.version}_linux.tar.gz"
575      basedir="${visbio.linux-dir}" compression="gzip"/>
576-->
577    <!-- HACK - tar does not preserve permissions; use exec instead -->
578    <echo>Building tar: visbio${visbio.version}_linux.tar.gz</echo>
579    <exec executable="tar">
580      <arg value="czf"/>
581      <arg value="${dist.dir}/visbio${visbio.version}_linux.tar.gz"/>
582      <arg value="-C"/>
583      <arg value="${visbio.linux-dir}"/>
584      <arg value="visbio${visbio.version}"/>
585    </exec>
586  </target>
587
588  <!-- HACK - limit OS to *nix due to file permission issues -->
589  <target name="dist-visbio-nojre" if="isUnix"
590    depends="jar-visbio, jar-formats"
591    description="create distribution bundle for VisBio: cross-platform">
592    <copy todir="${visbio.nojre-dir}/visbio${visbio.version}"
593      preservelastmodified="true">
594      <fileset dir="dist/visbio/linux"/>
595      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
596      <fileset dir="${jar.dir}" includes="${visbio.jar} ${visbio.classpath}"/>
597    </copy>
598    <fixcrlf srcdir="${visbio.nojre-dir}/visbio${visbio.version}" eol="unix"
599      includes="${visbio.text-files}"/>
600    <!-- HACK - copy does not preserve permissions; chmod them back -->
601    <chmod perm="+x">
602      <fileset dir="${visbio.nojre-dir}/visbio${visbio.version}"
603        includes="${visbio.linux-exec}"/>
604    </chmod>
605<!--
606    <tar destfile="${dist.dir}/visbio${visbio.version}.tar.gz"
607      basedir="${visbio.nojre-dir}" compression="gzip"/>
608-->
609    <!-- HACK - tar does not preserve permissions; use exec instead -->
610    <echo>Building tar: visbio${visbio.version}.tar.gz</echo>
611    <exec executable="tar">
612      <arg value="czf"/>
613      <arg value="${dist.dir}/visbio${visbio.version}.tar.gz"/>
614      <arg value="-C"/>
615      <arg value="${visbio.nojre-dir}"/>
616      <arg value="visbio${visbio.version}"/>
617    </exec>
618  </target>
619
620  <!-- LOCI Plugins for ImageJ -->
621
622  <target name="style-plugins" depends="copy-source, jar-checks"
623    description="check source code style for LOCI Plugins for ImageJ">
624    <checkstyle config="checkstyle.xml" failOnViolation="false">
625      <fileset dir="${dest.dir}" includes="${plugins.source}"/>
626    </checkstyle>
627  </target>
628
629  <target name="compile-plugins" depends="copy-source"
630    description="compile classes for LOCI Plugins for ImageJ">
631    <mkdir dir="${classes.dir}"/>
632    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
633      includes="${plugins.source}" classpath="${ext.jars}"
634      debug="true" deprecation="true" source="1.4" target="1.4"/>
635  </target>
636
637  <target name="jar-plugins" depends="compile-plugins, copy-jars, jar-formats"
638    description="generate JAR file for LOCI Plugins for ImageJ">
639    <jar jarfile="${jar.dir}/${plugins.jar}" basedir="${src.dir}/loci/plugins"
640      includes="plugins.config IJ_Props.txt">
641      <manifest>
642        <attribute name="Main-Class" value="${plugins.main}"/>
643      </manifest>
644    </jar>
645    <jar jarfile="${jar.dir}/${plugins.jar}" basedir="${classes.dir}"
646      includes="${plugins.files}"
647      excludes="loci/plugins/plugins.config loci/plugins/IJ_Props.txt"
648      update="true">
649    </jar>
650  </target>
651
652  <!-- OME Notes -->
653
654  <target name="style-notes" depends="copy-source, jar-checks"
655    description="check source code style for OME Notes">
656    <checkstyle config="checkstyle.xml" failOnViolation="false">
657      <fileset dir="${dest.dir}" includes="${notes.source}"/>
658    </checkstyle>
659  </target>
660
661  <target name="compile-notes" depends="copy-source"
662    description="compile classes for OME Notes">
663    <mkdir dir="${classes.dir}"/>
664    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
665      includes="${notes.source}" classpath="${ext.jars}"
666      debug="true" deprecation="true" source="1.4" target="1.4"/>
667  </target>
668
669  <target name="jar-notes"
670    depends="compile-notes, copy-jars, jar-formats"
671    description="generate JAR file for OME Notes">
672    <copy todir="${classes.dir}" preservelastmodified="true">
673      <fileset dir="${src.dir}" includes="${notes.resources}"/>
674    </copy>
675    <jar jarfile="${jar.dir}/${notes.jar}" basedir="${classes.dir}"
676      includes="${notes.files}">
677      <manifest>
678        <attribute name="Main-Class" value="${notes.main}"/>
679        <attribute name="Class-Path" value="${notes.classpath}"/>
680      </manifest>
681    </jar>
682  </target>
683
684  <!-- OME Metadata Editor -->
685
686  <target name="style-editor" depends="copy-source, jar-checks"
687    description="check source code style for OME Metadata Editor">
688    <checkstyle config="checkstyle.xml" failOnViolation="false">
689      <fileset dir="${dest.dir}" includes="${editor.source}"/>
690    </checkstyle>
691  </target>
692
693  <target name="compile-editor" depends="copy-source"
694    description="compile classes for OME Metadata Editor">
695    <mkdir dir="${classes.dir}"/>
696    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
697      includes="${editor.source}" classpath="${ext.jars}"
698      debug="true" deprecation="true" source="1.4" target="1.4"/>
699  </target>
700
701  <target name="jar-editor"
702    depends="compile-editor, copy-jars, jar-formats"
703    description="generate JAR file for OME Metadata Editor">
704    <copy todir="${classes.dir}" preservelastmodified="true">
705      <fileset dir="${src.dir}" includes="${editor.resources}"/>
706    </copy>
707    <jar jarfile="${jar.dir}/${editor.jar}" basedir="${classes.dir}"
708      includes="${editor.files}">
709      <manifest>
710        <attribute name="Main-Class" value="${editor.main}"/>
711        <attribute name="Class-Path" value="${editor.classpath}"/>
712      </manifest>
713    </jar>
714  </target>
715
716  <!-- Slim Plotter -->
717
718  <target name="style-slim" depends="copy-source, jar-checks"
719    description="check source code style for Slim Plotter">
720    <checkstyle config="checkstyle.xml" failOnViolation="false">
721      <fileset dir="${dest.dir}" includes="${slim.source}"/>
722    </checkstyle>
723  </target>
724
725  <target name="compile-slim" depends="copy-source"
726    description="compile classes for Slim Plotter">
727    <mkdir dir="${classes.dir}"/>
728    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
729      includes="${slim.source}" classpath="${ext.jars}"
730      debug="true" deprecation="true" source="1.4" target="1.4"/>
731  </target>
732
733  <target name="jar-slim" depends="compile-slim, copy-jars"
734    description="generate JAR file for Slim Plotter">
735    <jar jarfile="${jar.dir}/${slim.jar}" basedir="${classes.dir}"
736      includes="${slim.files}">
737      <manifest>
738        <attribute name="Main-Class" value="${slim.main}"/>
739        <attribute name="Class-Path" value="${slim.classpath}"/>
740      </manifest>
741    </jar>
742  </target>
743
744  <target name="dist-slim" if="isUnix"
745    depends="copy-jars, jar-formats, jar-slim"
746    description="create distribution bundle for Slim Plotter">
747    <copy todir="${slim.dist-dir}" preservelastmodified="true">
748      <fileset dir="dist/slim"/>
749      <fileset dir="${jar.dir}" includes="${slim.jar} ${slim.classpath}"/>
750    </copy>
751    <!-- HACK - copy does not preserve permissions; chmod them back -->
752    <chmod perm="+x">
753      <fileset dir="${slim.dist-dir}" includes="${slim.exec}"/>
754    </chmod>
755<!--
756    <zip destfile="${dist.dir}/slim.zip" basedir="${dist.dir}/slim"/>
757-->
758    <!-- HACK - zip does not preserve permissions; use exec instead -->
759    <exec executable="zip" dir="${dist.dir}/slim">
760      <arg value="-r9"/>
761      <arg value="../slim.zip"/>
762      <arg value="SlimPlotter"/>
763    </exec>
764  </target>
765
766  <!-- LOCI Checkstyle checks -->
767
768  <target name="style-checks" depends="copy-source, jar-checks"
769    description="check source code style for LOCI Checkstyle checks">
770    <checkstyle config="checkstyle.xml" failOnViolation="false">
771      <fileset dir="${dest.dir}" includes="${checks.source}"/>
772    </checkstyle>
773  </target>
774
775  <target name="compile-checks" depends="copy-source"
776    description="compile classes for LOCI Checkstyle checks">
777    <mkdir dir="${classes.dir}"/>
778    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
779      includes="${checks.source}" classpath="${ext.jars}"
780      debug="true" deprecation="true" source="1.4" target="1.4"/>
781  </target>
782
783  <target name="jar-checks" depends="compile-checks, copy-jars"
784    description="generate JAR file for LOCI Checkstyle checks">
785    <copy todir="${classes.dir}" preservelastmodified="true">
786      <fileset dir="${src.dir}" includes="${checks.resources}"/>
787    </copy>
788    <jar jarfile="${jar.dir}/${checks.jar}" basedir="${classes.dir}"
789      includes="${checks.files}">
790      <manifest>
791        <attribute name="Main-Class" value="${checks.main}"/>
792        <attribute name="Class-Path" value="${checks.classpath}"/>
793      </manifest>
794    </jar>
795  </target>
796
797  <!-- ImageJ -->
798
799  <target name="ij-jws" depends="tools"
800    description="create JAR file encompassing ImageJ plus LOCI plugins">
801    <for list="${ij-jws.libraries}" param="jar" delimiter=" " trim="true">
802      <sequential>
803        <unjar src="${jar.dir}/@{jar}" dest="${ij-jws.dir}">
804          <patternset>
805            <exclude name="META-INF/**"/>
806          </patternset>
807        </unjar>
808      </sequential>
809    </for>
810    <jar jarfile="${jar.dir}/${ij-jws.jar}" basedir="${ij-jws.dir}">
811      <manifest>
812        <attribute name="Main-Class" value="${ij-jws.main}"/>
813      </manifest>
814    </jar>
815    <delete dir="${ij-jws.dir}"/>
816  </target>
817
818</project>
Note: See TracBrowser for help on using the repository browser.