source: trunk/build.xml @ 3016

Revision 3016, 29.8 KB checked in by curtis, 13 years ago (diff)

Fix problem with generated Javadocs not filling in the footer's year properly.

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      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      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.begin} ${YEAR} ${copyright.end}]]></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 Notes -->
647
648  <target name="style-notes" depends="copy-source, jar-checks"
649    description="check source code style for OME Notes">
650    <checkstyle config="checkstyle.xml" failOnViolation="false">
651      <fileset dir="${dest.dir}" includes="${notes.source}"/>
652    </checkstyle>
653  </target>
654
655  <target name="compile-notes" depends="copy-source"
656    description="compile classes for OME Notes">
657    <mkdir dir="${classes.dir}"/>
658    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
659      includes="${notes.source}" classpath="${ext.jars}"
660      debug="true" deprecation="true" source="1.4" target="1.4"/>
661  </target>
662
663  <target name="jar-notes"
664    depends="compile-notes, copy-jars, jar-formats"
665    description="generate JAR file for OME Notes">
666    <copy todir="${classes.dir}" preservelastmodified="true">
667      <fileset dir="${src.dir}" includes="${notes.resources}"/>
668    </copy>
669    <jar jarfile="${jar.dir}/${notes.jar}" basedir="${classes.dir}"
670      includes="${notes.files}">
671      <manifest>
672        <attribute name="Main-Class" value="${notes.main}"/>
673        <attribute name="Class-Path" value="${notes.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  <!-- Slim Plotter -->
711
712  <target name="style-slim" depends="copy-source, jar-checks"
713    description="check source code style for Slim Plotter">
714    <checkstyle config="checkstyle.xml" failOnViolation="false">
715      <fileset dir="${dest.dir}" includes="${slim.source}"/>
716    </checkstyle>
717  </target>
718
719  <target name="compile-slim" depends="copy-source"
720    description="compile classes for Slim Plotter">
721    <mkdir dir="${classes.dir}"/>
722    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
723      includes="${slim.source}" classpath="${ext.jars}"
724      debug="true" deprecation="true" source="1.4" target="1.4"/>
725  </target>
726
727  <target name="jar-slim" depends="compile-slim, copy-jars"
728    description="generate JAR file for Slim Plotter">
729    <jar jarfile="${jar.dir}/${slim.jar}" basedir="${classes.dir}"
730      includes="${slim.files}">
731      <manifest>
732        <attribute name="Main-Class" value="${slim.main}"/>
733        <attribute name="Class-Path" value="${slim.classpath}"/>
734      </manifest>
735    </jar>
736  </target>
737
738  <target name="dist-slim" if="isUnix"
739    depends="copy-jars, jar-formats, jar-slim"
740    description="create distribution bundle for Slim Plotter">
741    <copy todir="${slim.dist-dir}" preservelastmodified="true">
742      <fileset dir="dist/slim"/>
743      <fileset dir="${jar.dir}" includes="${slim.jar} ${slim.classpath}"/>
744    </copy>
745    <!-- HACK - copy does not preserve permissions; chmod them back -->
746    <chmod perm="+x">
747      <fileset dir="${slim.dist-dir}" includes="${slim.exec}"/>
748    </chmod>
749<!--
750    <zip destfile="${dist.dir}/slim.zip" basedir="${dist.dir}/slim"/>
751-->
752    <!-- HACK - zip does not preserve permissions; use exec instead -->
753    <exec executable="zip" dir="${dist.dir}/slim">
754      <arg value="-r9"/>
755      <arg value="../slim.zip"/>
756      <arg value="SlimPlotter"/>
757    </exec>
758  </target>
759
760  <!-- LOCI Checkstyle checks -->
761
762  <target name="style-checks" depends="copy-source, jar-checks"
763    description="check source code style for LOCI Checkstyle checks">
764    <checkstyle config="checkstyle.xml" failOnViolation="false">
765      <fileset dir="${dest.dir}" includes="${checks.source}"/>
766    </checkstyle>
767  </target>
768
769  <target name="compile-checks" depends="copy-source"
770    description="compile classes for LOCI Checkstyle checks">
771    <mkdir dir="${classes.dir}"/>
772    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
773      includes="${checks.source}" classpath="${ext.jars}"
774      debug="true" deprecation="true" source="1.4" target="1.4"/>
775  </target>
776
777  <target name="jar-checks" depends="compile-checks, copy-jars"
778    description="generate JAR file for LOCI Checkstyle checks">
779    <copy todir="${classes.dir}" preservelastmodified="true">
780      <fileset dir="${src.dir}" includes="${checks.resources}"/>
781    </copy>
782    <jar jarfile="${jar.dir}/${checks.jar}" basedir="${classes.dir}"
783      includes="${checks.files}">
784      <manifest>
785        <attribute name="Main-Class" value="${checks.main}"/>
786        <attribute name="Class-Path" value="${checks.classpath}"/>
787      </manifest>
788    </jar>
789  </target>
790
791  <!-- ImageJ -->
792
793  <target name="ij-jws" depends="tools"
794    description="create JAR file encompassing ImageJ plus LOCI plugins">
795    <for list="${ij-jws.libraries}" param="jar" delimiter=" " trim="true">
796      <sequential>
797        <unjar src="${jar.dir}/@{jar}" dest="${ij-jws.dir}">
798          <patternset>
799            <exclude name="META-INF/**"/>
800          </patternset>
801        </unjar>
802      </sequential>
803    </for>
804    <jar jarfile="${jar.dir}/${ij-jws.jar}" basedir="${ij-jws.dir}">
805      <manifest>
806        <attribute name="Main-Class" value="${ij-jws.main}"/>
807      </manifest>
808    </jar>
809    <delete dir="${ij-jws.dir}"/>
810  </target>
811
812</project>
Note: See TracBrowser for help on using the repository browser.