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

Diff of /jsr166/build.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by tim, Wed Dec 11 15:59:11 2002 UTC revision 1.17 by tim, Fri Dec 13 07:09:11 2002 UTC
# Line 15  Line 15 
15    <property name="build.sourcelevel"    value="1.5"/>    <property name="build.sourcelevel"    value="1.5"/>
16    <property name="build.debug"          value="true"/>    <property name="build.debug"          value="true"/>
17    <property name="build.debuglevel"     value="source,lines,vars"/>    <property name="build.debuglevel"     value="source,lines,vars"/>
18    <property name="build.deprecation"    value="true"/>    <property name="build.deprecation"    value="false"/>
19      <!--
20    <property name="build.warnings"       value="true"/>    <property name="build.warnings"       value="true"/>
21      -->
22    
23    <!-- Build locations -->    <!-- Build locations -->
24    <property name="build.dir"            location="build"/>    <property name="build.dir"            location="build"/>
# Line 25  Line 27 
27    <property name="build.lib.dir"        location="${build.dir}/lib"/>    <property name="build.lib.dir"        location="${build.dir}/lib"/>
28    <property name="build.ant.dir"        location="${build.dir}/ant"/>    <property name="build.ant.dir"        location="${build.dir}/ant"/>
29    <property name="build.javadocs.dir"   location="${build.dir}/javadocs"/>    <property name="build.javadocs.dir"   location="${build.dir}/javadocs"/>
30      <property name="build.stripped.dir"   location="${build.dir}/stripped"/>
31    <property name="build.reports.dir"    location="${build.dir}/reports"/>    <property name="build.reports.dir"    location="${build.dir}/reports"/>
32      <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>
33    <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>    <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>
34    
35    <!-- Source locations -->    <!-- Source locations -->
# Line 94  Line 98 
98            description="Runs all tests"/>            description="Runs all tests"/>
99    
100    
101    <target name="docs" depends="init, clean-filtered-src, filter-src"    <target name="checkstyle" depends="filter-src"
102              description="Reports on style errors in Java source">
103        <taskdef resource="checkstyletask.properties"
104                classpath="${lib.dir}/checkstyle-all-2.4.jar"/>
105    
106        <checkstyle>
107          <formatter type="plain"/>  <!-- also available: type="xml" -->
108          <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>
109        </checkstyle>
110      </target>
111    
112    
113      <target name="doccheck" depends="filter-src"
114              description="Reports on javadoc style errors">
115        <delete dir="${build.doccheck.dir}"/>
116        <mkdir dir="${build.doccheck.dir}"/>
117        <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
118             docletpath="${lib.dir}/doccheck.jar"
119                destdir="${build.doccheck.dir}">
120          <packageset dir="${build.filter.src.dir}">
121            <include name="java/**"/>
122          </packageset>
123        </javadoc>
124      </target>
125    
126    
127      <target name="docs" depends="filter-src"
128            description="Builds javadocs with custom tags to build folder">            description="Builds javadocs with custom tags to build folder">
129      <delete dir="${build.javadocs.dir}"/>      <delete dir="${build.javadocs.dir}"/>
130      <mkdir dir="${build.javadocs.dir}"/>      <mkdir dir="${build.javadocs.dir}"/>
# Line 115  Line 145 
145    </target>    </target>
146    
147    
148    <target name="dist" depends="init, dist-clean, dist-jar, dist-docs"/>    <target name="strip" depends="init">
149        <mkdir dir="${build.stripped.dir}"/>
150        <javac srcdir="${src.dir}"
151              destdir="${build.stripped.dir}"
152                debug="${build.debug}"
153           debuglevel="${build.debuglevel}"
154          deprecation="${build.deprecation}"
155               source="${build.sourcelevel}"
156                 fork="true">
157    
158          <bootclasspath refid="javac.bootclasspath"/>
159          <compilerarg line="${javac.args} ${build.warnings.option} -s"/>
160    
161          <!-- need this because srcdir is basedir! -->
162          <include name="java/**/*.java"/>
163    
164        </javac>
165      </target>
166    
167    
168      <target name="dist" depends="init, dist-clean, dist-jar, dist-docs"
169              description="Puts all distributable products in single hierarchy"/>
170    
171    
172    <target name="clean"    <target name="clean"
# Line 132  Line 183 
183    </target>    </target>
184    
185    
186      <!-- Anthill targets -->
187    
188      <!-- Should really run the tests instead of just the jar target -->
189      <target name="anthill-build" depends="jar, docs, dist-docs"
190              description="Build the jar and both the external and internal docs"/>
191    
192      <target name="anthill-publish">
193        <copy todir="${deployDir}/docs/private">
194          <fileset dir="${build.javadocs.dir}"/>
195        </copy>
196        <copy todir="${deployDir}/docs/public">
197          <fileset dir="${dist.javadocs.dir}"/>
198        </copy>
199        <copy tofile="${deployDir}/index.html"
200              file="${basedir}/etc/anthill-index.html"/>
201      </target>
202    
203    
204    <!-- Internal targets -->    <!-- Internal targets -->
205    
206    <target name="set-warnings-if" if="build.warnings">    <target name="set-warnings-if" if="build.warnings">
207      <property name="build.warnings.option" value="-warnunchecked"/>      <property name="build.warnings.option" value="-warnunchecked"/>
208    </target>    </target>
209    
210    
211    <target name="set-warnings-unless" unless="build.warnings">    <target name="set-warnings-unless" unless="build.warnings">
212      <property name="build.warnings.option" value=""/>      <property name="build.warnings.option" value=""/>
213    </target>    </target>
214    
215    
216    <target name="init" depends="set-warnings-if, set-warnings-unless">    <target name="init" depends="set-warnings-if, set-warnings-unless">
217      <!-- Version is kept in a separate file -->      <!-- Version is kept in a separate file -->
218      <loadfile property="version" srcFile="version.properties"/>      <loadfile property="version" srcFile="version.properties"/>
# Line 149  Line 220 
220    </target>    </target>
221    
222    
   <target name="clean-filtered-src">  
     <delete dir="${build.filter.src.dir}"/>  
   </target>  
   
   
