Parent Directory
|
Revision Log
Revision 1.58 - (view) (download) (as text)
| 1 : | tim | 1.18 | <project name="jsr166" default="usage"> |
| 2 : | tim | 1.1 | |
| 3 : | <description> | ||
| 4 : | tim | 1.29 | ------------------------------------------------------------------------------ |
| 5 : | Build file for JSR-166 | ||
| 6 : | tim | 1.18 | |
| 7 : | tim | 1.29 | Usage: ant [target] |
| 8 : | |||
| 9 : | User-specific settings are read from user.properties. | ||
| 10 : | tim | 1.32 | See user.properties.sample for an explanation of some useful settings. |
| 11 : | tim | 1.29 | ------------------------------------------------------------------------------ |
| 12 : | tim | 1.18 | </description> |
| 13 : | tim | 1.11 | |
| 14 : | tim | 1.29 | <target name="usage" description="Advises user to run with -projecthelp"> |
| 15 : | <echo>Run "ant -projecthelp" for full usage information.</echo> | ||
| 16 : | </target> | ||
| 17 : | tim | 1.3 | |
| 18 : | tim | 1.11 | |
| 19 : | tim | 1.27 | <!-- User-specific settings --> |
| 20 : | tim | 1.23 | <property file="user.properties"/> |
| 21 : | tim | 1.27 | |
| 22 : | tim | 1.1 | |
| 23 : | <!-- Compilation options --> | ||
| 24 : | tim | 1.11 | <property name="build.sourcelevel" value="1.5"/> |
| 25 : | tim | 1.25 | <property name="build.docsourcelevel" value="1.4"/> |
| 26 : | tim | 1.1 | <property name="build.debug" value="true"/> |
| 27 : | <property name="build.debuglevel" value="source,lines,vars"/> | ||
| 28 : | tim | 1.13 | <property name="build.deprecation" value="false"/> |
| 29 : | tim | 1.1 | |
| 30 : | <!-- Build locations --> | ||
| 31 : | <property name="build.dir" location="build"/> | ||
| 32 : | <property name="build.classes.dir" location="${build.dir}/classes"/> | ||
| 33 : | <property name="build.testcases.dir" location="${build.dir}/testcases"/> | ||
| 34 : | <property name="build.lib.dir" location="${build.dir}/lib"/> | ||
| 35 : | <property name="build.ant.dir" location="${build.dir}/ant"/> | ||
| 36 : | tim | 1.9 | <property name="build.javadocs.dir" location="${build.dir}/javadocs"/> |
| 37 : | tim | 1.52 | <property name="build.sinjdocs.dir" location="${build.dir}/sinjdocs"/> |
| 38 : | tim | 1.16 | <property name="build.stripped.dir" location="${build.dir}/stripped"/> |
| 39 : | tim | 1.1 | <property name="build.reports.dir" location="${build.dir}/reports"/> |
| 40 : | tim | 1.16 | <property name="build.doccheck.dir" location="${build.dir}/doccheck"/> |
| 41 : | tim | 1.1 | <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/> |
| 42 : | tim | 1.58 | <property name="build.dc-filter.dir" location="${build.dir}/filterdocchk"/> |
| 43 : | <property name="build.checkstyle.dir" location="${build.dir}/checkstyle"/> | ||
| 44 : | tim | 1.1 | |
| 45 : | <!-- Source locations --> | ||
| 46 : | tim | 1.22 | <property name="src.dir" location="${basedir}/src/main"/> |
| 47 : | <property name="test.src.dir" location="${basedir}/src/test"/> | ||
| 48 : | tim | 1.1 | <property name="ant.src.dir" location="${basedir}/etc/ant"/> |
| 49 : | <property name="stylesheet.dir" location="${basedir}/etc/xsl"/> | ||
| 50 : | <property name="lib.dir" location="${basedir}/lib"/> | ||
| 51 : | tim | 1.9 | <property name="dist.dir" location="${basedir}/dist"/> |
| 52 : | |||
| 53 : | <!-- Distribution locations --> | ||
| 54 : | <property name="dist.javadocs.dir" location="${dist.dir}/docs"/> | ||
| 55 : | tim | 1.1 | |
| 56 : | <!-- Jar locations --> | ||
| 57 : | <property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> | ||
| 58 : | <property name="junit.jar" location="${lib.dir}/junit.jar"/> | ||
| 59 : | <property name="rt.jar" location="${java.home}/lib/rt.jar"/> | ||
| 60 : | tim | 1.49 | <property name="sinjdoc.jar" location="${lib.dir}/sinjdoc.jar"/> |
| 61 : | tim | 1.27 | |
| 62 : | tim | 1.28 | |
| 63 : | tim | 1.57 | <!-- Files excluded from dist-docs --> |
| 64 : | <patternset id="docs.exclusion"> | ||
| 65 : | tim | 1.28 | <exclude name="java/util/Random.*"/> |
| 66 : | <exclude name="sun/misc/Unsafe.*"/> | ||
| 67 : | </patternset> | ||
| 68 : | |||
| 69 : | |||
| 70 : | |||
| 71 : | tim | 1.11 | <!-- Main targets --> |
| 72 : | |||
| 73 : | tim | 1.28 | <target name="compile" |
| 74 : | tim | 1.33 | depends="init, configure-compiler, prepare-src" |
| 75 : | tim | 1.27 | description="Compiles main sources to build folder"> |
| 76 : | |||
| 77 : | tim | 1.33 | <property name="prepare.src.dir" value="${src.dir}"/> |
| 78 : | |||
| 79 : | tim | 1.1 | <mkdir dir="${build.classes.dir}"/> |
| 80 : | tim | 1.27 | |
| 81 : | tim | 1.33 | <javac srcdir="${prepare.src.dir}" |
| 82 : | tim | 1.1 | destdir="${build.classes.dir}" |
| 83 : | debug="${build.debug}" | ||
| 84 : | debuglevel="${build.debuglevel}" | ||
| 85 : | deprecation="${build.deprecation}" | ||
| 86 : | source="${build.sourcelevel}" | ||
| 87 : | fork="true"> | ||
| 88 : | |||
| 89 : | tim | 1.58 | <compilerarg line="${build.args}"/> |
| 90 : | tim | 1.1 | |
| 91 : | </javac> | ||
| 92 : | tim | 1.27 | |
| 93 : | tim | 1.1 | </target> |
| 94 : | |||
| 95 : | |||
| 96 : | tim | 1.28 | <target name="jar" |
| 97 : | tim | 1.57 | depends="init-jar, native-jar" |
| 98 : | tim | 1.28 | description="Builds library jar from compiled sources"/> |
| 99 : | tim | 1.1 | |
| 100 : | |||
| 101 : | tim | 1.28 | <target name="test" |
| 102 : | tim | 1.32 | depends="init, configure-tests, report-tests" |
| 103 : | tim | 1.29 | description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
| 104 : | tim | 1.1 | |
| 105 : | |||
| 106 : | tim | 1.28 | <target name="checkstyle" |
| 107 : | depends="filter-src" | ||
| 108 : | tim | 1.18 | description="Reports on style errors in Java source (verbose, mostly chaff)"> |
| 109 : | tim | 1.27 | |
| 110 : | tim | 1.15 | <taskdef resource="checkstyletask.properties" |
| 111 : | tim | 1.58 | classpath="${lib.dir}/checkstyle-all-3.1.jar"/> |
| 112 : | tim | 1.15 | |
| 113 : | tim | 1.58 | <mkdir dir="${build.checkstyle.dir}"/> |
| 114 : | |||
| 115 : | <checkstyle config="etc/checkstyle/sun_checks.xml" | ||
| 116 : | failOnViolation="false"> | ||
| 117 : | <formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/> | ||
| 118 : | tim | 1.15 | <fileset dir="${build.filter.src.dir}" includes="**/*.java"/> |
| 119 : | </checkstyle> | ||
| 120 : | tim | 1.58 | |
| 121 : | <style in="${build.checkstyle.dir}/checkstyle-report.xml" | ||
| 122 : | out="${build.checkstyle.dir}/checkstyle-report.html" | ||
| 123 : | style="${stylesheet.dir}/checkstyle-frames.xsl"/> | ||
| 124 : | tim | 1.27 | |
| 125 : | tim | 1.15 | </target> |
| 126 : | |||
| 127 : | tim | 1.16 | |
| 128 : | tim | 1.28 | <target name="doccheck" |
| 129 : | tim | 1.47 | depends="filter-doccheck" |
| 130 : | description="Reports on javadoc style errors"> | ||
| 131 : | tim | 1.27 | |
| 132 : | tim | 1.16 | <delete dir="${build.doccheck.dir}"/> |
| 133 : | <mkdir dir="${build.doccheck.dir}"/> | ||
| 134 : | tim | 1.27 | |
| 135 : | tim | 1.16 | <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
| 136 : | docletpath="${lib.dir}/doccheck.jar" | ||
| 137 : | destdir="${build.doccheck.dir}"> | ||
| 138 : | tim | 1.58 | <packageset dir="${build.dc-filter.dir}"/> |
| 139 : | tim | 1.16 | </javadoc> |
| 140 : | tim | 1.27 | |
| 141 : | tim | 1.48 | <echo>DocCheck output is in ${build.doccheck.dir}</echo> |
| 142 : | |||
| 143 : | tim | 1.16 | </target> |
| 144 : | |||
| 145 : | |||
| 146 : | tim | 1.28 | <target name="docs" |
| 147 : | depends="filter-src" | ||
| 148 : | tim | 1.9 | description="Builds javadocs with custom tags to build folder"> |
| 149 : | tim | 1.27 | |
| 150 : | tim | 1.9 | <delete dir="${build.javadocs.dir}"/> |
| 151 : | <mkdir dir="${build.javadocs.dir}"/> | ||
| 152 : | tim | 1.27 | |
| 153 : | tim | 1.9 | <javadoc destdir="${build.javadocs.dir}" |
| 154 : | tim | 1.8 | link="http://java.sun.com/j2se/1.4.1/docs/api" |
| 155 : | overview="${src.dir}/intro.html" | ||
| 156 : | dholmes | 1.24 | source="${build.docsourcelevel}"> |
| 157 : | tim | 1.8 | |
| 158 : | tim | 1.9 | <tag name="revised" description="Last revised:"/> |
| 159 : | tim | 1.29 | <tag name="spec" description="Specified by:"/> |
| 160 : | |||
| 161 : | tim | 1.22 | <packageset dir="${build.filter.src.dir}"/> |
| 162 : | tim | 1.8 | |
| 163 : | </javadoc> | ||
| 164 : | tim | 1.49 | |
| 165 : | </target> | ||
| 166 : | |||
| 167 : | |||
| 168 : | <target name="sinjdocs" | ||
| 169 : | depends="configure-tests" | ||
| 170 : | description="Builds javadocs with custom tags to build folder"> | ||
| 171 : | |||
| 172 : | tim | 1.52 | <delete dir="${build.sinjdocs.dir}"/> |
| 173 : | <mkdir dir="${build.sinjdocs.dir}"/> | ||
| 174 : | tim | 1.49 | |
| 175 : | <java classname="net.cscott.sinjdoc.Main" fork="true"> | ||
| 176 : | |||
| 177 : | tim | 1.57 | <jvmarg value="-Xbootclasspath/p:${test.bootclasspath}"/> |
| 178 : | tim | 1.49 | |
| 179 : | <classpath> | ||
| 180 : | <pathelement location="${sinjdoc.jar}"/> | ||
| 181 : | tim | 1.51 | <pathelement location="${lib.dir}/jutil.jar"/> |
| 182 : | <pathelement location="${lib.dir}/cup.jar"/> | ||
| 183 : | tim | 1.49 | <path refid="test.classpath"/> |
| 184 : | </classpath> | ||
| 185 : | |||
| 186 : | tim | 1.57 | <!-- <arg value="-help"/> --> |
| 187 : | <!-- <arg value="-verbose"/> --> | ||
| 188 : | <!-- <arg value="-link"/> <arg value="http://java.sun.com/j2se/1.4.1/docs/api"/> --> | ||
| 189 : | |||
| 190 : | tim | 1.52 | <arg value="-d"/> <arg value="${build.sinjdocs.dir}"/> |
| 191 : | tim | 1.49 | <arg value="-sourcepath"/> <arg value="${src.dir}"/> |
| 192 : | <arg value="-overview"/> <arg value="${src.dir}/intro.html"/> | ||
| 193 : | tim | 1.51 | <arg value="-source"/> <arg value="${build.sourcelevel}"/> |
| 194 : | tim | 1.57 | |
| 195 : | tim | 1.51 | <arg value="java.lang"/> |
| 196 : | tim | 1.49 | <arg value="java.util"/> |
| 197 : | tim | 1.51 | <arg value="java.util.concurrent"/> |
| 198 : | <arg value="java.util.concurrent.atomic"/> | ||
| 199 : | <arg value="java.util.concurrent.locks"/> | ||
| 200 : | tim | 1.49 | |
| 201 : | |||
| 202 : | </java> | ||
| 203 : | tim | 1.27 | |
| 204 : | tim | 1.8 | </target> |
| 205 : | |||
| 206 : | |||
| 207 : | tim | 1.28 | <target name="dist" |
| 208 : | depends="init, dist-clean, dist-jar, dist-docs" | ||
| 209 : | tim | 1.16 | description="Puts all distributable products in single hierarchy"/> |
| 210 : | tim | 1.1 | |
| 211 : | tim | 1.58 | |
| 212 : | tim | 1.42 | <target name="release" |
| 213 : | depends="dist" | ||
| 214 : | description="Puts entire CVS tree, plus distribution productions, in a jar"> | ||
| 215 : | |||
| 216 : | <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/> | ||
| 217 : | |||
| 218 : | <jar basedir="${basedir}" destfile="${release.jar}"> | ||
| 219 : | tim | 1.58 | <!-- <exclude name="build/**"/> --> |
| 220 : | tim | 1.42 | <exclude name="${release.jar}"/> |
| 221 : | <exclude name="user.properties"/> | ||
| 222 : | <exclude name="etc/notes/**"/> | ||
| 223 : | tim | 1.58 | <exclude name="src/emulation/**"/> |
| 224 : | tim | 1.44 | <exclude name="**/SyntaxTest.java"/> |
| 225 : | tim | 1.58 | <exclude name="**/SuperfluousAbstract.java"/> |
| 226 : | tim | 1.42 | </jar> |
| 227 : | |||
| 228 : | </target> | ||
| 229 : | tim | 1.1 | |
| 230 : | tim | 1.11 | <target name="clean" |
| 231 : | description="Removes all build products"> | ||
| 232 : | tim | 1.27 | |
| 233 : | tim | 1.11 | <delete dir="${build.dir}"/> |
| 234 : | <delete dir="${build.classes.dir}"/> | ||
| 235 : | <delete dir="${build.lib.dir}"/> | ||
| 236 : | tim | 1.27 | |
| 237 : | tim | 1.1 | </target> |
| 238 : | |||
| 239 : | |||
| 240 : | tim | 1.11 | <target name="dist-clean" |
| 241 : | description="Removes all build and distribution products"> | ||
| 242 : | tim | 1.27 | |
| 243 : | tim | 1.11 | <delete dir="${dist.dir}"/> |
| 244 : | tim | 1.27 | |
| 245 : | tim | 1.9 | </target> |
| 246 : | tim | 1.10 | |
| 247 : | |||
| 248 : | tim | 1.28 | <target name="dist-docs" |
| 249 : | depends="filter-src" | ||
| 250 : | description="Builds javadocs without custom tags to dist folder"> | ||
| 251 : | |||
| 252 : | <delete dir="${dist.javadocs.dir}"/> | ||
| 253 : | <mkdir dir="${dist.javadocs.dir}"/> | ||
| 254 : | |||
| 255 : | <javadoc destdir="${dist.javadocs.dir}" | ||
| 256 : | link="http://java.sun.com/j2se/1.4.1/docs/api" | ||
| 257 : | overview="${src.dir}/intro.html" | ||
| 258 : | source="${build.docsourcelevel}"> | ||
| 259 : | |||
| 260 : | <packageset dir="${build.filter.src.dir}"/> | ||
| 261 : | tim | 1.14 | |
| 262 : | tim | 1.28 | </javadoc> |
| 263 : | tim | 1.14 | |
| 264 : | </target> | ||
| 265 : | |||
| 266 : | |||
| 267 : | tim | 1.28 | |
| 268 : | tim | 1.11 | <!-- Internal targets --> |
| 269 : | tim | 1.9 | |
| 270 : | tim | 1.16 | |
| 271 : | tim | 1.32 | <target name="init"> |
| 272 : | tim | 1.27 | |
| 273 : | tim | 1.11 | <!-- Version is kept in a separate file --> |
| 274 : | <loadfile property="version" srcFile="version.properties"/> | ||
| 275 : | <echo>Building JSR-166 version ${version}</echo> | ||
| 276 : | tim | 1.54 | <echo>java.home is ${java.home}</echo> |
| 277 : | tim | 1.27 | |
| 278 : | </target> | ||
| 279 : | |||
| 280 : | |||
| 281 : | tim | 1.28 | <target name="init-jar"> |
| 282 : | tim | 1.27 | |
| 283 : | <mkdir dir="${build.lib.dir}"/> | ||
| 284 : | |||
| 285 : | tim | 1.28 | </target> |
| 286 : | |||
| 287 : | |||
| 288 : | <target name="native-jar" | ||
| 289 : | tim | 1.57 | depends="compile"> |
| 290 : | tim | 1.28 | |
| 291 : | tim | 1.27 | <jar destfile="${product.jar}"> |
| 292 : | <fileset dir="${build.classes.dir}"/> | ||
| 293 : | </jar> | ||
| 294 : | |||
| 295 : | </target> | ||
| 296 : | |||
| 297 : | |||
| 298 : | tim | 1.28 | <target name="dist-jar" |
| 299 : | depends="clean, jar"> | ||
| 300 : | tim | 1.27 | |
| 301 : | tim | 1.11 | <copy file="${product.jar}" todir="${dist.dir}"/> |
| 302 : | tim | 1.27 | |
| 303 : | tim | 1.11 | </target> |
| 304 : | |||
| 305 : | |||
| 306 : | tim | 1.28 | <target name="compile-ant-filter" |
| 307 : | depends="init"> | ||
| 308 : | tim | 1.27 | |
| 309 : | tim | 1.1 | <mkdir dir="${build.ant.dir}"/> |
| 310 : | tim | 1.27 | |
| 311 : | tim | 1.1 | <javac srcdir="${ant.src.dir}" |
| 312 : | destdir="${build.ant.dir}" | ||
| 313 : | source="1.4" | ||
| 314 : | /> | ||
| 315 : | tim | 1.27 | |
| 316 : | tim | 1.1 | </target> |
| 317 : | |||
| 318 : | |||
| 319 : | tim | 1.28 | <target name="filter-src" |
| 320 : | depends="compile-ant-filter"> | ||
| 321 : | tim | 1.27 | |
| 322 : | tim | 1.1 | <mkdir dir="${build.filter.src.dir}"/> |
| 323 : | tim | 1.27 | |
| 324 : | tim | 1.1 | <copy todir="${build.filter.src.dir}"> |
| 325 : | <fileset dir="${src.dir}"> | ||
| 326 : | tim | 1.31 | <include name="**/*.html"/> |
| 327 : | </fileset> | ||
| 328 : | </copy> | ||
| 329 : | |||
| 330 : | <copy todir="${build.filter.src.dir}"> | ||
| 331 : | <fileset dir="${src.dir}"> | ||
| 332 : | <exclude name="**/*.html"/> | ||
| 333 : | tim | 1.57 | <patternset refid="docs.exclusion"/> |
| 334 : | tim | 1.1 | </fileset> |
| 335 : | <filterchain> | ||
| 336 : | tim | 1.36 | |
| 337 : | <!-- | ||
| 338 : | # This filter gets rid of angle-bracketed type parameters | ||
| 339 : | # so that javadoc can run on the result. The following | ||
| 340 : | # heuristic seems to work: | ||
| 341 : | # | ||
| 342 : | # For all lines not starting with space(s)-asterisk-space(s), | ||
| 343 : | # replace <something> with a space, where there may be more | ||
| 344 : | # than one right angle bracket at the end, and "something" | ||
| 345 : | # must not contain parens or pipes. (This may need some | ||
| 346 : | # tweaking.) | ||
| 347 : | --> | ||
| 348 : | |||
| 349 : | tim | 1.1 | <filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 350 : | classpath="${build.ant.dir}"> | ||
| 351 : | <param name="notmatching" value="^\s+\*\s.*$"/> | ||
| 352 : | tim | 1.36 | <param name="pattern" value="<[^|>()]+?>+"/> |
| 353 : | tim | 1.1 | <param name="replacement" value=" "/> |
| 354 : | </filterreader> | ||
| 355 : | tim | 1.36 | |
| 356 : | tim | 1.47 | </filterchain> |
| 357 : | </copy> | ||
| 358 : | |||
| 359 : | </target> | ||
| 360 : | |||
| 361 : | |||
| 362 : | <target name="filter-doccheck" | ||
| 363 : | depends="filter-src"> | ||
| 364 : | tim | 1.36 | |
| 365 : | tim | 1.58 | <mkdir dir="${build.dc-filter.dir}"/> |
| 366 : | tim | 1.36 | |
| 367 : | tim | 1.58 | <copy todir="${build.dc-filter.dir}"> |
| 368 : | tim | 1.47 | <fileset dir="${build.filter.src.dir}"> |
| 369 : | <include name="**/*.html"/> | ||
| 370 : | </fileset> | ||
| 371 : | </copy> | ||
| 372 : | |||
| 373 : | <property name="generic.declarations" | ||
| 374 : | value="/** Fake type parameter. */ public interface E {} /** Fake type parameter. */ public interface T {} /** Fake type parameter. */ public interface K {} /** Fake type parameter. */ public interface V {}" | ||
| 375 : | /> | ||
| 376 : | |||
| 377 : | tim | 1.58 | <copy todir="${build.dc-filter.dir}"> |
| 378 : | tim | 1.47 | <fileset dir="${build.filter.src.dir}"> |
| 379 : | <exclude name="**/*.html"/> | ||
| 380 : | </fileset> | ||
| 381 : | <filterchain> | ||
| 382 : | tim | 1.36 | <!-- |
| 383 : | tim | 1.47 | # These two filters try to make the source look like |
| 384 : | tim | 1.36 | # something that doccheck can process. The first removes |
| 385 : | # -source 1.4 assertions and the second adds in a bunch | ||
| 386 : | # of single letter public nested marker interfaces so that | ||
| 387 : | # the generic type parameters are recognized. | ||
| 388 : | --> | ||
| 389 : | |||
| 390 : | <filterreader classname="jsr166.ant.filters.ReplaceFilter" | ||
| 391 : | classpath="${build.ant.dir}"> | ||
| 392 : | <param name="matching" value="^\s*assert[\s ].*$"/> | ||
| 393 : | <param name="pattern" value="assert"/> | ||
| 394 : | <param name="replacement" value="//assert"/> | ||
| 395 : | </filterreader> | ||
| 396 : | |||
| 397 : | <filterreader classname="jsr166.ant.filters.ReplaceFilter" | ||
| 398 : | classpath="${build.ant.dir}"> | ||
| 399 : | tim | 1.47 | <param name="matching" value="^([^*]*(class|interface|implements) .*|)\{.*$"/> |
| 400 : | tim | 1.36 | <param name="pattern" value="$"/> |
| 401 : | <param name="replacement" value=" ${generic.declarations}"/> | ||
| 402 : | </filterreader> | ||
| 403 : | |||
| 404 : | tim | 1.1 | </filterchain> |
| 405 : | </copy> | ||
| 406 : | tim | 1.27 | |
| 407 : | tim | 1.1 | </target> |
| 408 : | |||
| 409 : | |||
| 410 : | tim | 1.28 | <target name="compile-tests" |
| 411 : | depends="jar"> | ||
| 412 : | tim | 1.27 | |
| 413 : | tim | 1.1 | <mkdir dir="${build.testcases.dir}"/> |
| 414 : | tim | 1.37 | |
| 415 : | tim | 1.1 | <javac srcdir="${test.src.dir}" |
| 416 : | destdir="${build.testcases.dir}" | ||
| 417 : | debug="${build.debug}" | ||
| 418 : | debuglevel="${build.debuglevel}" | ||
| 419 : | deprecation="${build.deprecation}" | ||
| 420 : | source="${build.sourcelevel}" | ||
| 421 : | fork="true"> | ||
| 422 : | |||
| 423 : | tim | 1.57 | <compilerarg line="${build.args}"/> |
| 424 : | <classpath refid="test.classpath"/> | ||
| 425 : | tim | 1.54 | |
| 426 : | <include name="java/**"/> | ||
| 427 : | <include name="jsr166/**"/> | ||
| 428 : | tim | 1.1 | |
| 429 : | </javac> | ||
| 430 : | tim | 1.27 | |
| 431 : | tim | 1.1 | </target> |
| 432 : | tim | 1.11 | |
| 433 : | tim | 1.1 | |
| 434 : | tim | 1.28 | <target name="run-tests" |
| 435 : | depends="compile-tests"> | ||
| 436 : | tim | 1.27 | |
| 437 : | <!-- May be overridden by user.properties --> | ||
| 438 : | <property name="testcase" value="*"/> | ||
| 439 : | |||
| 440 : | tim | 1.1 | <mkdir dir="${build.reports.dir}"/> |
| 441 : | tim | 1.27 | |
| 442 : | tim | 1.1 | <junit printsummary="true" |
| 443 : | showoutput="true" | ||
| 444 : | errorProperty="junit.failed" | ||
| 445 : | failureProperty="junit.failed" | ||
| 446 : | tim | 1.12 | dir="${build.reports.dir}" |
| 447 : | fork="true"> | ||
| 448 : | |||
| 449 : | tim | 1.57 | <jvmarg value="-Xbootclasspath:${test.bootclasspath}"/> |
| 450 : | tim | 1.1 | |
| 451 : | <formatter type="xml"/> | ||
| 452 : | |||
| 453 : | <batchtest todir="${build.reports.dir}"> | ||
| 454 : | <fileset dir="${test.src.dir}"> | ||
| 455 : | tim | 1.54 | <include name="java/**/${testcase}Test.java"/> |
| 456 : | <include name="jsr166/**/${testcase}Test.java"/> | ||
| 457 : | tim | 1.1 | </fileset> |
| 458 : | </batchtest> | ||
| 459 : | |||
| 460 : | </junit> | ||
| 461 : | tim | 1.27 | |
| 462 : | tim | 1.1 | </target> |
| 463 : | |||
| 464 : | |||
| 465 : | tim | 1.28 | <target name="report-tests" |
| 466 : | depends="run-tests"> | ||
| 467 : | |||
| 468 : | tim | 1.54 | <!-- Sets junit.report.format to frames if redirection is present, |
| 469 : | tim | 1.1 | otherwise sets it to noframes. --> |
| 470 : | <available property="junit.report.format" | ||
| 471 : | value="frames" | ||
| 472 : | classname="org.apache.xalan.lib.Redirect" | ||
| 473 : | /> | ||
| 474 : | <property name="junit.report.format" value="noframes"/> | ||
| 475 : | |||
| 476 : | <junitreport todir="${build.reports.dir}"> | ||
| 477 : | <fileset dir="${build.reports.dir}"> | ||
| 478 : | <include name="TEST-*.xml"/> | ||
| 479 : | </fileset> | ||
| 480 : | <report styledir="${stylesheet.dir}" | ||
| 481 : | format="${junit.report.format}" | ||
| 482 : | todir="${build.reports.dir}" | ||
| 483 : | /> | ||
| 484 : | </junitreport> | ||
| 485 : | |||
| 486 : | <fail message="Test Cases Failed" if="junit.failed"/> | ||
| 487 : | tim | 1.28 | |
| 488 : | tim | 1.18 | </target> |
| 489 : | |||
| 490 : | |||
| 491 : | tim | 1.32 | <target name="configure-compiler"> |
| 492 : | tim | 1.54 | |
| 493 : | <property name="unchecked.option" value="-Xlint:unchecked"/> | ||
| 494 : | |||
| 495 : | <condition property="warnunchecked.arg" value="${unchecked.option}"> | ||
| 496 : | tim | 1.57 | <istrue value="${build.warnunchecked}"/> |
| 497 : | tim | 1.32 | </condition> |
| 498 : | |||
| 499 : | tim | 1.37 | <property name="warnunchecked.arg" value=""/> |
| 500 : | tim | 1.54 | |
| 501 : | tim | 1.34 | <condition property="prepare.src.dir" value="${build.dir}/prepare-src"> |
| 502 : | tim | 1.35 | <istrue value="${build.nothreads}"/> |
| 503 : | tim | 1.34 | </condition> |
| 504 : | |||
| 505 : | tim | 1.32 | |
| 506 : | <!-- Common options in javac invocations --> | ||
| 507 : | tim | 1.57 | <property name="build.args" value="${warnunchecked.arg}"/> |
| 508 : | tim | 1.33 | |
| 509 : | </target> | ||
| 510 : | |||
| 511 : | |||
| 512 : | <target name="prepare-src" | ||
| 513 : | tim | 1.34 | depends="configure-compiler" |
| 514 : | tim | 1.33 | if="prepare.src.dir"> |
| 515 : | |||
| 516 : | <mkdir dir="${prepare.src.dir}"/> | ||
| 517 : | <copy todir="${prepare.src.dir}"> | ||
| 518 : | <fileset dir="${src.dir}"> | ||
| 519 : | <exclude name="java/lang/**"/> | ||
| 520 : | </fileset> | ||
| 521 : | </copy> | ||
| 522 : | tim | 1.32 | |
| 523 : | </target> | ||
| 524 : | |||
| 525 : | |||
| 526 : | tim | 1.37 | <target name="configure-tests" |
| 527 : | depends="configure-compiler"> | ||
| 528 : | tim | 1.28 | |
| 529 : | <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 --> | ||
| 530 : | tim | 1.18 | <available property="junit.available" |
| 531 : | tim | 1.28 | classname="junit.framework.Protectable"/> |
| 532 : | |||
| 533 : | <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" | ||
| 534 : | unless="junit.available"/> | ||
| 535 : | |||
| 536 : | tim | 1.54 | <!-- Xalan --> |
| 537 : | <available property="xalan.available" | ||
| 538 : | classname="org.apache.xalan.Version"/> | ||
| 539 : | |||
| 540 : | <fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests" | ||
| 541 : | unless="xalan.available"/> | ||
| 542 : | |||
| 543 : | tim | 1.30 | |
| 544 : | tim | 1.32 | <!-- |
| 545 : | ! Bootclasspath munging for testing, so JUnit can test our local | ||
| 546 : | ! modifications to java.*. | ||
| 547 : | --> | ||
| 548 : | |||
| 549 : | <path id="test.classpath"> | ||
| 550 : | <pathelement location="${product.jar}"/> | ||
| 551 : | tim | 1.54 | <pathelement location="${rt.jar}"/> |
| 552 : | tim | 1.57 | <pathelement location="${junit.jar}"/> |
| 553 : | tim | 1.32 | <pathelement location="${build.testcases.dir}"/> |
| 554 : | tim | 1.37 | </path> |
| 555 : | |||
| 556 : | tim | 1.57 | <path id="test.bootclasspath"> |
| 557 : | tim | 1.37 | <path refid="test.classpath"/> |
| 558 : | </path> | ||
| 559 : | tim | 1.32 | |
| 560 : | tim | 1.37 | <!-- Flatten test classpaths into platform-appropriate strings --> |
| 561 : | tim | 1.57 | <property name="test.classpath" refid="test.classpath"/> |
| 562 : | <property name="test.bootclasspath" refid="test.bootclasspath"/> | ||
| 563 : | tim | 1.30 | |
| 564 : | tim | 1.28 | </target> |
| 565 : | |||
| 566 : | |||
| 567 : | |||
| 568 : | <!-- Anthill targets --> | ||
| 569 : | |||
| 570 : | tim | 1.54 | <target name="anthill-build"> |
| 571 : | tim | 1.55 | |
| 572 : | <!-- Override this in user.properties --> | ||
| 573 : | <property name="tiger.home" location="e:/j2sdk1.5.0"/> | ||
| 574 : | |||
| 575 : | tim | 1.54 | <exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java"> |
| 576 : | <arg value="-Xmx256000000"/> | ||
| 577 : | <!-- classpath of new JVM --> | ||
| 578 : | <arg value="-classpath"/> <arg path="${java.class.path}"/> | ||
| 579 : | <!-- location of Ant home directory --> | ||
| 580 : | <arg value="-Dant.home=${ant.home}"/> | ||
| 581 : | <!-- the Ant main class --> | ||
| 582 : | <arg value="org.apache.tools.ant.Main"/> | ||
| 583 : | <!-- The build file --> | ||
| 584 : | <arg value="-buildfile"/> <arg value="build.xml"/> | ||
| 585 : | <!-- the target to build on the new Ant instance --> | ||
| 586 : | <arg value="-DJAVA_HOME=${tiger.home}"/> | ||
| 587 : | <arg value="do-anthill-build"/> | ||
| 588 : | </exec> | ||
| 589 : | </target> | ||
| 590 : | |||
| 591 : | <target name="do-anthill-build" | ||
| 592 : | tim | 1.28 | depends="jar, test, docs, dist-docs"/> |
| 593 : | |||
| 594 : | <target name="anthill-publish"> | ||
| 595 : | |||
| 596 : | <copy todir="${deployDir}/docs/private"> | ||
| 597 : | <fileset dir="${build.javadocs.dir}"/> | ||
| 598 : | </copy> | ||
| 599 : | |||
| 600 : | <copy todir="${deployDir}/docs/public"> | ||
| 601 : | <fileset dir="${dist.javadocs.dir}"/> | ||
| 602 : | </copy> | ||
| 603 : | |||
| 604 : | <copy tofile="${deployDir}/index.html" | ||
| 605 : | file="${basedir}/etc/anthill-index.html"/> | ||
| 606 : | |||
| 607 : | <copy todir="${deployDir}/notes"> | ||
| 608 : | <fileset dir="${basedir}/etc/notes"/> | ||
| 609 : | </copy> | ||
| 610 : | |||
| 611 : | tim | 1.43 | </target> |
| 612 : | |||
| 613 : | |||
| 614 : | <target name="ng" depends="test"> | ||
| 615 : | <java classname="SuperfluousAbstract" fork="true"> | ||
| 616 : | |||
| 617 : | tim | 1.57 | <jvmarg value="-Xbootclasspath/p:${test.bootclasspath}"/> |
| 618 : | tim | 1.43 | |
| 619 : | </java> | ||
| 620 : | tim | 1.1 | </target> |
| 621 : | |||
| 622 : | |||
| 623 : | </project> |
| Doug Lea | ViewVC Help |
| Powered by ViewVC 1.0.8 |