source: trunk/build.xml @ 2763

Revision 2763, 31.2 KB checked in by curtis, 13 years ago (diff)

Rename OME Notebook to OME Notes; rename MetadataNotebook to MetadataEditor.

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