source: tags/loci-tools-2007-Oct-01/build.xml @ 3210

Revision 3210, 30.1 KB checked in by melissa, 13 years ago (diff)

2007 Oct 01 release of LOCI Tools

Line 
1<!--
2build.xml
3
4Master ant build file for all Java software projects at LOCI.
5Download Apache Ant from http://ant.apache.org/.
6Type "ant -p" for a list of targets.
7
8===============================================================================
9This build file handles the following projects:
10
11Bio-Formats
12    JAR file:      bio-formats.jar
13    Folders:       loci/formats
14                   loci/formats/*
15    Main class:    loci.formats.ImageViewer
16    Dependencies:  jai_imageio.jar (reflected)
17                   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    <zip zipfile="${build.dir}/visbio_docs.zip" basedir="${visbio.docs-dir}"/>
470  </target>
471
472  <target name="dist-visbio"
473    depends="dist-visbio-win32, dist-visbio-win32-nojre, dist-visbio-macosx,
474      dist-visbio-linux, dist-visbio-nojre"
475    description="create distribution bundles for VisBio"/>
476
477  <target name="dist-visbio-win32" depends="jar-visbio, jar-formats"
478    description="create distribution bundle for VisBio: Windows w/ JRE">
479    <copy todir="${visbio.win32-dir}/VisBio" preservelastmodified="true">
480      <fileset dir="dist/visbio/win32"/>
481      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
482      <fileset dir="${jar.dir}" includes="${visbio.jar} ${visbio.classpath}"/>
483    </copy>
484    <fixcrlf srcdir="${visbio.win32-dir}/VisBio" eol="dos"
485      includes="${visbio.text-files}"/>
486    <untar src="dist/jre-win32.tar.gz" dest="${visbio.win32-dir}/VisBio"
487      overwrite="false" compression="gzip"/>
488    <zip destfile="${dist.dir}/visbio${visbio.version}_win32.zip"
489      basedir="${visbio.win32-dir}"/>
490  </target>
491
492  <target name="dist-visbio-win32-nojre" depends="jar-visbio, jar-formats"
493    description="create distribution bundle for VisBio: Windows no JRE">
494    <copy todir="${visbio.win32-nojre-dir}/VisBio"
495      preservelastmodified="true">
496      <fileset dir="dist/visbio/win32" excludes="launcher.cfg"/>
497      <fileset dir="dist/visbio/win32-nojre"/>
498      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
499      <fileset dir="${jar.dir}" includes="${visbio.jar} ${visbio.classpath}"/>
500    </copy>
501    <fixcrlf srcdir="${visbio.win32-nojre-dir}/VisBio" eol="dos"
502      includes="${visbio.text-files}"/>
503    <zip destfile="${dist.dir}/visbio${visbio.version}_win32_nojre.zip"
504      basedir="${visbio.win32-nojre-dir}"/>
505  </target>
506
507  <!-- HACK - limit OS to *nix due to file permission issues -->
508  <target name="dist-visbio-macosx" if="isUnix"
509    depends="jar-visbio, jar-formats"
510    description="create distribution bundle for VisBio: Mac OS X">
511    <copy todir="${visbio.macosx-dir}/VisBio"
512      preservelastmodified="true">
513      <fileset dir="dist/visbio/macosx"/>
514      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
515    </copy>
516    <fixcrlf srcdir="${visbio.macosx-dir}/VisBio" eol="mac"
517      includes="${visbio.text-files}"/>
518    <!-- HACK - copy does not preserve permissions; chmod them back -->
519    <chmod perm="+x">
520      <fileset dir="${visbio.macosx-dir}/VisBio"
521        includes="${visbio.macosx-exec}"/>
522    </chmod>
523    <copy
524      todir="${visbio.macosx-dir}/VisBio/VisBio.app/Contents/Resources/Java">
525      <fileset dir="${jar.dir}" includes="${visbio.jar} ${visbio.classpath}"/>
526    </copy>
527<!--
528    <tar destfile="${dist.dir}/visbio${visbio.version}_macosx.tar.gz"
529      basedir="${visbio.macosx-dir}" compression="gzip"/>
530-->
531    <!-- HACK - tar does not preserve permissions; use exec instead -->
532    <echo>Building tar: visbio${visbio.version}_macosx.tar.gz</echo>
533    <exec executable="tar">
534      <arg value="czf"/>
535      <arg value="${dist.dir}/visbio${visbio.version}_macosx.tar.gz"/>
536      <arg value="-C"/>
537      <arg value="${visbio.macosx-dir}"/>
538      <arg value="VisBio"/>
539    </exec>
540  </target>
541
542  <!-- HACK - limit OS to *nix due to file permission issues -->
543  <target name="dist-visbio-linux" if="isUnix"
544    depends="jar-visbio, jar-formats"
545    description="create distribution bundle for VisBio: Linux w/ JRE">
546    <copy todir="${visbio.linux-dir}/visbio${visbio.version}"
547      preservelastmodified="true">
548      <fileset dir="dist/visbio/linux"/>
549      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
550      <fileset dir="${jar.dir}" includes="${visbio.jar} ${visbio.classpath}"/>
551    </copy>
552    <fixcrlf srcdir="${visbio.linux-dir}/visbio${visbio.version}" eol="unix"
553      includes="${visbio.text-files}"/>
554    <!-- HACK - copy does not preserve permissions; chmod them back -->
555    <chmod perm="+x">
556      <fileset dir="${visbio.linux-dir}/visbio${visbio.version}"
557        includes="${visbio.linux-exec}"/>
558    </chmod>
559<!--
560    <untar src="dist/jre-linux.tar.gz"
561      dest="${visbio.linux-dir}/visbio${visbio.version}"
562      overwrite="false" compression="gzip"/>
563-->
564    <!-- HACK - untar does not restore permissions; use exec instead -->
565    <echo>Expanding: jre-linux.tar.gz</echo>
566    <exec executable="tar">
567      <arg value="xzf"/>
568      <arg value="dist/jre-linux.tar.gz"/>
569      <arg value="-C"/>
570      <arg value="${visbio.linux-dir}/visbio${visbio.version}"/>
571    </exec>
572<!--
573    <tar destfile="${dist.dir}/visbio${visbio.version}_linux.tar.gz"
574      basedir="${visbio.linux-dir}" compression="gzip"/>
575-->
576    <!-- HACK - tar does not preserve permissions; use exec instead -->
577    <echo>Building tar: visbio${visbio.version}_linux.tar.gz</echo>
578    <exec executable="tar">
579      <arg value="czf"/>
580      <arg value="${dist.dir}/visbio${visbio.version}_linux.tar.gz"/>
581      <arg value="-C"/>
582      <arg value="${visbio.linux-dir}"/>
583      <arg value="visbio${visbio.version}"/>
584    </exec>
585  </target>
586
587  <!-- HACK - limit OS to *nix due to file permission issues -->
588  <target name="dist-visbio-nojre" if="isUnix"
589    depends="jar-visbio, jar-formats"
590    description="create distribution bundle for VisBio: cross-platform">
591    <copy todir="${visbio.nojre-dir}/visbio${visbio.version}"
592      preservelastmodified="true">
593      <fileset dir="dist/visbio/linux"/>
594      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
595      <fileset dir="${jar.dir}" includes="${visbio.jar} ${visbio.classpath}"/>
596    </copy>
597    <fixcrlf srcdir="${visbio.nojre-dir}/visbio${visbio.version}" eol="unix"
598      includes="${visbio.text-files}"/>
599    <!-- HACK - copy does not preserve permissions; chmod them back -->
600    <chmod perm="+x">
601      <fileset dir="${visbio.nojre-dir}/visbio${visbio.version}"
602        includes="${visbio.linux-exec}"/>
603    </chmod>
604<!--
605    <tar destfile="${dist.dir}/visbio${visbio.version}.tar.gz"
606      basedir="${visbio.nojre-dir}" compression="gzip"/>
607-->
608    <!-- HACK - tar does not preserve permissions; use exec instead -->
609    <echo>Building tar: visbio${visbio.version}.tar.gz</echo>
610    <exec executable="tar">
611      <arg value="czf"/>
612      <arg value="${dist.dir}/visbio${visbio.version}.tar.gz"/>
613      <arg value="-C"/>
614      <arg value="${visbio.nojre-dir}"/>
615      <arg value="visbio${visbio.version}"/>
616    </exec>
617  </target>
618
619  <!-- LOCI Plugins for ImageJ -->
620
621  <target name="style-plugins" depends="copy-source, jar-checks"
622    description="check source code style for LOCI Plugins for ImageJ">
623    <checkstyle config="checkstyle.xml" failOnViolation="false">
624      <fileset dir="${dest.dir}" includes="${plugins.source}"/>
625    </checkstyle>
626  </target>
627
628  <target name="compile-plugins" depends="copy-source"
629    description="compile classes for LOCI Plugins for ImageJ">
630    <mkdir dir="${classes.dir}"/>
631    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
632      includes="${plugins.source}" classpath="${ext.jars}"
633      debug="true" deprecation="true" source="1.4" target="1.4"/>
634  </target>
635
636  <target name="jar-plugins" depends="compile-plugins, copy-jars, jar-formats"
637    description="generate JAR file for LOCI Plugins for ImageJ">
638    <jar jarfile="${jar.dir}/${plugins.jar}" basedir="${src.dir}/loci/plugins"
639      includes="plugins.config IJ_Props.txt">
640      <manifest>
641        <attribute name="Main-Class" value="${plugins.main}"/>
642      </manifest>
643    </jar>
644    <jar jarfile="${jar.dir}/${plugins.jar}" basedir="${classes.dir}"
645      includes="${plugins.files}"
646      excludes="loci/plugins/plugins.config loci/plugins/IJ_Props.txt"
647      update="true">
648    </jar>
649  </target>
650
651  <!-- OME Notes -->
652
653  <target name="style-notes" depends="copy-source, jar-checks"
654    description="check source code style for OME Notes">
655    <checkstyle config="checkstyle.xml" failOnViolation="false">
656      <fileset dir="${dest.dir}" includes="${notes.source}"/>
657    </checkstyle>
658  </target>
659
660  <target name="compile-notes" depends="copy-source"
661    description="compile classes for OME Notes">
662    <mkdir dir="${classes.dir}"/>
663    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
664      includes="${notes.source}" classpath="${ext.jars}"
665      debug="true" deprecation="true" source="1.4" target="1.4"/>
666  </target>
667
668  <target name="jar-notes"
669    depends="compile-notes, copy-jars, jar-formats"
670    description="generate JAR file for OME Notes">
671    <copy todir="${classes.dir}" preservelastmodified="true">
672      <fileset dir="${src.dir}" includes="${notes.resources}"/>
673    </copy>
674    <jar jarfile="${jar.dir}/${notes.jar}" basedir="${classes.dir}"
675      includes="${notes.files}">
676      <manifest>
677        <attribute name="Main-Class" value="${notes.main}"/>
678        <attribute name="Class-Path" value="${notes.classpath}"/>
679      </manifest>
680    </jar>
681  </target>
682
683  <!-- OME Metadata Editor -->
684
685  <target name="style-editor" depends="copy-source, jar-checks"
686    description="check source code style for OME Metadata Editor">
687    <checkstyle config="checkstyle.xml" failOnViolation="false">
688      <fileset dir="${dest.dir}" includes="${editor.source}"/>
689    </checkstyle>
690  </target>
691
692  <target name="compile-editor" depends="copy-source"
693    description="compile classes for OME Metadata Editor">
694    <mkdir dir="${classes.dir}"/>
695    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
696      includes="${editor.source}" classpath="${ext.jars}"
697      debug="true" deprecation="true" source="1.4" target="1.4"/>
698  </target>
699
700  <target name="jar-editor"
701    depends="compile-editor, copy-jars, jar-formats"
702    description="generate JAR file for OME Metadata Editor">
703    <copy todir="${classes.dir}" preservelastmodified="true">
704      <fileset dir="${src.dir}" includes="${editor.resources}"/>
705    </copy>
706    <jar jarfile="${jar.dir}/${editor.jar}" basedir="${classes.dir}"
707      includes="${editor.files}">
708      <manifest>
709        <attribute name="Main-Class" value="${editor.main}"/>
710        <attribute name="Class-Path" value="${editor.classpath}"/>
711      </manifest>
712    </jar>
713  </target>
714
715  <!-- Slim Plotter -->
716
717  <target name="style-slim" depends="copy-source, jar-checks"
718    description="check source code style for Slim Plotter">
719    <checkstyle config="checkstyle.xml" failOnViolation="false">
720      <fileset dir="${dest.dir}" includes="${slim.source}"/>
721    </checkstyle>
722  </target>
723
724  <target name="compile-slim" depends="copy-source"
725    description="compile classes for Slim Plotter">
726    <mkdir dir="${classes.dir}"/>
727    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
728      includes="${slim.source}" classpath="${ext.jars}"
729      debug="true" deprecation="true" source="1.4" target="1.4"/>
730  </target>
731
732  <target name="jar-slim" depends="compile-slim, copy-jars"
733    description="generate JAR file for Slim Plotter">
734    <jar jarfile="${jar.dir}/${slim.jar}" basedir="${classes.dir}"
735      includes="${slim.files}">
736      <manifest>
737        <attribute name="Main-Class" value="${slim.main}"/>
738        <attribute name="Class-Path" value="${slim.classpath}"/>
739      </manifest>
740    </jar>
741  </target>
742
743  <target name="dist-slim" if="isUnix"
744    depends="copy-jars, jar-formats, jar-slim"
745    description="create distribution bundle for Slim Plotter">
746    <copy todir="${slim.dist-dir}" preservelastmodified="true">
747      <fileset dir="dist/slim"/>
748      <fileset dir="${jar.dir}" includes="${slim.jar} ${slim.classpath}"/>
749    </copy>
750    <!-- HACK - copy does not preserve permissions; chmod them back -->
751    <chmod perm="+x">
752      <fileset dir="${slim.dist-dir}" includes="${slim.exec}"/>
753    </chmod>
754<!--
755    <zip destfile="${dist.dir}/slim.zip" basedir="${dist.dir}/slim"/>
756-->
757    <!-- HACK - zip does not preserve permissions; use exec instead -->
758    <exec executable="zip" dir="${dist.dir}/slim">
759      <arg value="-r9"/>
760      <arg value="../slim.zip"/>
761      <arg value="SlimPlotter"/>
762    </exec>
763  </target>
764
765  <!-- LOCI Checkstyle checks -->
766
767  <target name="style-checks" depends="copy-source, jar-checks"
768    description="check source code style for LOCI Checkstyle checks">
769    <checkstyle config="checkstyle.xml" failOnViolation="false">
770      <fileset dir="${dest.dir}" includes="${checks.source}"/>
771    </checkstyle>
772  </target>
773
774  <target name="compile-checks" depends="copy-source"
775    description="compile classes for LOCI Checkstyle checks">
776    <mkdir dir="${classes.dir}"/>
777    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
778      includes="${checks.source}" classpath="${ext.jars}"
779      debug="true" deprecation="true" source="1.4" target="1.4"/>
780  </target>
781
782  <target name="jar-checks" depends="compile-checks, copy-jars"
783    description="generate JAR file for LOCI Checkstyle checks">
784    <copy todir="${classes.dir}" preservelastmodified="true">
785      <fileset dir="${src.dir}" includes="${checks.resources}"/>
786    </copy>
787    <jar jarfile="${jar.dir}/${checks.jar}" basedir="${classes.dir}"
788      includes="${checks.files}">
789      <manifest>
790        <attribute name="Main-Class" value="${checks.main}"/>
791        <attribute name="Class-Path" value="${checks.classpath}"/>
792      </manifest>
793    </jar>
794  </target>
795
796  <!-- ImageJ -->
797
798  <target name="ij-jws" depends="tools"
799    description="create JAR file encompassing ImageJ plus LOCI plugins">
800    <for list="${ij-jws.libraries}" param="jar" delimiter=" " trim="true">
801      <sequential>
802        <unjar src="${jar.dir}/@{jar}" dest="${ij-jws.dir}">
803          <patternset>
804            <exclude name="META-INF/**"/>
805          </patternset>
806        </unjar>
807      </sequential>
808    </for>
809    <jar jarfile="${jar.dir}/${ij-jws.jar}" basedir="${ij-jws.dir}">
810      <manifest>
811        <attribute name="Main-Class" value="${ij-jws.main}"/>
812      </manifest>
813    </jar>
814    <delete dir="${ij-jws.dir}"/>
815  </target>
816
817</project>
Note: See TracBrowser for help on using the repository browser.