source: trunk/build.xml @ 1702

Revision 1702, 27.8 KB checked in by curtis, 14 years ago (diff)

Add dev-clean and dev-compile targets for compiling and removing *.class files
in-place in the directory structure (instead of copying them into build/src and
build/classes folders).

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}" preservelastmodified="true">
431      <fileset dir="${dist.dir}/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}" eol="dos"
436      includes="${visbio.text-files}"/>
437    <untar src="${dist.dir}/jre-win32.tar.gz" dest="${visbio.win32-dir}"
438      overwrite="false" compression="gzip"/>
439    <zip destfile="${dist.dir}/visbio${visbio.version}_win32.zip"
440      basedir="${dist.dir}/visbio/win32"/>
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}"
446      preservelastmodified="true">
447      <fileset dir="${dist.dir}/visbio/win32" excludes="launcher.cfg"/>
448      <fileset dir="${dist.dir}/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}" eol="dos"
453      includes="${visbio.text-files}"/>
454    <zip destfile="${dist.dir}/visbio${visbio.version}_win32_nojre.zip"
455      basedir="${dist.dir}/visbio/win32-nojre"/>
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}"
463      preservelastmodified="true">
464      <fileset dir="${dist.dir}/visbio/macosx"/>
465      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
466    </copy>
467    <fixcrlf srcdir="${visbio.macosx-dir}" 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}" includes="${visbio.macosx-exec}"/>
472    </chmod>
473    <copy todir="${visbio.macosx-dir}/VisBio.app/Contents/Resources/Java">
474      <fileset dir="${jar.dir}" includes="visbio.jar ${visbio.classpath}"/>
475    </copy>
476<!--
477    <tar destfile="${dist.dir}/visbio${visbio.version}_macosx.tar.gz"
478      basedir="${dist.dir}/visbio/macosx" compression="gzip"/>
479-->
480    <!-- HACK - tar does not preserve permissions; use exec instead -->
481    <exec executable="tar">
482      <arg value="czf"/>
483      <arg value="${dist.dir}/visbio${visbio.version}_macosx.tar.gz"/>
484      <arg value="-C"/>
485      <arg value="${dist.dir}/visbio/macosx VisBio"/>
486    </exec>
487  </target>
488
489  <!-- HACK - limit OS to *nix due to file permission issues -->
490  <target name="dist-visbio-linux" if="isUnix"
491    depends="jar-visbio, jar-formats"
492    description="create distribution bundle for VisBio: Linux w/ JRE">
493    <copy todir="${visbio.linux-dir}" preservelastmodified="true">
494      <fileset dir="${dist.dir}/visbio/linux"/>
495      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
496      <fileset dir="${jar.dir}" includes="visbio.jar ${visbio.classpath}"/>
497    </copy>
498    <fixcrlf srcdir="${visbio.linux-dir}" eol="unix"
499      includes="${visbio.text-files}"/>
500    <!-- HACK - copy does not preserve permissions; chmod them back -->
501    <chmod perm="+x">
502      <fileset dir="${visbio.linux-dir}" includes="${visbio.linux-exec}"/>
503    </chmod>
504<!--
505    <untar src="${dist.dir}/jre-linux.tar.gz" dest="${visbio.linux-dir}"
506      overwrite="false" compression="gzip"/>
507-->
508    <!-- HACK - untar does not restore permissions; use exec instead -->
509    <exec executable="tar">
510      <arg value="xzf"/>
511      <arg value="${dist.dir}/jre-linux.tar.gz"/>
512      <arg value="-C"/>
513      <arg value="${visbio.linux-dir}"/>
514    </exec>
515<!--
516    <tar destfile="${dist.dir}/visbio${visbio.version}_linux.tar.gz"
517      basedir="${dist.dir}/visbio/linux" compression="gzip"/>
518-->
519    <!-- HACK - tar does not preserve permissions; use exec instead -->
520    <exec executable="tar">
521      <arg value="czf"/>
522      <arg value="${dist.dir}/visbio${visbio.version}_linux.tar.gz"/>
523      <arg value="-C"/>
524      <arg value="${dist.dir}/visbio/linux visbio${visbio.version}"/>
525    </exec>
526  </target>
527
528  <!-- HACK - limit OS to *nix due to file permission issues -->
529  <target name="dist-visbio-nojre" if="isUnix"
530    depends="jar-visbio, jar-formats"
531    description="create distribution bundle for VisBio: cross-platform">
532    <copy todir="${visbio.nojre-dir}" preservelastmodified="true">
533      <fileset dir="${dist.dir}/visbio/linux"/>
534      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
535      <fileset dir="${jar.dir}" includes="visbio.jar ${visbio.classpath}"/>
536    </copy>
537    <fixcrlf srcdir="${visbio.nojre-dir}" eol="unix"
538      includes="${visbio.text-files}"/>
539    <!-- HACK - copy does not preserve permissions; chmod them back -->
540    <chmod perm="+x">
541      <fileset dir="${visbio.nojre-dir}" includes="${visbio.linux-exec}"/>
542    </chmod>
543<!--
544    <tar destfile="${dist.dir}/visbio${visbio.version}.tar.gz"
545      basedir="${dist.dir}/visbio/nojre" compression="gzip"/>
546-->
547    <!-- HACK - tar does not preserve permissions; use exec instead -->
548    <exec executable="tar">
549      <arg value="czf"/>
550      <arg value="${dist.dir}/visbio${visbio.version}.tar.gz"/>
551      <arg value="-C"/>
552      <arg value="${dist.dir}/visbio/nojre visbio${visbio.version}"/>
553    </exec>
554  </target>
555
556  <!-- LOCI Plugins for ImageJ -->
557
558  <target name="style-plugins" depends="copy-source, jar-checks"
559    description="check source code style for LOCI Plugins for ImageJ">
560    <checkstyle config="checkstyle.xml" failOnViolation="false">
561      <fileset dir="${dest.dir}" includes="${plugins.source}"/>
562    </checkstyle>
563  </target>
564
565  <target name="compile-plugins" depends="copy-source"
566    description="compile classes for LOCI Plugins for ImageJ">
567    <mkdir dir="${classes.dir}"/>
568    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
569      includes="${plugins.source}" classpath="${ext.jars}"
570      debug="true" deprecation="true" source="1.4" target="1.4"/>
571  </target>
572
573  <target name="jar-plugins" depends="compile-plugins, copy-jars, jar-formats"
574    description="generate JAR file for LOCI Plugins for ImageJ">
575    <jar jarfile="${jar.dir}/${plugins.jar}"
576      basedir="${src.dir}/loci/plugins" includes="plugins.config">
577      <manifest>
578        <attribute name="Main-Class" value="${plugins.main}"/>
579      </manifest>
580    </jar>
581    <jar jarfile="${jar.dir}/${plugins.jar}" basedir="${classes.dir}"
582      includes="${plugins.files}" excludes="loci/plugins/plugins.config"
583      update="true">
584    </jar>
585  </target>
586
587  <!-- OME Metadata Notebook -->
588
589  <target name="style-notebook" depends="copy-source, jar-checks"
590    description="check source code style for OME Metadata Notebook">
591    <checkstyle config="checkstyle.xml" failOnViolation="false">
592      <fileset dir="${dest.dir}" includes="${notebook.source}"/>
593    </checkstyle>
594  </target>
595
596  <target name="compile-notebook" depends="copy-source"
597    description="compile classes for OME Metadata Notebook">
598    <mkdir dir="${classes.dir}"/>
599    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
600      includes="${notebook.source}" classpath="${ext.jars}"
601      debug="true" deprecation="true" source="1.4" target="1.4"/>
602  </target>
603
604  <target name="jar-notebook"
605    depends="compile-notebook, copy-jars, jar-formats"
606    description="generate JAR file for OME Metadata Notebook">
607    <copy todir="${classes.dir}" preservelastmodified="true">
608      <fileset dir="${src.dir}" includes="${notebook.resources}"/>
609    </copy>
610    <jar jarfile="${jar.dir}/${notebook.jar}" basedir="${classes.dir}"
611      includes="${notebook.files}">
612      <manifest>
613        <attribute name="Main-Class" value="${notebook.main}"/>
614        <attribute name="Class-Path" value="${notebook.classpath}"/>
615      </manifest>
616    </jar>
617  </target>
618
619  <!-- Leica Converter -->
620
621  <target name="style-leica" depends="copy-source, jar-checks"
622    description="check source code style for Leica Converter">
623    <checkstyle config="checkstyle.xml" failOnViolation="false">
624      <fileset dir="${dest.dir}" includes="${leica.source}"/>
625    </checkstyle>
626  </target>
627
628  <target name="compile-leica" depends="copy-source"
629    description="compile classes for Leica Converter">
630    <mkdir dir="${classes.dir}"/>
631    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
632      includes="${leica.source}" classpath="${ext.jars}"
633      debug="true" deprecation="true" source="1.4" target="1.4"/>
634  </target>
635
636  <target name="jar-leica" depends="compile-leica, copy-jars, jar-formats"
637    description="generate JAR file for Leica Converter">
638    <jar jarfile="${jar.dir}/${leica.jar}" basedir="${classes.dir}"
639      includes="${leica.files}">
640      <manifest>
641        <attribute name="Main-Class" value="${leica.main}"/>
642        <attribute name="Class-Path" value="${leica.classpath}"/>
643      </manifest>
644    </jar>
645  </target>
646
647  <!-- Movie Stitcher -->
648
649  <target name="style-stitcher" depends="copy-source, jar-checks"
650    description="check source code style for Movie Stitcher">
651    <checkstyle config="checkstyle.xml" failOnViolation="false">
652      <fileset dir="${dest.dir}" includes="${stitcher.source}"/>
653    </checkstyle>
654  </target>
655
656  <target name="compile-stitcher" depends="copy-source"
657    description="compile classes for Movie Stitcher">
658    <mkdir dir="${classes.dir}"/>
659    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
660      includes="${stitcher.source}" classpath="${ext.jars}"
661      debug="true" deprecation="true" source="1.4" target="1.4"/>
662  </target>
663
664  <target name="jar-stitcher" depends="compile-stitcher"
665    description="generate JAR file for Movie Stitcher">
666    <mkdir dir="${jar.dir}"/>
667    <jar jarfile="${jar.dir}/${stitcher.jar}" basedir="${classes.dir}"
668      includes="${stitcher.files}">
669      <manifest>
670        <attribute name="Main-Class" value="${stitcher.main}"/>
671        <attribute name="Class-Path" value="${stitcher.classpath}"/>
672      </manifest>
673    </jar>
674  </target>
675
676  <!-- Slim Plotter -->
677
678  <target name="style-slim" depends="copy-source, jar-checks"
679    description="check source code style for Slim Plotter">
680    <checkstyle config="checkstyle.xml" failOnViolation="false">
681      <fileset dir="${dest.dir}" includes="${slim.source}"/>
682    </checkstyle>
683  </target>
684
685  <target name="compile-slim" depends="copy-source"
686    description="compile classes for Slim Plotter">
687    <mkdir dir="${classes.dir}"/>
688    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
689      includes="${slim.source}" classpath="${ext.jars}"
690      debug="true" deprecation="true" source="1.4" target="1.4"/>
691  </target>
692
693  <target name="jar-slim" depends="compile-slim, copy-jars"
694    description="generate JAR file for Slim Plotter">
695    <jar jarfile="${jar.dir}/${slim.jar}" basedir="${classes.dir}"
696      includes="${slim.files}">
697      <manifest>
698        <attribute name="Main-Class" value="${slim.main}"/>
699        <attribute name="Class-Path" value="${slim.classpath}"/>
700      </manifest>
701    </jar>
702  </target>
703
704  <target name="dist-slim" if="isUnix" depends="copy-jars, jar-slim"
705    description="create distribution bundle for Slim Plotter">
706    <copy todir="${slim.dist-dir}" preservelastmodified="true">
707      <fileset dir="${dist.dir}/slim"/>
708      <fileset dir="${jar.dir}" includes="SlimPlotter.jar ${slim.classpath}"/>
709    </copy>
710    <!-- HACK - copy does not preserve permissions; chmod them back -->
711    <chmod perm="+x">
712      <fileset dir="${slim.dist-dir}" includes="${slim.exec}"/>
713    </chmod>
714<!--
715    <zip destfile="${dist.dir}/slim.zip" basedir="${dist.dir}/slim"/>
716-->
717    <!-- HACK - zip does not preserve permissions; use exec instead -->
718    <exec executable="zip" dir="${dist.dir}/slim">
719      <arg value="-r9"/>
720      <arg value="../slim.zip"/>
721      <arg value="SlimPlotter"/>
722    </exec>
723  </target>
724
725  <!-- LOCI Checkstyle checks -->
726
727  <target name="style-checks" depends="copy-source, jar-checks"
728    description="check source code style for Slim Plotter">
729    <checkstyle config="checkstyle.xml" failOnViolation="false">
730      <fileset dir="${dest.dir}" includes="${checks.source}"/>
731    </checkstyle>
732  </target>
733
734  <target name="compile-checks" depends="copy-source"
735    description="compile classes for Slim Plotter">
736    <mkdir dir="${classes.dir}"/>
737    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
738      includes="${checks.source}" classpath="${ext.jars}"
739      debug="true" deprecation="true" source="1.4" target="1.4"/>
740  </target>
741
742  <target name="jar-checks" depends="compile-checks, copy-jars"
743    description="generate JAR file for Slim Plotter">
744    <copy todir="${classes.dir}" preservelastmodified="true">
745      <fileset dir="${src.dir}" includes="${checks.resources}"/>
746    </copy>
747    <jar jarfile="${jar.dir}/${checks.jar}" basedir="${classes.dir}"
748      includes="${checks.files}">
749      <manifest>
750        <attribute name="Main-Class" value="${checks.main}"/>
751        <attribute name="Class-Path" value="${checks.classpath}"/>
752      </manifest>
753    </jar>
754  </target>
755
756</project>
Note: See TracBrowser for help on using the repository browser.