| 1 |
<project name="jsr166" default="usage"> |
<project name="jsr166" default="usage"> |
| 2 |
|
|
| 3 |
<description> |
<description> |
| 4 |
|
------------------------------------------------------------------------------ |
| 5 |
Build file for JSR-166 |
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 an explanation of some useful settings. |
| 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"/> |
| 54 |
|
|
| 55 |
<!-- Jar locations --> |
<!-- Jar locations --> |
| 56 |
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
|
<property name="javac.jar" location="${lib.dir}/javac.jar"/> |
|
|
<property name="collect.jar" location="${lib.dir}/collect.jar"/> |
|
| 57 |
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
| 58 |
<property name="rt.jar" location="${java.home}/lib/rt.jar"/> |
<property name="rt.jar" location="${java.home}/lib/rt.jar"/> |
| 59 |
|
|
| 60 |
|
|
|
<!-- |
|
|
! Bootclasspath munging for source compilation. |
|
|
--> |
|
|
|
|
|
<path id="javac.bootclasspath.prepend"> |
|
|
<!-- <pathelement location="${src.dir}"/> --> |
|
|
<pathelement location="${javac.jar}"/> |
|
|
</path> |
|
|
|
|
|
<path id="javac.bootclasspath"> |
|
|
<!-- <pathelement location="${src.dir}"/> --> |
|
|
<pathelement location="${collect.jar}"/> |
|
|
<pathelement location="${rt.jar}"/> |
|
|
</path> |
|
|
|
|
|
<!-- Flatten bootclasspath prefix into a platform-appropriate string --> |
|
|
<property name="javac.bootclasspath.prepend" refid="javac.bootclasspath.prepend"/> |
|
|
|
|
|
<!-- Turn the flattened bootclasspath prefix into a javac argument --> |
|
|
<property name="javac.args" value='-J-Xbootclasspath/p:${javac.bootclasspath.prepend}'/> |
|
|
|
|
|
|
|
|
<!-- |
|
|
! Bootclasspath munging for testing, so JUnit can test our local |
|
|
! modifications to java.*. |
|
|
--> |
|
|
|
|
|
<path id="test.classpath"> |
|
|
<pathelement location="${product.jar}"/> |
|
|
<pathelement location="${build.testcases.dir}"/> |
|
|
<pathelement location="${junit.jar}"/> |
|
|
</path> |
|
|
|
|
|
<!-- Flatten test classpath into a platform-appropriate string --> |
|
|
<property name="test.classpath" refid="test.classpath"/> |
|
| 61 |
|
|
| 62 |
<!-- Turn the flattened test classpath into a javac argument --> |
<!-- Files excluded from emulation and dist-docs --> |
| 63 |
<property name="test.javac.args" value='-Xbootclasspath/p:${test.classpath}'/> |
<patternset id="emulation.excludes"> |
| 64 |
|
<exclude name="java/util/Random.*"/> |
| 65 |
|
<exclude name="sun/misc/Unsafe.*"/> |
| 66 |
|
</patternset> |
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
| 70 |
<!-- Main targets --> |
<!-- Main targets --> |
| 71 |
|
|
| 72 |
<target name="compile" depends="init" |
<target name="compile" |
| 73 |
|
depends="init, configure-compiler" |
| 74 |
description="Compiles main sources to build folder"> |
description="Compiles main sources to build folder"> |
| 75 |
|
|
| 76 |
<mkdir dir="${build.classes.dir}"/> |
<mkdir dir="${build.classes.dir}"/> |
| 84 |
fork="true"> |
fork="true"> |
| 85 |
|
|
| 86 |
<bootclasspath refid="javac.bootclasspath"/> |
<bootclasspath refid="javac.bootclasspath"/> |
| 87 |
<compilerarg line="${javac.args} ${build.warnings.option}"/> |
<compilerarg line="${build.javac.args}"/> |
| 88 |
|
|
| 89 |
</javac> |
</javac> |
| 90 |
|
|
| 91 |
</target> |
</target> |
| 92 |
|
|
| 93 |
|
|
| 94 |
<target name="jar" depends="native-jar, emulation-jar"/> |
<target name="jar" |
| 95 |
|
depends="configure-emulation, init-jar, native-jar, emulation-jar" |
| 96 |
|
description="Builds library jar from compiled sources"/> |
| 97 |
|
|
| 98 |
|
|
| 99 |
<target name="test" depends="init, check-junit, report-tests" |
<target name="test" |
| 100 |
description="Runs all tests (requires JUnit 3.8+ in ${ant.home}/lib)" |
depends="init, configure-tests, report-tests" |
| 101 |
/> |
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
| 102 |
|
|
| 103 |
|
|
| 104 |
<target name="checkstyle" depends="filter-src" |
<target name="checkstyle" |
| 105 |
|
depends="filter-src" |
| 106 |
description="Reports on style errors in Java source (verbose, mostly chaff)"> |
description="Reports on style errors in Java source (verbose, mostly chaff)"> |
| 107 |
|
|
| 108 |
<taskdef resource="checkstyletask.properties" |
<taskdef resource="checkstyletask.properties" |
| 116 |
</target> |
</target> |
| 117 |
|
|
| 118 |
|
|
| 119 |
<target name="doccheck" depends="filter-src" |
<target name="doccheck" |
| 120 |
|
depends="filter-src" |
| 121 |
description="Reports on javadoc style errors (not working yet)"> |
description="Reports on javadoc style errors (not working yet)"> |
| 122 |
|
|
| 123 |
<delete dir="${build.doccheck.dir}"/> |
<delete dir="${build.doccheck.dir}"/> |
| 132 |
</target> |
</target> |
| 133 |
|
|
| 134 |
|
|
| 135 |
<target name="docs" depends="filter-src" |
<target name="docs" |
| 136 |
|
depends="filter-src" |
| 137 |
description="Builds javadocs with custom tags to build folder"> |
description="Builds javadocs with custom tags to build folder"> |
| 138 |
|
|
| 139 |
<delete dir="${build.javadocs.dir}"/> |
<delete dir="${build.javadocs.dir}"/> |
| 148 |
<tag name="spec" description="Specified by:"/> |
<tag name="spec" description="Specified by:"/> |
| 149 |
<tag name="editor" description="Last edited by:"/> |
<tag name="editor" description="Last edited by:"/> |
| 150 |
<tag name="fixme" description="FIX ME:"/> |
<tag name="fixme" description="FIX ME:"/> |
| 151 |
|
|
| 152 |
<packageset dir="${build.filter.src.dir}"/> |
<packageset dir="${build.filter.src.dir}"/> |
| 153 |
|
|
| 154 |
</javadoc> |
</javadoc> |
| 156 |
</target> |
</target> |
| 157 |
|
|
| 158 |
|
|
| 159 |
|
<target name="strip" |
| 160 |
|
depends="init, configure-compiler" |
| 161 |
|
description="Strip generics from java source (not working yet)"> |
| 162 |
|
|
| 163 |
|
<mkdir dir="${build.stripped.dir}"/> |
| 164 |
|
|
| 165 |
<!-- |
<!-- |
| 166 |
# javac -s doesn't reliably generate compilable code. It generates |
# javac -s doesn't reliably generate compilable code. It generates |
| 167 |
# bridge methods (marked as "synthetic") that can have identical |
# bridge methods (marked as "synthetic") that can have identical |
| 168 |
# signatures to existing methods except for the return value. |
# signatures to existing methods except for the return value. |
| 169 |
--> |
--> |
|
<target name="strip" depends="init"> |
|
|
|
|
|
<mkdir dir="${build.stripped.dir}"/> |
|
|
|
|
| 170 |
<javac srcdir="${src.dir}" |
<javac srcdir="${src.dir}" |
| 171 |
destdir="${build.stripped.dir}" |
destdir="${build.stripped.dir}" |
| 172 |
debug="${build.debug}" |
debug="${build.debug}" |
| 176 |
fork="true"> |
fork="true"> |
| 177 |
|
|
| 178 |
<bootclasspath refid="javac.bootclasspath"/> |
<bootclasspath refid="javac.bootclasspath"/> |
| 179 |
<compilerarg line="${javac.args} ${build.warnings.option} -s"/> |
<compilerarg line="${build.javac.args} -s"/> |
| 180 |
|
|
| 181 |
</javac> |
</javac> |
| 182 |
|
|
| 183 |
</target> |
</target> |
| 184 |
|
|
| 185 |
|
|
| 186 |
<target name="dist" depends="init, dist-clean, dist-jar, dist-docs" |
<target name="dist" |
| 187 |
|
depends="init, dist-clean, dist-jar, dist-docs" |
| 188 |
description="Puts all distributable products in single hierarchy"/> |
description="Puts all distributable products in single hierarchy"/> |
| 189 |
|
|
| 190 |
|
|
| 206 |
</target> |
</target> |
| 207 |
|
|
| 208 |
|
|
| 209 |
<!-- Anthill targets --> |
<target name="dist-docs" |
| 210 |
|
depends="filter-src" |
| 211 |
<!-- Should really run the tests instead of just the jar target --> |
description="Builds javadocs without custom tags to dist folder"> |
|
<target name="anthill-build" depends="jar, test, docs, dist-docs"/> |
|
|
|
|
|
<target name="anthill-publish"> |
|
|
<copy todir="${deployDir}/docs/private"> |
|
|
<fileset dir="${build.javadocs.dir}"/> |
|
|
</copy> |
|
|
<copy todir="${deployDir}/docs/public"> |
|
|
<fileset dir="${dist.javadocs.dir}"/> |
|
|
</copy> |
|
|
<copy tofile="${deployDir}/index.html" |
|
|
file="${basedir}/etc/anthill-index.html"/> |
|
|
<copy todir="${deployDir}/notes"> |
|
|
<fileset dir="${basedir}/etc/notes"/> |
|
|
</copy> |
|
|
</target> |
|
| 212 |
|
|
| 213 |
|
<delete dir="${dist.javadocs.dir}"/> |
| 214 |
|
<mkdir dir="${dist.javadocs.dir}"/> |
| 215 |
|
|
| 216 |
<!-- Internal targets --> |
<javadoc destdir="${dist.javadocs.dir}" |
| 217 |
|
link="http://java.sun.com/j2se/1.4.1/docs/api" |
| 218 |
|
overview="${src.dir}/intro.html" |
| 219 |
|
source="${build.docsourcelevel}"> |
| 220 |
|
|
| 221 |
<target name="set-warnings-if" if="build.warnings"> |
<packageset dir="${build.filter.src.dir}"/> |
| 222 |
|
|
| 223 |
<property name="build.warnings.option" value="-warnunchecked"/> |
</javadoc> |
| 224 |
|
|
| 225 |
</target> |
</target> |
| 226 |
|
|
| 227 |
|
|
|
<target name="set-warnings-unless" unless="build.warnings"> |
|
|
|
|
|
<property name="build.warnings.option" value=""/> |
|
| 228 |
|
|
| 229 |
</target> |
<!-- Internal targets --> |
| 230 |
|
|
| 231 |
|
|
| 232 |
<target name="init" depends="set-warnings-if, set-warnings-unless"> |
<target name="init"> |
| 233 |
|
|
| 234 |
<!-- Version is kept in a separate file --> |
<!-- Version is kept in a separate file --> |
| 235 |
<loadfile property="version" srcFile="version.properties"/> |
<loadfile property="version" srcFile="version.properties"/> |
| 238 |
</target> |
</target> |
| 239 |
|
|
| 240 |
|
|
| 241 |
<target name="native-jar" depends="compile" |
<target name="init-jar"> |
|
description="Builds library jar from compiled sources"> |
|
| 242 |
|
|
| 243 |
<mkdir dir="${build.lib.dir}"/> |
<mkdir dir="${build.lib.dir}"/> |
| 244 |
|
|
| 245 |
|
</target> |
| 246 |
|
|
| 247 |
|
|
| 248 |
|
<target name="native-jar" |
| 249 |
|
depends="compile" |
| 250 |
|
unless="build.emulation.true"> |
| 251 |
|
|
| 252 |
<jar destfile="${product.jar}"> |
<jar destfile="${product.jar}"> |
| 253 |
<fileset dir="${build.classes.dir}"/> |
<fileset dir="${build.classes.dir}"/> |
| 254 |
</jar> |
</jar> |
| 256 |
</target> |
</target> |
| 257 |
|
|
| 258 |
|
|
| 259 |
<target name="compile-emulation" depends="init" |
<target name="compile-emulation" |
| 260 |
if="build.emulation" |
depends="init, configure-compiler" |
| 261 |
description="Compiles emulation sources to build folder"> |
if="build.emulation.true"> |
| 262 |
|
|
| 263 |
<mkdir dir="${build.emulation.dir}"/> |
<mkdir dir="${build.emulation.dir}"/> |
| 264 |
|
|
| 271 |
fork="true"> |
fork="true"> |
| 272 |
|
|
| 273 |
<bootclasspath refid="javac.bootclasspath"/> |
<bootclasspath refid="javac.bootclasspath"/> |
| 274 |
<compilerarg line="${javac.args} ${build.warnings.option}"/> |
<compilerarg line="${build.javac.args}"/> |
| 275 |
|
|
| 276 |
</javac> |
</javac> |
| 277 |
|
|
| 278 |
</target> |
</target> |
| 279 |
|
|
| 280 |
|
|
| 281 |
<target name="emulation-jar" depends="native-jar, compile-emulation" |
<target name="emulation-jar" |
| 282 |
if="build.emulation"> |
depends="compile-emulation" |
| 283 |
|
if="build.emulation.true"> |
| 284 |
|
|
| 285 |
<jar destfile="${product.jar}" update="true" duplicate="add"> |
|
| 286 |
|
<jar destfile="${product.jar}" duplicate="add"> |
| 287 |
|
<fileset dir="${build.classes.dir}"> |
| 288 |
|
<patternset refid="emulation.excludes"/> |
| 289 |
|
</fileset> |
| 290 |
<fileset dir="${build.emulation.dir}"/> |
<fileset dir="${build.emulation.dir}"/> |
| 291 |
</jar> |
</jar> |
| 292 |
|
|
| 293 |
</target> |
</target> |
| 294 |
|
|
| 295 |
|
|
| 296 |
<target name="dist-jar" depends="clean, jar"> |
<target name="dist-jar" |
| 297 |
|
depends="clean, jar"> |
| 298 |
|
|
| 299 |
<copy file="${product.jar}" todir="${dist.dir}"/> |
<copy file="${product.jar}" todir="${dist.dir}"/> |
| 300 |
|
|
| 301 |
</target> |
</target> |
| 302 |
|
|
| 303 |
|
|
| 304 |
<target name="dist-docs" depends="filter-src" |
<target name="compile-ant-filter" |
| 305 |
description="Builds javadocs without custom tags to dist folder"> |
depends="init"> |
|
|
|
|
<delete dir="${dist.javadocs.dir}"/> |
|
|
<mkdir dir="${dist.javadocs.dir}"/> |
|
|
|
|
|
<javadoc destdir="${dist.javadocs.dir}" |
|
|
link="http://java.sun.com/j2se/1.4.1/docs/api" |
|
|
overview="${src.dir}/intro.html" |
|
|
source="${build.docsourcelevel}"> |
|
|
|
|
|
<packageset dir="${build.filter.src.dir}"/> |
|
|
|
|
|
</javadoc> |
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
|
<target name="compile-ant-filter" depends="init"> |
|
| 306 |
|
|
| 307 |
<mkdir dir="${build.ant.dir}"/> |
<mkdir dir="${build.ant.dir}"/> |
| 308 |
|
|
| 314 |
</target> |
</target> |
| 315 |
|
|
| 316 |
|
|
| 317 |
<target name="filter-src" depends="compile-ant-filter"> |
<target name="filter-src" |
| 318 |
|
depends="compile-ant-filter"> |
| 319 |
|
|
| 320 |
<mkdir dir="${build.filter.src.dir}"/> |
<mkdir dir="${build.filter.src.dir}"/> |
| 321 |
|
|
| 322 |
<copy todir="${build.filter.src.dir}"> |
<copy todir="${build.filter.src.dir}"> |
| 323 |
<fileset dir="${src.dir}"> |
<fileset dir="${src.dir}"> |
| 324 |
<include name="**/*.java"/> |
<include name="**/*.html"/> |
| 325 |
<exclude name="**/Random.java"/> |
</fileset> |
| 326 |
<exclude name="**/Unsafe.java"/> |
</copy> |
| 327 |
|
|
| 328 |
|
<copy todir="${build.filter.src.dir}"> |
| 329 |
|
<fileset dir="${src.dir}"> |
| 330 |
|
<exclude name="**/*.html"/> |
| 331 |
|
<patternset refid="emulation.excludes"/> |
| 332 |
</fileset> |
</fileset> |
| 333 |
<filterchain> |
<filterchain> |
| 334 |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 366 |
</target> |
</target> |
| 367 |
|
|
| 368 |
|
|
| 369 |
<target name="compile-tests" depends="jar"> |
<target name="compile-tests" |
| 370 |
|
depends="jar"> |
| 371 |
|
|
| 372 |
<mkdir dir="${build.testcases.dir}"/> |
<mkdir dir="${build.testcases.dir}"/> |
| 373 |
|
|
| 379 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
| 380 |
fork="true"> |
fork="true"> |
| 381 |
|
|
|
<bootclasspath refid="javac.bootclasspath"/> |
|
|
<compilerarg line="${javac.args} ${build.warnings.option}"/> |
|
| 382 |
<classpath refid="test.classpath"/> |
<classpath refid="test.classpath"/> |
| 383 |
|
<bootclasspath refid="javac.bootclasspath"/> |
| 384 |
|
<compilerarg line="${build.javac.args}"/> |
| 385 |
|
|
| 386 |
</javac> |
</javac> |
| 387 |
|
|
| 388 |
</target> |
</target> |
| 389 |
|
|
| 390 |
|
|
| 391 |
<target name="run-tests" depends="compile-tests"> |
<target name="run-tests" |
| 392 |
|
depends="compile-tests"> |
| 393 |
|
|
| 394 |
<!-- May be overridden by user.properties --> |
<!-- May be overridden by user.properties --> |
| 395 |
<property name="testcase" value="*"/> |
<property name="testcase" value="*"/> |
| 403 |
dir="${build.reports.dir}" |
dir="${build.reports.dir}" |
| 404 |
fork="true"> |
fork="true"> |
| 405 |
|
|
| 406 |
<jvmarg value="${test.javac.args}"/> |
<jvmarg value="${test.bootclasspath.arg}"/> |
| 407 |
|
|
| 408 |
<formatter type="xml"/> |
<formatter type="xml"/> |
| 409 |
|
|
| 418 |
</target> |
</target> |
| 419 |
|
|
| 420 |
|
|
| 421 |
<target name="report-tests" depends="run-tests"> |
<target name="report-tests" |
| 422 |
|
depends="run-tests"> |
| 423 |
|
|
| 424 |
<!-- Sets junit.report.format to frames if Xalan is present, |
<!-- Sets junit.report.format to frames if Xalan is present, |
| 425 |
otherwise sets it to noframes. --> |
otherwise sets it to noframes. --> |
| 426 |
<available property="junit.report.format" |
<available property="junit.report.format" |
| 440 |
</junitreport> |
</junitreport> |
| 441 |
|
|
| 442 |
<fail message="Test Cases Failed" if="junit.failed"/> |
<fail message="Test Cases Failed" if="junit.failed"/> |
| 443 |
|
|
| 444 |
|
</target> |
| 445 |
|
|
| 446 |
|
|
| 447 |
|
<target name="configure-compiler"> |
| 448 |
|
|
| 449 |
|
<property name="gjc.version" |
| 450 |
|
value="1.3"/> |
| 451 |
|
|
| 452 |
|
<condition property="build.novariance" value="-novariance"> |
| 453 |
|
<and> |
| 454 |
|
<equals arg1="${gjc.version}" arg2="2.0"/> |
| 455 |
|
<or> |
| 456 |
|
<not><isset property="gjc.novariance"/></not> |
| 457 |
|
<istrue value="${gjc.novariance}"/> |
| 458 |
|
</or> |
| 459 |
|
</and> |
| 460 |
|
</condition> |
| 461 |
|
|
| 462 |
|
<property name="build.novariance" |
| 463 |
|
value=""/> |
| 464 |
|
|
| 465 |
|
<property name="gjc.dir" |
| 466 |
|
value="${lib.dir}/gjc"/> |
| 467 |
|
|
| 468 |
|
<property name="javac.jar" |
| 469 |
|
location="${gjc.dir}/${gjc.version}/javac.jar"/> |
| 470 |
|
|
| 471 |
|
<property name="collect.jar" |
| 472 |
|
location="${gjc.dir}/${gjc.version}/collect${build.novariance}.jar"/> |
| 473 |
|
|
| 474 |
|
|
| 475 |
|
<condition property="build.warnunchecked" value="-warnunchecked"> |
| 476 |
|
<istrue value="${gjc.warnunchecked}"/> |
| 477 |
|
</condition> |
| 478 |
|
|
| 479 |
|
<property name="build.warnunchecked" value=""/> |
| 480 |
|
|
| 481 |
|
|
| 482 |
|
<!-- |
| 483 |
|
! Bootclasspath munging for source compilation. |
| 484 |
|
--> |
| 485 |
|
|
| 486 |
|
<path id="javac.bootclasspath.prefix"> |
| 487 |
|
<!-- <pathelement location="${src.dir}"/> --> |
| 488 |
|
<pathelement location="${javac.jar}"/> |
| 489 |
|
</path> |
| 490 |
|
|
| 491 |
|
<path id="javac.bootclasspath"> |
| 492 |
|
<!-- <pathelement location="${src.dir}"/> --> |
| 493 |
|
<pathelement location="${collect.jar}"/> |
| 494 |
|
<pathelement location="${rt.jar}"/> |
| 495 |
|
</path> |
| 496 |
|
|
| 497 |
|
<!-- Flatten bootclasspath prefix into a platform-appropriate string --> |
| 498 |
|
<property name="javac.bootclasspath.prefix" |
| 499 |
|
refid="javac.bootclasspath.prefix"/> |
| 500 |
|
|
| 501 |
|
<!-- Turn the flattened bootclasspath prefix into a javac argument --> |
| 502 |
|
<property name="build.bootclasspath.arg" |
| 503 |
|
value='-J-Xbootclasspath/p:${javac.bootclasspath.prefix}'/> |
| 504 |
|
|
| 505 |
|
<!-- Flatten bootclasspath for trace message --> |
| 506 |
|
<property name="javac.bootclasspath" |
| 507 |
|
refid="javac.bootclasspath"/> |
| 508 |
|
|
| 509 |
|
<!-- Common options in javac invocations --> |
| 510 |
|
<property name="build.javac.args" |
| 511 |
|
value="${build.bootclasspath.arg} ${build.warnunchecked} ${build.novariance}"/> |
| 512 |
|
|
| 513 |
|
<echo>javac ${build.javac.args} |
| 514 |
|
bootclasspath is ${javac.bootclasspath}</echo> |
| 515 |
|
|
| 516 |
</target> |
</target> |
| 517 |
|
|
| 518 |
|
|
| 519 |
<target name="check-junit"> |
<target name="configure-emulation"> |
| 520 |
<!-- FIXME: this test isn't specific enough --> |
|
| 521 |
|
<condition property="build.emulation.true"> |
| 522 |
|
<or> |
| 523 |
|
<and> |
| 524 |
|
<os family="windows"/> |
| 525 |
|
<not> |
| 526 |
|
<isset property="build.emulation"/> |
| 527 |
|
</not> |
| 528 |
|
</and> |
| 529 |
|
<istrue value="${build.emulation}"/> |
| 530 |
|
</or> |
| 531 |
|
</condition> |
| 532 |
|
|
| 533 |
|
</target> |
| 534 |
|
|
| 535 |
|
|
| 536 |
|
<target name="configure-tests"> |
| 537 |
|
|
| 538 |
|
<!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 --> |
| 539 |
<available property="junit.available" |
<available property="junit.available" |
| 540 |
classname="junit.framework.TestCase"/> |
classname="junit.framework.Protectable"/> |
| 541 |
<fail message="Need JUnit 3.8 to run tests" unless="junit.available"/> |
|
| 542 |
|
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
| 543 |
|
unless="junit.available"/> |
| 544 |
|
|
| 545 |
|
|
| 546 |
|
<!-- |
| 547 |
|
! Bootclasspath munging for testing, so JUnit can test our local |
| 548 |
|
! modifications to java.*. |
| 549 |
|
--> |
| 550 |
|
|
| 551 |
|
<path id="test.classpath"> |
| 552 |
|
<pathelement location="${product.jar}"/> |
| 553 |
|
<pathelement location="${build.testcases.dir}"/> |
| 554 |
|
<pathelement location="${junit.jar}"/> |
| 555 |
|
</path> |
| 556 |
|
|
| 557 |
|
<!-- Flatten test classpath into a platform-appropriate string --> |
| 558 |
|
<property name="test.classpath" refid="test.classpath"/> |
| 559 |
|
|
| 560 |
|
<!-- Turn the flattened test classpath into a javac argument --> |
| 561 |
|
<property name="test.bootclasspath.arg" |
| 562 |
|
value='-Xbootclasspath/p:${test.classpath}'/> |
| 563 |
|
|
| 564 |
|
</target> |
| 565 |
|
|
| 566 |
|
|
| 567 |
|
|
| 568 |
|
<!-- Anthill targets --> |
| 569 |
|
|
| 570 |
|
<target name="anthill-build" |
| 571 |
|
depends="jar, test, docs, dist-docs"/> |
| 572 |
|
|
| 573 |
|
<target name="anthill-publish"> |
| 574 |
|
|
| 575 |
|
<copy todir="${deployDir}/docs/private"> |
| 576 |
|
<fileset dir="${build.javadocs.dir}"/> |
| 577 |
|
</copy> |
| 578 |
|
|
| 579 |
|
<copy todir="${deployDir}/docs/public"> |
| 580 |
|
<fileset dir="${dist.javadocs.dir}"/> |
| 581 |
|
</copy> |
| 582 |
|
|
| 583 |
|
<copy tofile="${deployDir}/index.html" |
| 584 |
|
file="${basedir}/etc/anthill-index.html"/> |
| 585 |
|
|
| 586 |
|
<copy todir="${deployDir}/notes"> |
| 587 |
|
<fileset dir="${basedir}/etc/notes"/> |
| 588 |
|
</copy> |
| 589 |
|
|
| 590 |
</target> |
</target> |
| 591 |
|
|
| 592 |
|
|