1 |
<project name="jsr166" default="usage"> |
<project name="jsr166" default="usage"> |
2 |
|
|
3 |
<description> |
<description> |
4 |
Build file for JSR-166 |
------------------------------------------------------------------------------ |
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. |
Usage: ant [target] |
|
</description> |
|
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"> |
<target name="usage" description="Advises user to run with -projecthelp"> |
15 |
<echo> |
<echo>Run "ant -projecthelp" for full usage information.</echo> |
|
ant [target], where target is one of: |
|
|
|
|
|
usage (default) Prints this message |
|
|
compile Compiles all sources to build folder |
|
|
jar Builds library jar from compiled sources |
|
|
test Runs all tests (requires JUnit 1.8 in ${ant.home}/lib) |
|
|
docs Builds javadocs with custom tags to build folder |
|
|
dist-docs Builds javadocs without custom tags to dist folder |
|
|
dist Puts all distributable products in single hierarchy |
|
|
|
|
|
clean Removes all build products |
|
|
dist-clean Removes all build and distribution products |
|
|
|
|
|
checkstyle Reports on style errors in Java source (verbose, mostly chaff) |
|
|
doccheck Reports on javadoc style errors (not working yet) |
|
|
</echo> |
|
16 |
</target> |
</target> |
17 |
|
|
18 |
|
|
19 |
<!-- User-specific settings --> |
<!-- User-specific settings --> |
20 |
<property file="user.properties"/> |
<property file="user.properties"/> |
21 |
|
|
|
<!-- Set build.warnings in user.properties to turn on -warnunchecked --> |
|
|
<!-- <property name="build.warnings" value=""/> --> |
|
|
|
|
22 |
|
|
23 |
<!-- Compilation options --> |
<!-- Compilation options --> |
24 |
<property name="build.sourcelevel" value="1.5"/> |
<property name="build.sourcelevel" value="1.5"/> |
136 |
|
|
137 |
|
|
138 |
<target name="jar" |
<target name="jar" |
139 |
depends="native-jar, emulation-jar" |
depends="check-emulation, init-jar, native-jar, emulation-jar" |
140 |
description="Builds library jar from compiled sources"/> |
description="Builds library jar from compiled sources"/> |
141 |
|
|
142 |
|
|
143 |
<target name="test" |
<target name="test" |
144 |
depends="init, check-junit, report-tests" |
depends="init, check-junit, report-tests" |
145 |
description="Runs all tests (requires JUnit 3.8+ in ${ant.home}/lib)" /> |
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
146 |
|
|
147 |
|
|
148 |
<target name="checkstyle" |
<target name="checkstyle" |
189 |
source="${build.docsourcelevel}"> |
source="${build.docsourcelevel}"> |
190 |
|
|
191 |
<tag name="revised" description="Last revised:"/> |
<tag name="revised" description="Last revised:"/> |
192 |
<tag name="spec" description="Specified by:"/> |
<tag name="spec" description="Specified by:"/> |
193 |
<tag name="editor" description="Last edited by:"/> |
<tag name="editor" description="Last edited by:"/> |
194 |
<tag name="fixme" description="FIX ME:"/> |
<tag name="fixme" description="FIX ME:"/> |
195 |
|
|
196 |
<packageset dir="${build.filter.src.dir}"/> |
<packageset dir="${build.filter.src.dir}"/> |
197 |
|
|
198 |
</javadoc> |
</javadoc> |
303 |
|
|
304 |
|
|
305 |
<target name="native-jar" |
<target name="native-jar" |
306 |
depends="compile, init-jar" |
depends="compile" |
307 |
unless="build.emulation"> |
unless="build.emulation.true"> |
308 |
|
|
309 |
<jar destfile="${product.jar}"> |
<jar destfile="${product.jar}"> |
310 |
<fileset dir="${build.classes.dir}"/> |
<fileset dir="${build.classes.dir}"/> |
313 |
</target> |
</target> |
314 |
|
|
315 |
|
|
|
<target name="base-jar" |
|
|
depends="compile, init-jar"> |
|
|
|
|
|
<jar destfile="${product.jar}"> |
|
|
<fileset dir="${build.classes.dir}"> |
|
|
<patternset refid="emulation.excludes"/> |
|
|
</fileset> |
|
|
</jar> |
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
316 |
<target name="compile-emulation" |
<target name="compile-emulation" |
317 |
depends="init" |
depends="init" |
318 |
if="build.emulation"> |
if="build.emulation.true"> |
319 |
|
|
320 |
<mkdir dir="${build.emulation.dir}"/> |
<mkdir dir="${build.emulation.dir}"/> |
321 |
|
|
336 |
|
|
337 |
|
|
338 |
<target name="emulation-jar" |
<target name="emulation-jar" |
339 |
depends="base-jar, compile-emulation" |
depends="compile-emulation" |
340 |
if="build.emulation"> |
if="build.emulation.true"> |
341 |
|
|
342 |
|
|
343 |
<jar destfile="${product.jar}" update="true" duplicate="add"> |
<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}"/> |
<fileset dir="${build.emulation.dir}"/> |
348 |
</jar> |
</jar> |
349 |
|
|
506 |
</target> |
</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 --> |
<!-- Anthill targets --> |
521 |
|
|