1 |
|
<project name="jsr166" default="usage"> |
2 |
|
|
3 |
|
<description> |
4 |
< |
Build file for JSR-166 |
4 |
> |
------------------------------------------------------------------------------ |
5 |
> |
Build file for JSR-166 |
6 |
|
|
7 |
< |
JUnit 3.8 or better must be in ${ant.home}/lib for the test target to work. |
7 |
< |
</description> |
7 |
> |
Usage: ant [target] |
8 |
|
|
9 |
+ |
User-specific settings are read from user.properties. |
10 |
+ |
See user.properties.sample for examples. |
11 |
+ |
------------------------------------------------------------------------------ |
12 |
+ |
</description> |
13 |
|
|
14 |
< |
<target name="usage" description="Prints this message"> |
15 |
< |
<echo> |
12 |
< |
ant [target], where target is one of: |
13 |
< |
|
14 |
< |
usage (default) Prints this message |
15 |
< |
compile Compiles all sources to build folder |
16 |
< |
jar Builds library jar from compiled sources |
17 |
< |
test Runs all tests (requires JUnit 1.8 in ${ant.home}/lib) |
18 |
< |
docs Builds javadocs with custom tags to build folder |
19 |
< |
dist-docs Builds javadocs without custom tags to dist folder |
20 |
< |
dist Puts all distributable products in single hierarchy |
21 |
< |
|
22 |
< |
clean Removes all build products |
23 |
< |
dist-clean Removes all build and distribution products |
24 |
< |
|
25 |
< |
checkstyle Reports on style errors in Java source (verbose, mostly chaff) |
26 |
< |
doccheck Reports on javadoc style errors (not working yet) |
27 |
< |
</echo> |
14 |
> |
<target name="usage" description="Advises user to run with -projecthelp"> |
15 |
> |
<echo>Run "ant -projecthelp" for full usage information.</echo> |
16 |
|
</target> |
17 |
|
|
18 |
+ |
|
19 |
|
<!-- User-specific settings --> |
20 |
|
<property file="user.properties"/> |
21 |
|
|
33 |
– |
<!-- Set build.warnings in user.properties to turn on -warnunchecked --> |
34 |
– |
<!-- <property name="build.warnings" value=""/> --> |
35 |
– |
|
22 |
|
|
23 |
|
<!-- Compilation options --> |
24 |
|
<property name="build.sourcelevel" value="1.5"/> |
136 |
|
|
137 |
|
|
138 |
|
<target name="jar" |
139 |
< |
depends="native-jar, emulation-jar" |
139 |
> |
depends="check-emulation, init-jar, native-jar, emulation-jar" |
140 |
|
description="Builds library jar from compiled sources"/> |
141 |
|
|
142 |
|
|
143 |
|
<target name="test" |
144 |
|
depends="init, check-junit, report-tests" |
145 |
< |
description="Runs all tests (requires JUnit 3.8+ in ${ant.home}/lib)" /> |
145 |
> |
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
146 |
|
|
147 |
|
|
148 |
|
<target name="checkstyle" |
189 |
|
source="${build.docsourcelevel}"> |
190 |
|
|
191 |
|
<tag name="revised" description="Last revised:"/> |
192 |
< |
<tag name="spec" description="Specified by:"/> |
193 |
< |
<tag name="editor" description="Last edited by:"/> |
194 |
< |
<tag name="fixme" description="FIX ME:"/> |
192 |
> |
<tag name="spec" description="Specified by:"/> |
193 |
> |
<tag name="editor" description="Last edited by:"/> |
194 |
> |
<tag name="fixme" description="FIX ME:"/> |
195 |
> |
|
196 |
|
<packageset dir="${build.filter.src.dir}"/> |
197 |
|
|
198 |
|
</javadoc> |
303 |
|
|
304 |
|
|
305 |
|
<target name="native-jar" |
306 |
< |
depends="compile, init-jar" |
307 |
< |
unless="build.emulation"> |
306 |
> |
depends="compile" |
307 |
> |
unless="build.emulation.true"> |
308 |
|
|
309 |
|
<jar destfile="${product.jar}"> |
310 |
|
<fileset dir="${build.classes.dir}"/> |
313 |
|
</target> |
314 |
|
|
315 |
|
|
329 |
– |
<target name="base-jar" |
330 |
– |
depends="compile, init-jar"> |
331 |
– |
|
332 |
– |
<jar destfile="${product.jar}"> |
333 |
– |
<fileset dir="${build.classes.dir}"> |
334 |
– |
<patternset refid="emulation.excludes"/> |
335 |
– |
</fileset> |
336 |
– |
</jar> |
337 |
– |
|
338 |
– |
</target> |
339 |
– |
|
340 |
– |
|
316 |
|
<target name="compile-emulation" |
317 |
|
depends="init" |
318 |
< |
if="build.emulation"> |
318 |
> |
if="build.emulation.true"> |
319 |
|
|
320 |
|
<mkdir dir="${build.emulation.dir}"/> |
321 |
|
|
336 |
|
|
337 |
|
|
338 |
|
<target name="emulation-jar" |
339 |
< |
depends="base-jar, compile-emulation" |
340 |
< |
if="build.emulation"> |
339 |
> |
depends="compile-emulation" |
340 |
> |
if="build.emulation.true"> |
341 |
> |
|
342 |
|
|
343 |
< |
<jar destfile="${product.jar}" update="true" duplicate="add"> |
343 |
> |
<jar destfile="${product.jar}" duplicate="add"> |
344 |
> |
<fileset dir="${build.classes.dir}"> |
345 |
> |
<patternset refid="emulation.excludes"/> |
346 |
> |
</fileset> |
347 |
|
<fileset dir="${build.emulation.dir}"/> |
348 |
|
</jar> |
349 |
|
|
506 |
|
</target> |
507 |
|
|
508 |
|
|
509 |
+ |
<target name="check-emulation"> |
510 |
+ |
<condition property="build.emulation.true"> |
511 |
+ |
<or> |
512 |
+ |
<isset property="build.emulation"/> |
513 |
+ |
<os family="windows"/> |
514 |
+ |
</or> |
515 |
+ |
</condition> |
516 |
+ |
</target> |
517 |
+ |
|
518 |
+ |
|
519 |
|
|
520 |
|
<!-- Anthill targets --> |
521 |
|
|