source: trunk/build.xml @ 1622

Revision 1622, 26.5 KB checked in by curtis, 14 years ago (diff)

Better docs target; fix javadoc warnings.

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