source: trunk/build.xml @ 1726

Revision 1726, 28.3 KB checked in by curtis, 14 years ago (diff)

Fix bugs in dist-visbio targets.

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