/[cvs]/jsr166/build.xml
ViewVC logotype

Annotation of /jsr166/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (hide annotations)
Wed Dec 11 04:43:23 2002 UTC (16 years, 9 months ago) by tim
Branch: MAIN
Changes since 1.7: +25 -6 lines
File MIME type: text/xml
Split docs into public and private builds. Public builds don't show
the custom tags.

1 tim 1.1 <project name="jsr166" default="jar">
2    
3     <description>
4     Build file for JSR-166
5 tim 1.3
6     Note that junit.jar must be in ${ant.home}/lib for the
7     test target to work. [FIXME: This should be automatically
8     enforced by this build file by failing with a message if
9     junit.jar is not in the right place.]
10 tim 1.1 </description>
11    
12     <!-- Compilation options -->
13     <property name="build.debug" value="true"/>
14     <property name="build.debuglevel" value="source,lines,vars"/>
15     <property name="build.deprecation" value="false"/>
16 tim 1.5 <property name="build.sourcelevel" value="1.5"/>
17 tim 1.1
18     <!-- Build locations -->
19     <property name="build.dir" location="build"/>
20     <property name="build.classes.dir" location="${build.dir}/classes"/>
21     <property name="build.testcases.dir" location="${build.dir}/testcases"/>
22     <property name="build.lib.dir" location="${build.dir}/lib"/>
23     <property name="build.ant.dir" location="${build.dir}/ant"/>
24 tim 1.8 <property name="build.pubdocs.dir" location="${build.dir}/javadocs"/>
25     <property name="build.privdocs.dir" location="${build.dir}/privdocs"/>
26 tim 1.1 <property name="build.reports.dir" location="${build.dir}/reports"/>
27     <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>
28    
29     <!-- Source locations -->
30     <property name="src.dir" location="${basedir}"/>
31     <property name="test.src.dir" location="${basedir}/etc/testcases"/>
32     <property name="ant.src.dir" location="${basedir}/etc/ant"/>
33     <property name="stylesheet.dir" location="${basedir}/etc/xsl"/>
34     <property name="lib.dir" location="${basedir}/lib"/>
35    
36     <!-- Jar locations -->
37     <property name="product.jar" location="${build.lib.dir}/jsr166.jar"/>
38     <property name="javac.jar" location="${lib.dir}/javac.jar"/>
39     <property name="collect.jar" location="${lib.dir}/collect.jar"/>
40     <property name="junit.jar" location="${lib.dir}/junit.jar"/>
41     <property name="rt.jar" location="${java.home}/lib/rt.jar"/>
42    
43     <property name="gj.compiler.args"
44 tim 1.6 value='-J-Xbootclasspath/p:${javac.jar} -deprecation -warnunchecked'
45 tim 1.1 />
46    
47 tim 1.2 <path id="gj.compiler.bootclasspath">
48     <pathelement location="${collect.jar}"/>
49     <pathelement location="${rt.jar}"/>
50     </path>
51    
52     <path id="test.classpath">
53     <pathelement location="${product.jar}"/>
54     </path>
55    
56 tim 1.1
57     <target name="compile">
58     <mkdir dir="${build.classes.dir}"/>
59     <javac srcdir="${src.dir}"
60     destdir="${build.classes.dir}"
61     debug="${build.debug}"
62     debuglevel="${build.debuglevel}"
63     deprecation="${build.deprecation}"
64     source="${build.sourcelevel}"
65     fork="true">
66    
67 tim 1.2 <bootclasspath refid="gj.compiler.bootclasspath"/>
68 tim 1.1 <compilerarg line="${gj.compiler.args}"/>
69    
70     <!-- need this because srcdir is basedir! -->
71     <include name="java/**/*.java"/>
72    
73     </javac>
74     </target>
75    
76    
77     <target name="jar" depends="compile">
78     <mkdir dir="${build.lib.dir}"/>
79     <jar basedir="${build.classes.dir}"
80     destfile="${product.jar}"
81     />
82     </target>
83    
84    
85     <target name="test" depends="report-tests"/>
86    
87 tim 1.8 <target name="docs" depends="public-docs, private-docs"/>
88 tim 1.1
89 tim 1.8 <target name="public-docs" depends="clean-docs, filter-src">
90     <delete dir="${build.pubdocs.dir}"/>
91     <mkdir dir="${build.pubdocs.dir}"/>
92     <javadoc destdir="${build.pubdocs.dir}"
93     link="http://java.sun.com/j2se/1.4.1/docs/api"
94     overview="${src.dir}/intro.html"
95     source="${build.sourcelevel}">
96    
97     <packageset dir="${build.filter.src.dir}">
98     <include name="java/**"/>
99     </packageset>
100    
101     </javadoc>
102     </target>
103    
104    
105     <target name="private-docs" depends="clean-docs, filter-src">
106     <delete dir="${build.privdocs.dir}"/>
107     <mkdir dir="${build.privdocs.dir}"/>
108     <javadoc destdir="${build.privdocs.dir}"
109 tim 1.1 link="http://java.sun.com/j2se/1.4.1/docs/api"
110     overview="${src.dir}/intro.html"
111     source="${build.sourcelevel}">
112    
113     <tag name="revised" description="Last revised:"/>
114     <tag name="spec" description="Specified by:"/>
115 dholmes 1.4 <tag name="editor" description="Last edited by:"/>
116     <tag name="fixme" description="FIX ME:"/>
117 tim 1.1 <packageset dir="${build.filter.src.dir}">
118     <include name="java/**"/>
119     </packageset>
120    
121     </javadoc>
122     </target>
123    
124    
125 tim 1.6 <target name="clean" depends="clean-docs">
126 tim 1.1 <delete dir="${build.dir}"/>
127     <delete dir="${build.classes.dir}"/>
128     <delete dir="${build.lib.dir}"/>
129 tim 1.6 </target>
130    
131    
132     <target name="clean-docs">
133 tim 1.7 <delete dir="${build.filter.src.dir}"/>
134 tim 1.8 <delete dir="${build.pubdocs.dir}"/>
135     <delete dir="${build.privdocs.dir}"/>
136 tim 1.1 </target>
137    
138    
139     <!-- Internal targets used by docs target -->
140    
141     <target name="compile-ant">
142     <mkdir dir="${build.ant.dir}"/>
143     <javac srcdir="${ant.src.dir}"
144     destdir="${build.ant.dir}"
145     source="1.4"
146     />
147     </target>
148    
149    
150     <target name="filter-src" depends="compile-ant">
151     <mkdir dir="${build.filter.src.dir}"/>
152     <copy todir="${build.filter.src.dir}">
153     <fileset dir="${src.dir}">
154     <include name="**/*.java"/>
155     </fileset>
156     <filterchain>
157     <filterreader classname="jsr166.ant.filters.ReplaceFilter"
158     classpath="${build.ant.dir}">
159     <!--
160     # These arguments are to get rid of angle-bracketed type
161     # parameters so that javadoc can run on the result. The
162     # following heuristic that seems to work:
163     #
164     # For all lines not starting with space(s)-asterisk-space(s),
165     # replace <something> with a space, where there may be more
166     # than one right angle bracket at the end, and "something"
167     # must not contain parens or pipes. (This may need some
168     # tweaking.)
169     -->
170     <param name="notmatching" value="^\s+\*\s.*$"/>
171     <param name="pattern" value="&lt;[^|>()]+?>+"/>
172     <param name="replacement" value=" "/>
173     </filterreader>
174     <filterreader classname="jsr166.ant.filters.ReplaceFilter"
175     classpath="${build.ant.dir}">
176     <!--
177     # These arguments are to uncomment lines beginning with
178     # "//@" so that javadoc can see imports that are needed
179     # to resolve links but that shouldn't be in the compiled
180     # code.
181     -->
182     <param name="matching" value="^//@.*$"/>
183     <param name="pattern" value="^//@"/>
184     <param name="replacement" value=""/>
185     </filterreader>
186     </filterchain>
187     </copy>
188     </target>
189    
190    
191     <!-- Internal targets used by test target -->
192    
193     <target name="compile-tests" depends="jar">
194     <mkdir dir="${build.testcases.dir}"/>
195     <javac srcdir="${test.src.dir}"
196     destdir="${build.testcases.dir}"
197     debug="${build.debug}"
198     debuglevel="${build.debuglevel}"
199     deprecation="${build.deprecation}"
200     source="${build.sourcelevel}"
201     fork="true">
202    
203 tim 1.2 <bootclasspath refid="gj.compiler.bootclasspath"/>
204 tim 1.1 <compilerarg line="${gj.compiler.args}"/>
205 tim 1.2 <classpath refid="test.classpath"/>
206 tim 1.1 <include name="**/*Test.java"/>
207    
208     </javac>
209     </target>
210    
211     <target name="run-tests" depends="compile-tests">
212     <mkdir dir="${build.reports.dir}"/>
213     <junit printsummary="true"
214     showoutput="true"
215     errorProperty="junit.failed"
216     failureProperty="junit.failed"
217     dir="${build.reports.dir}">
218    
219     <classpath>
220     <path refid="test.classpath"/>
221     <pathelement location="${build.testcases.dir}"/>
222     </classpath>
223    
224     <formatter type="xml"/>
225    
226     <batchtest todir="${build.reports.dir}">
227     <fileset dir="${test.src.dir}">
228     <include name="**/*Test.java"/>
229     </fileset>
230     </batchtest>
231    
232     </junit>
233     </target>
234    
235    
236     <target name="report-tests" depends="run-tests">
237     <!-- Sets junit.report.format to frames if Xalan is present,
238     otherwise sets it to noframes. -->
239     <available property="junit.report.format"
240     value="frames"
241     classname="org.apache.xalan.lib.Redirect"
242     />
243     <property name="junit.report.format" value="noframes"/>
244    
245     <junitreport todir="${build.reports.dir}">
246     <fileset dir="${build.reports.dir}">
247     <include name="TEST-*.xml"/>
248     </fileset>
249     <report styledir="${stylesheet.dir}"
250     format="${junit.report.format}"
251     todir="${build.reports.dir}"
252     />
253     </junitreport>
254    
255     <fail message="Test Cases Failed" if="junit.failed"/>
256     </target>
257    
258    
259     </project>

dl@cs.oswego.edu
ViewVC Help
Powered by ViewVC 1.1.27