27 |
|
</echo> |
28 |
|
</target> |
29 |
|
|
30 |
+ |
<property file="user.properties"/> |
31 |
+ |
<property name="testcase" value="*"/> |
32 |
|
|
33 |
|
<!-- Compilation options --> |
34 |
|
<property name="build.sourcelevel" value="1.5"/> |
35 |
+ |
<property name="build.docsourcelevel" value="1.4"/> |
36 |
|
<property name="build.debug" value="true"/> |
37 |
|
<property name="build.debuglevel" value="source,lines,vars"/> |
38 |
|
<property name="build.deprecation" value="false"/> |
53 |
|
<property name="build.filter.src.dir" location="${build.dir}/filtersrc"/> |
54 |
|
|
55 |
|
<!-- Source locations --> |
56 |
< |
<property name="src.dir" location="${basedir}"/> |
57 |
< |
<property name="test.src.dir" location="${basedir}/etc/testcases"/> |
56 |
> |
<property name="src.dir" location="${basedir}/src/main"/> |
57 |
> |
<property name="test.src.dir" location="${basedir}/src/test"/> |
58 |
|
<property name="ant.src.dir" location="${basedir}/etc/ant"/> |
59 |
|
<property name="stylesheet.dir" location="${basedir}/etc/xsl"/> |
60 |
|
<property name="lib.dir" location="${basedir}/lib"/> |
70 |
|
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
71 |
|
<property name="rt.jar" location="${java.home}/lib/rt.jar"/> |
72 |
|
|
73 |
< |
<property name="javac.args" value='-J-Xbootclasspath/p:${javac.jar}'/> |
73 |
> |
<property name="javac.args" value='-J-Xbootclasspath/p:$[src.dir]:${javac.jar}'/> |
74 |
|
|
75 |
|
<path id="javac.bootclasspath"> |
76 |
+ |
<pathelement location="${src.dir}"/> |
77 |
|
<pathelement location="${collect.jar}"/> |
78 |
|
<pathelement location="${rt.jar}"/> |
79 |
|
</path> |
99 |
|
<bootclasspath refid="javac.bootclasspath"/> |
100 |
|
<compilerarg line="${javac.args} ${build.warnings.option}"/> |
101 |
|
|
98 |
– |
<!-- need this because srcdir is basedir! --> |
99 |
– |
<include name="java/**/*.java"/> |
100 |
– |
|
102 |
|
</javac> |
103 |
|
</target> |
104 |
|
|
135 |
|
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
136 |
|
docletpath="${lib.dir}/doccheck.jar" |
137 |
|
destdir="${build.doccheck.dir}"> |
138 |
< |
<packageset dir="${build.filter.src.dir}"> |
138 |
< |
<include name="java/**"/> |
139 |
< |
</packageset> |
138 |
> |
<packageset dir="${build.filter.src.dir}"/> |
139 |
|
</javadoc> |
140 |
|
</target> |
141 |
|
|
147 |
|
<javadoc destdir="${build.javadocs.dir}" |
148 |
|
link="http://java.sun.com/j2se/1.4.1/docs/api" |
149 |
|
overview="${src.dir}/intro.html" |
150 |
< |
source="${build.sourcelevel}"> |
150 |
> |
source="${build.docsourcelevel}"> |
151 |
|
|
152 |
|
<tag name="revised" description="Last revised:"/> |
153 |
|
<tag name="spec" description="Specified by:"/> |
154 |
|
<tag name="editor" description="Last edited by:"/> |
155 |
|
<tag name="fixme" description="FIX ME:"/> |
156 |
< |
<packageset dir="${build.filter.src.dir}"> |
158 |
< |
<include name="java/**"/> |
159 |
< |
</packageset> |
156 |
> |
<packageset dir="${build.filter.src.dir}"/> |
157 |
|
|
158 |
|
</javadoc> |
159 |
|
</target> |
160 |
|
|
161 |
|
|
162 |
+ |
<!-- |
163 |
+ |
# javac -s doesn't reliably generate compilable code. It generates |
164 |
+ |
# bridge methods (marked as "synthetic") that can have identical |
165 |
+ |
# signatures to existing methods except for the return value. |
166 |
+ |
--> |
167 |
|
<target name="strip" depends="init"> |
168 |
|
<mkdir dir="${build.stripped.dir}"/> |
169 |
|
<javac srcdir="${src.dir}" |
177 |
|
<bootclasspath refid="javac.bootclasspath"/> |
178 |
|
<compilerarg line="${javac.args} ${build.warnings.option} -s"/> |
179 |
|
|
178 |
– |
<!-- need this because srcdir is basedir! --> |
179 |
– |
<include name="java/**/*.java"/> |
180 |
– |
|
180 |
|
</javac> |
181 |
|
</target> |
182 |
|
|
213 |
|
</copy> |
214 |
|
<copy tofile="${deployDir}/index.html" |
215 |
|
file="${basedir}/etc/anthill-index.html"/> |
217 |
– |
<mkdir dir="${deployDir}/notes}"/> |
216 |
|
<copy todir="${deployDir}/notes"> |
217 |
|
<fileset dir="${basedir}/etc/notes"/> |
218 |
|
</copy> |
250 |
|
<javadoc destdir="${dist.javadocs.dir}" |
251 |
|
link="http://java.sun.com/j2se/1.4.1/docs/api" |
252 |
|
overview="${src.dir}/intro.html" |
253 |
< |
source="${build.sourcelevel}"> |
253 |
> |
source="${build.docsourcelevel}"> |
254 |
|
|
255 |
< |
<packageset dir="${build.filter.src.dir}"> |
258 |
< |
<include name="java/**"/> |
259 |
< |
</packageset> |
255 |
> |
<packageset dir="${build.filter.src.dir}"/> |
256 |
|
|
257 |
|
</javadoc> |
258 |
|
</target> |
271 |
|
<mkdir dir="${build.filter.src.dir}"/> |
272 |
|
<copy todir="${build.filter.src.dir}"> |
273 |
|
<fileset dir="${src.dir}"> |
274 |
< |
<include name="java/**/*.java"/> |
274 |
> |
<include name="**/*.java"/> |
275 |
|
</fileset> |
276 |
|
<filterchain> |
277 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
321 |
|
<bootclasspath refid="javac.bootclasspath"/> |
322 |
|
<compilerarg line="${javac.args} ${build.warnings.option}"/> |
323 |
|
<classpath refid="test.classpath"/> |
328 |
– |
<include name="**/*Test.java"/> |
324 |
|
|
325 |
|
</javac> |
326 |
|
</target> |
335 |
|
dir="${build.reports.dir}" |
336 |
|
fork="true"> |
337 |
|
|
338 |
< |
<jvmarg value="-Xbootclasspath/p:${product.jar}"/> |
339 |
< |
|
340 |
< |
<classpath> |
341 |
< |
<!-- <path refid="test.classpath"/> --> |
342 |
< |
<pathelement location="${build.testcases.dir}"/> |
348 |
< |
</classpath> |
338 |
> |
<!-- |
339 |
> |
! This nastiness is so JUnit can test classes we are inserting |
340 |
> |
! into the java.* packages. |
341 |
> |
--> |
342 |
> |
<jvmarg value="-Xbootclasspath/p:${product.jar};${build.testcases.dir};${junit.jar}"/> |
343 |
|
|
344 |
|
<formatter type="xml"/> |
345 |
|
|
346 |
|
<batchtest todir="${build.reports.dir}"> |
347 |
|
<fileset dir="${test.src.dir}"> |
348 |
< |
<include name="**/*Test.java"/> |
348 |
> |
<include name="**/${testcase}Test.java"/> |
349 |
|
</fileset> |
350 |
|
</batchtest> |
351 |
|
|
380 |
|
<!-- FIXME: this test isn't specific enough --> |
381 |
|
<available property="junit.available" |
382 |
|
classname="junit.framework.TestCase"/> |
383 |
< |
<fail message="Need JUnit 1.8 to run tests" unless="junit.available"/> |
383 |
> |
<fail message="Need JUnit 3.8 to run tests" unless="junit.available"/> |
384 |
|
</target> |
385 |
|
|
386 |
|
|