source: trunk/build.xml @ 1619

Revision 1619, 26.2 KB checked in by curtis, 14 years ago (diff)

Add package for LOCI custom Checkstyle checks.

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      author="true" version="true" use="true" windowtitle="LOCI Software API">
259      <packageset dir="${dest.dir}"/>
260      <doctitle><![CDATA[<h1>LOCI Software</h1>]]></doctitle>
261      <bottom><![CDATA[${copyright}]]></bottom>
262      <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
263    </javadoc>
264  </target>
265
266  <target name="clean" description="remove all build files">
267    <delete dir="${build.dir}"/>
268  </target>
269
270  <!-- Internal build targets -->
271
272  <target name="copy-source" depends="init">
273    <!-- copy binary files without filtering -->
274    <copy todir="${dest.dir}" preservelastmodified="true">
275      <fileset dir="${src.dir}" includes="loci/**"
276        excludes="**/*.class **/*.java **/*.config **/*.txt ${ignore.source}"/>
277    </copy>
278    <!-- copy source files with filtering -->
279    <filter token="date" value="${DATE}"/>
280    <copy todir="${dest.dir}" filtering="true" preservelastmodified="true">
281      <fileset dir="${src.dir}" includes="loci/**"
282        excludes="**/*.class ${ignore.source}"/>
283    </copy>
284  </target>
285
286  <target name="copy-jars">
287    <!-- copy needed external JARs into build jars folder -->
288    <copy todir="${jar.dir}" preservelastmodified="true">
289      <fileset dir="jar"/>
290    </copy>
291  </target>
292
293  <!-- Bio-Formats -->
294
295  <target name="style-formats" depends="copy-source, jar-checks"
296    description="check source code style for Bio-Formats">
297    <checkstyle config="checkstyle.xml" failOnViolation="false">
298      <fileset dir="${dest.dir}" includes="${formats.source}"/>
299    </checkstyle>
300  </target>
301
302  <target name="compile-formats" depends="copy-source"
303    description="compile classes for Bio-Formats">
304    <mkdir dir="${classes.dir}"/>
305    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
306      includes="${formats.source}" classpath="${ext.jars}"
307      debug="true" deprecation="true" source="1.4" target="1.4"/>
308  </target>
309
310  <target name="jar-formats" depends="compile-formats, copy-jars"
311    description="generate JAR file for Bio-Formats">
312    <copy todir="${classes.dir}" preservelastmodified="true">
313      <fileset dir="${src.dir}" includes="${formats.resources}"/>
314    </copy>
315    <mkdir dir="${jar.dir}"/>
316    <jar jarfile="${jar.dir}/${formats.jar}" basedir="${classes.dir}"
317      includes="${formats.files}">
318      <manifest>
319        <attribute name="Main-Class" value="${formats.main}"/>
320        <attribute name="Class-Path" value="${formats.classpath}"/>
321      </manifest>
322    </jar>
323  </target>
324
325  <!-- VisBio -->
326
327  <target name="style-visbio" depends="copy-source, jar-checks"
328    description="check source code style for VisBio">
329    <checkstyle config="checkstyle.xml" failOnViolation="false">
330      <fileset dir="${dest.dir}" includes="${visbio.source}"/>
331    </checkstyle>
332  </target>
333
334  <target name="compile-visbio" depends="copy-source"
335    description="compile classes for VisBio">
336    <mkdir dir="${classes.dir}"/>
337    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
338      includes="${visbio.source}" classpath="${ext.jars}"
339      debug="true" deprecation="true" source="1.4" target="1.4"/>
340  </target>
341
342  <target name="jar-visbio" depends="compile-visbio, copy-jars, jar-formats"
343    description="generate JAR file for VisBio">
344    <copy todir="${classes.dir}" preservelastmodified="true">
345      <fileset dir="${src.dir}" includes="${visbio.resources}"/>
346    </copy>
347    <jar jarfile="${jar.dir}/${visbio.jar}" basedir="${classes.dir}"
348      includes="${visbio.files}">
349      <manifest>
350        <attribute name="Main-Class" value="${visbio.main}"/>
351        <attribute name="Class-Path" value="${visbio.classpath}"/>
352      </manifest>
353    </jar>
354  </target>
355
356  <target name="source-visbio" depends="copy-source"
357    description="generate source bundle for VisBio">
358    <zip zipfile="${build.dir}/visbio_src.zip" basedir="${dest.dir}"
359      includes="loci/visbio/**"/>
360  </target>
361
362  <target name="docs-visbio" depends="copy-source"
363    description="generate Javadocs for VisBio">
364    <javadoc sourcepath="${dest.dir}" destdir="${visbio.docs-dir}/docs/api"
365      author="true" version="true" use="true" windowtitle="LOCI Software API">
366      <packageset dir="${dest.dir}" includes="loci/visbio/**"/>
367      <doctitle><![CDATA[<h1>VisBio</h1>]]></doctitle>
368      <bottom><![CDATA[${copyright}]]></bottom>
369      <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
370    </javadoc>
371    <zip zipfile="${build.dir}/visbio_docs.zip" basedir="${visbio.docs-dir}"/>
372  </target>
373
374  <target name="dist-visbio"
375    depends="dist-visbio-win32, dist-visbio-win32-nojre, dist-visbio-macosx, dist-visbio-linux, dist-visbio-nojre"
376    description="create distribution bundles for VisBio"/>
377
378  <target name="dist-visbio-win32" depends="jar-visbio, jar-formats"
379    description="create distribution bundle for VisBio: Windows w/ JRE">
380    <copy todir="${visbio.win32-dir}" preservelastmodified="true">
381      <fileset dir="dist/visbio/win32"/>
382      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
383      <fileset dir="${jar.dir}" includes="visbio.jar ${visbio.classpath}"/>
384    </copy>
385    <fixcrlf srcdir="${visbio.win32-dir}" eol="dos"
386      includes="*.txt *.cpp *.m plugins/*.txt"/>
387    <untar src="dist/jre-win32.tar.gz" dest="${visbio.win32-dir}"
388      overwrite="false" compression="gzip"/>
389    <zip destfile="${dist.dir}/visbio${visbio.version}_win32.zip"
390      basedir="${dist.dir}/visbio/win32"/>
391  </target>
392
393  <target name="dist-visbio-win32-nojre" depends="jar-visbio, jar-formats"
394    description="create distribution bundle for VisBio: Windows no JRE">
395    <copy todir="${visbio.win32-nojre-dir}"
396      preservelastmodified="true">
397      <fileset dir="dist/visbio/win32" excludes="launcher.cfg"/>
398      <fileset dir="dist/visbio/win32-nojre"/>
399      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
400      <fileset dir="${jar.dir}" includes="visbio.jar ${visbio.classpath}"/>
401    </copy>
402    <fixcrlf srcdir="${visbio.win32-nojre-dir}" eol="dos"
403      includes="*.txt *.cpp *.m plugins/*.txt"/>
404    <zip destfile="${dist.dir}/visbio${visbio.version}_win32_nojre.zip"
405      basedir="${dist.dir}/visbio/win32-nojre"/>
406  </target>
407
408  <!-- HACK - limit OS to *nix due to file permission issues -->
409  <target name="dist-visbio-macosx" if="isUnix"
410    depends="jar-visbio, jar-formats"
411    description="create distribution bundle for VisBio: Mac OS X">
412    <copy todir="${visbio.macosx-dir}"
413      preservelastmodified="true">
414      <fileset dir="dist/visbio/macosx"/>
415      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
416    </copy>
417    <fixcrlf srcdir="${visbio.macosx-dir}" eol="mac"
418      includes="*.txt *.cpp *.m plugins/*.txt"/>
419    <!-- HACK - copy does not preserve permissions; chmod them back -->
420    <chmod perm="+x">
421      <fileset dir="${visbio.macosx-dir}"
422        includes="visbio omeul VisBio.app/Contents/MacOS/JavaApplicationStub"/>
423    </chmod>
424    <copy todir="${visbio.macosx-dir}/VisBio.app/Contents/Resources/Java">
425      <fileset dir="${jar.dir}" includes="visbio.jar ${visbio.classpath}"/>
426    </copy>
427<!--
428    <tar destfile="${dist.dir}/visbio${visbio.version}_macosx.tar.gz"
429      basedir="${dist.dir}/visbio/macosx" compression="gzip"/>
430-->
431    <!-- HACK - tar does not preserve permissions; use exec instead -->
432    <exec executable="tar">
433      <arg value="czf"/>
434      <arg value="${dist.dir}/visbio${visbio.version}_macosx.tar.gz"/>
435      <arg value="-C"/>
436      <arg value="${dist.dir}/visbio/macosx VisBio"/>
437    </exec>
438  </target>
439
440  <!-- HACK - limit OS to *nix due to file permission issues -->
441  <target name="dist-visbio-linux" if="isUnix"
442    depends="jar-visbio, jar-formats"
443    description="create distribution bundle for VisBio: Linux w/ JRE">
444    <copy todir="${visbio.linux-dir}" preservelastmodified="true">
445      <fileset dir="dist/visbio/linux"/>
446      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
447      <fileset dir="${jar.dir}" includes="visbio.jar ${visbio.classpath}"/>
448    </copy>
449    <fixcrlf srcdir="${visbio.linux-dir}" eol="unix"
450      includes="*.txt *.cpp *.m plugins/*.txt"/>
451    <!-- HACK - copy does not preserve permissions; chmod them back -->
452    <chmod perm="+x">
453      <fileset dir="${visbio.linux-dir}" includes="visbio omeul"/>
454    </chmod>
455<!--
456    <untar src="dist/jre-linux.tar.gz" dest="${visbio.linux-dir}"
457      overwrite="false" compression="gzip"/>
458-->
459    <!-- HACK - untar does not restore permissions; use exec instead -->
460    <exec executable="tar">
461      <arg value="xzf"/>
462      <arg value="dist/jre-linux.tar.gz"/>
463      <arg value="-C"/>
464      <arg value="${visbio.linux-dir}"/>
465    </exec>
466<!--
467    <tar destfile="${dist.dir}/visbio${visbio.version}_linux.tar.gz"
468      basedir="${dist.dir}/visbio/linux" compression="gzip"/>
469-->
470    <!-- HACK - tar does not preserve permissions; use exec instead -->
471    <exec executable="tar">
472      <arg value="czf"/>
473      <arg value="${dist.dir}/visbio${visbio.version}_linux.tar.gz"/>
474      <arg value="-C"/>
475      <arg value="${dist.dir}/visbio/linux visbio${visbio.version}"/>
476    </exec>
477  </target>
478
479  <!-- HACK - limit OS to *nix due to file permission issues -->
480  <target name="dist-visbio-nojre" if="isUnix"
481    depends="jar-visbio, jar-formats"
482    description="create distribution bundle for VisBio: cross-platform">
483    <copy todir="${visbio.nojre-dir}" preservelastmodified="true">
484      <fileset dir="dist/visbio/linux"/>
485      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
486      <fileset dir="${jar.dir}" includes="visbio.jar ${visbio.classpath}"/>
487    </copy>
488    <fixcrlf srcdir="${visbio.nojre-dir}" eol="unix"
489      includes="*.txt *.cpp *.m plugins/*.txt"/>
490    <!-- HACK - copy does not preserve permissions; chmod them back -->
491    <chmod perm="+x">
492      <fileset dir="${visbio.nojre-dir}" includes="visbio omeul"/>
493    </chmod>
494<!--
495    <tar destfile="${dist.dir}/visbio${visbio.version}.tar.gz"
496      basedir="${dist.dir}/visbio/nojre" compression="gzip"/>
497-->
498    <!-- HACK - tar does not preserve permissions; use exec instead -->
499    <exec executable="tar">
500      <arg value="czf"/>
501      <arg value="${dist.dir}/visbio${visbio.version}.tar.gz"/>
502      <arg value="-C"/>
503      <arg value="${dist.dir}/visbio/nojre visbio${visbio.version}"/>
504    </exec>
505  </target>
506
507  <!-- LOCI Plugins for ImageJ -->
508
509  <target name="style-plugins" depends="copy-source, jar-checks"
510    description="check source code style for LOCI Plugins for ImageJ">
511    <checkstyle config="checkstyle.xml" failOnViolation="false">
512      <fileset dir="${dest.dir}" includes="${plugins.source}"/>
513    </checkstyle>
514  </target>
515
516  <target name="compile-plugins" depends="copy-source"
517    description="compile classes for LOCI Plugins for ImageJ">
518    <mkdir dir="${classes.dir}"/>
519    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
520      includes="${plugins.source}" classpath="${ext.jars}"
521      debug="true" deprecation="true" source="1.4" target="1.4"/>
522  </target>
523
524  <target name="jar-plugins" depends="compile-plugins, copy-jars, jar-formats"
525    description="generate JAR file for LOCI Plugins for ImageJ">
526    <jar jarfile="${jar.dir}/${plugins.jar}"
527      basedir="${src.dir}/loci/plugins" includes="plugins.config">
528      <manifest>
529        <attribute name="Main-Class" value="${plugins.main}"/>
530      </manifest>
531    </jar>
532    <jar jarfile="${jar.dir}/${plugins.jar}" basedir="${classes.dir}"
533      includes="${plugins.files}" excludes="loci/plugins/plugins.config"
534      update="true">
535    </jar>
536  </target>
537
538  <!-- OME Metadata Notebook -->
539
540  <target name="style-notebook" depends="copy-source, jar-checks"
541    description="check source code style for OME Metadata Notebook">
542    <checkstyle config="checkstyle.xml" failOnViolation="false">
543      <fileset dir="${dest.dir}" includes="${notebook.source}"/>
544    </checkstyle>
545  </target>
546
547  <target name="compile-notebook" depends="copy-source"
548    description="compile classes for OME Metadata Notebook">
549    <mkdir dir="${classes.dir}"/>
550    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
551      includes="${notebook.source}" classpath="${ext.jars}"
552      debug="true" deprecation="true" source="1.4" target="1.4"/>
553  </target>
554
555  <target name="jar-notebook"
556    depends="compile-notebook, copy-jars, jar-formats"
557    description="generate JAR file for OME Metadata Notebook">
558    <copy todir="${classes.dir}" preservelastmodified="true">
559      <fileset dir="${src.dir}" includes="${notebook.resources}"/>
560    </copy>
561    <jar jarfile="${jar.dir}/${notebook.jar}" basedir="${classes.dir}"
562      includes="${notebook.files}">
563      <manifest>
564        <attribute name="Main-Class" value="${notebook.main}"/>
565        <attribute name="Class-Path" value="${notebook.classpath}"/>
566      </manifest>
567    </jar>
568  </target>
569
570  <!-- Leica Converter -->
571
572  <target name="style-leica" depends="copy-source, jar-checks"
573    description="check source code style for Leica Converter">
574    <checkstyle config="checkstyle.xml" failOnViolation="false">
575      <fileset dir="${dest.dir}" includes="${leica.source}"/>
576    </checkstyle>
577  </target>
578
579  <target name="compile-leica" depends="copy-source"
580    description="compile classes for Leica Converter">
581    <mkdir dir="${classes.dir}"/>
582    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
583      includes="${leica.source}" classpath="${ext.jars}"
584      debug="true" deprecation="true" source="1.4" target="1.4"/>
585  </target>
586
587  <target name="jar-leica" depends="compile-leica, copy-jars, jar-formats"
588    description="generate JAR file for Leica Converter">
589    <jar jarfile="${jar.dir}/${leica.jar}" basedir="${classes.dir}"
590      includes="${leica.files}">
591      <manifest>
592        <attribute name="Main-Class" value="${leica.main}"/>
593        <attribute name="Class-Path" value="${leica.classpath}"/>
594      </manifest>
595    </jar>
596  </target>
597
598  <!-- Movie Stitcher -->
599
600  <target name="style-stitcher" depends="copy-source, jar-checks"
601    description="check source code style for Movie Stitcher">
602    <checkstyle config="checkstyle.xml" failOnViolation="false">
603      <fileset dir="${dest.dir}" includes="${stitcher.source}"/>
604    </checkstyle>
605  </target>
606
607  <target name="compile-stitcher" depends="copy-source"
608    description="compile classes for Movie Stitcher">
609    <mkdir dir="${classes.dir}"/>
610    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
611      includes="${stitcher.source}" classpath="${ext.jars}"
612      debug="true" deprecation="true" source="1.4" target="1.4"/>
613  </target>
614
615  <target name="jar-stitcher" depends="compile-stitcher"
616    description="generate JAR file for Movie Stitcher">
617    <mkdir dir="${jar.dir}"/>
618    <jar jarfile="${jar.dir}/${stitcher.jar}" basedir="${classes.dir}"
619      includes="${stitcher.files}">
620      <manifest>
621        <attribute name="Main-Class" value="${stitcher.main}"/>
622        <attribute name="Class-Path" value="${stitcher.classpath}"/>
623      </manifest>
624    </jar>
625  </target>
626
627  <!-- Slim Plotter -->
628
629  <target name="style-slim" depends="copy-source, jar-checks"
630    description="check source code style for Slim Plotter">
631    <checkstyle config="checkstyle.xml" failOnViolation="false">
632      <fileset dir="${dest.dir}" includes="${slim.source}"/>
633    </checkstyle>
634  </target>
635
636  <target name="compile-slim" depends="copy-source"
637    description="compile classes for Slim Plotter">
638    <mkdir dir="${classes.dir}"/>
639    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
640      includes="${slim.source}" classpath="${ext.jars}"
641      debug="true" deprecation="true" source="1.4" target="1.4"/>
642  </target>
643
644  <target name="jar-slim" depends="compile-slim, copy-jars"
645    description="generate JAR file for Slim Plotter">
646    <jar jarfile="${jar.dir}/${slim.jar}" basedir="${classes.dir}"
647      includes="${slim.files}">
648      <manifest>
649        <attribute name="Main-Class" value="${slim.main}"/>
650        <attribute name="Class-Path" value="${slim.classpath}"/>
651      </manifest>
652    </jar>
653  </target>
654
655  <target name="dist-slim" if="isUnix" depends="copy-jars, jar-slim"
656    description="create distribution bundle for Slim Plotter">
657    <copy todir="${slim.dist-dir}" preservelastmodified="true">
658      <fileset dir="dist/slim"/>
659      <fileset dir="${jar.dir}" includes="SlimPlotter.jar ${slim.classpath}"/>
660    </copy>
661    <!-- HACK - copy does not preserve permissions; chmod them back -->
662    <chmod perm="+x">
663      <fileset dir="${slim.dist-dir}" includes="slim"/>
664    </chmod>
665<!--
666    <zip destfile="${dist.dir}/slim.zip" basedir="${dist.dir}/slim"/>
667-->
668    <!-- HACK - zip does not preserve permissions; use exec instead -->
669    <exec executable="zip" dir="${dist.dir}/slim">
670      <arg value="-r9"/>
671      <arg value="../slim.zip"/>
672      <arg value="SlimPlotter"/>
673    </exec>
674  </target>
675
676  <!-- LOCI Checkstyle checks -->
677
678  <target name="style-checks" 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="${checks.source}"/>
682    </checkstyle>
683  </target>
684
685  <target name="compile-checks" 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="${checks.source}" classpath="${ext.jars}"
690      debug="true" deprecation="true" source="1.4" target="1.4"/>
691  </target>
692
693  <target name="jar-checks" depends="compile-checks, copy-jars"
694    description="generate JAR file for Slim Plotter">
695    <copy todir="${classes.dir}" preservelastmodified="true">
696      <fileset dir="${src.dir}" includes="${checks.resources}"/>
697    </copy>
698    <jar jarfile="${jar.dir}/${checks.jar}" basedir="${classes.dir}"
699      includes="${checks.files}">
700      <manifest>
701        <attribute name="Main-Class" value="${checks.main}"/>
702        <attribute name="Class-Path" value="${checks.classpath}"/>
703      </manifest>
704    </jar>
705  </target>
706
707</project>
Note: See TracBrowser for help on using the repository browser.