223    <target name="dist-jar" depends="clean, jar">    <target name="dist-jar" depends="clean, jar">
224      <copy file="${product.jar}" todir="${dist.dir}"/>      <copy file="${product.jar}" todir="${dist.dir}"/>
225    </target>    </target>
226    
227    
228    <target name="dist-docs" depends="clean-filtered-src, filter-src"    <target name="dist-docs" depends="filter-src"
229            description="Builds javadocs without custom tags to dist folder">            description="Builds javadocs without custom tags to dist folder">
230      <delete dir="${dist.javadocs.dir}"/>      <delete dir="${dist.javadocs.dir}"/>
231      <mkdir dir="${dist.javadocs.dir}"/>      <mkdir dir="${dist.javadocs.dir}"/>
# Line 176  Line 242 
242    </target>    </target>
243    
244    
245    <target name="compile-ant-filter">    <target name="compile-ant-filter" depends="init">
246      <mkdir dir="${build.ant.dir}"/>      <mkdir dir="${build.ant.dir}"/>
247      <javac srcdir="${ant.src.dir}"      <javac srcdir="${ant.src.dir}"
248            destdir="${build.ant.dir}"            destdir="${build.ant.dir}"
# Line 189  Line 255 
255      <mkdir dir="${build.filter.src.dir}"/>      <mkdir dir="${build.filter.src.dir}"/>
256      <copy todir="${build.filter.src.dir}">      <copy todir="${build.filter.src.dir}">
257        <fileset dir="${src.dir}">        <fileset dir="${src.dir}">
258          <include name="**/*.java"/>          <include name="java/**/*.java"/>
259        </fileset>        </fileset>
260        <filterchain>        <filterchain>
261          <filterreader classname="jsr166.ant.filters.ReplaceFilter"          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
# Line 251  Line 317 
317               showoutput="true"               showoutput="true"
318            errorProperty="junit.failed"            errorProperty="junit.failed"
319          failureProperty="junit.failed"          failureProperty="junit.failed"
320                      dir="${build.reports.dir}">                      dir="${build.reports.dir}"
321                       fork="true">
322    
323          <jvmarg value="-Xbootclasspath/p:${product.jar}"/>
324    
325        <classpath>        <classpath>
326          <path refid="test.classpath"/>          <!-- <path refid="test.classpath"/> -->
327          <pathelement location="${build.testcases.dir}"/>          <pathelement location="${build.testcases.dir}"/>
328        </classpath>        </classpath>
329    

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.17

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