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

Diff of /jsr166/build.xml

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

revision 1.264 by jsr166, Wed Jan 24 01:11:10 2018 UTC revision 1.275 by jsr166, Wed Jul 18 01:16:42 2018 UTC
# Line 1  Line 1 
1  <project name="jsr166" default="usage"  <project name="jsr166" default="usage"
2    xmlns:if="ant:if" xmlns:unless="ant:unless"    xmlns:if="ant:if"
3      xmlns:unless="ant:unless"
4    xmlns:ivy="antlib:org.apache.ivy.ant">    xmlns:ivy="antlib:org.apache.ivy.ant">
5    
6    <description>    <description>
# Line 22  Line 23 
23    $HOME/jdk/jdk9    $HOME/jdk/jdk9
24    $HOME/jdk/jdk10    $HOME/jdk/jdk10
25    $HOME/jdk/jdk11    $HOME/jdk/jdk11
26      $HOME/jdk/jdk12
27    where each of the above is a JDK or a symlink to same, and    where each of the above is a JDK or a symlink to same, and
28    $HOME/jdk/src/jdk8    $HOME/jdk/src/jdk8
29    $HOME/jdk/src/jdk9    $HOME/jdk/src/jdk9
30    $HOME/jdk/src/jdk10    $HOME/jdk/src/jdk10
31    $HOME/jdk/src/jdk11    $HOME/jdk/src/jdk11
32      $HOME/jdk/src/jdk12
33    where each of the above is a complete JDK source tree    where each of the above is a complete JDK source tree
34    (e.g. mercurial forest) or a symlink to same.    (e.g. mercurial forest) or a symlink to same.
35    
# Line 103  Line 106 
106      <property name="jdk@{v}.src.dir" location="${jdk@{v}.src.home}/jdk/src/share/classes"      <property name="jdk@{v}.src.dir" location="${jdk@{v}.src.home}/jdk/src/share/classes"
107        unless:set="have.java.base"/>        unless:set="have.java.base"/>
108      <local name="modules"/>      <local name="modules"/>
109      <available property="modules" file="${jdk@{v}.home}/jmods" type="dir"/>      <available property="modules" file="${jdk@{v}.home}/lib/modules" type="file"/>
110      <local name="boot.jar.dir"/>      <local name="boot.jar.dir"/>
111      <property name="boot.jar.dir"   location="${jdk@{v}.home}/jre/lib" unless:set="modules"/>      <property name="boot.jar.dir"   location="${jdk@{v}.home}/jre/lib" unless:set="modules"/>
112      <path id="bootclasspath@{v}" unless:set="modules">      <path id="bootclasspath@{v}" unless:set="modules">
# Line 135  Line 138 
138    <defjdklocations v="9"/>    <defjdklocations v="9"/>
139    <defjdklocations v="10"/>    <defjdklocations v="10"/>
140    <defjdklocations v="11"/>    <defjdklocations v="11"/>
141      <defjdklocations v="12"/>
142    
143    <!-- Source locations -->    <!-- Source locations -->
144    <property name="src.dir"              location="${basedir}/src/main"/>    <property name="src.dir"              location="${basedir}/src/main"/>
# Line 146  Line 150 
150    <property name="jtreg9.src.dir"       location="${test.src.dir}/jtreg"/>    <property name="jtreg9.src.dir"       location="${test.src.dir}/jtreg"/>
151    <property name="jtreg10.src.dir"      location="${test.src.dir}/jtreg"/>    <property name="jtreg10.src.dir"      location="${test.src.dir}/jtreg"/>
152    <property name="jtreg11.src.dir"      location="${test.src.dir}/jtreg"/>    <property name="jtreg11.src.dir"      location="${test.src.dir}/jtreg"/>
153      <property name="jtreg12.src.dir"      location="${test.src.dir}/jtreg"/>
154    <property name="jtreg.src.dir"        location="${jtreg9.src.dir}"/>    <property name="jtreg.src.dir"        location="${jtreg9.src.dir}"/>
155    <property name="lib.dir"              location="${basedir}/lib"/>    <property name="lib.dir"              location="${basedir}/lib"/>
156    <property name="dist.dir"             location="${basedir}/dist"/>    <property name="dist.dir"             location="${basedir}/dist"/>
# Line 191  Line 196 
196    <property name="java7.docroot.url"  value="https://docs.oracle.com/javase/7/docs"/>    <property name="java7.docroot.url"  value="https://docs.oracle.com/javase/7/docs"/>
197    <property name="java8.docroot.url"  value="https://docs.oracle.com/javase/8/docs"/>    <property name="java8.docroot.url"  value="https://docs.oracle.com/javase/8/docs"/>
198    <property name="java9.docroot.url"  value="https://docs.oracle.com/javase/9/docs"/>    <property name="java9.docroot.url"  value="https://docs.oracle.com/javase/9/docs"/>
199    <!-- The location of jdk9 early access docs (RIP) -->    <property name="java10.docroot.url" value="https://docs.oracle.com/javase/10/docs"/>
200      <!-- The location of jdk early access docs (RIP) -->
201    <!-- <property name="java9.docroot.url" value="http://download.java.net/java/jdk9/docs"/> -->    <!-- <property name="java9.docroot.url" value="http://download.java.net/java/jdk9/docs"/> -->
202    <!-- Default jdk doc location (latest stable release seems best) -->    <!-- <property name="java10.docroot.url" value="http://download.java.net/java/jdk10/docs"/> -->
   <property name="java10.docroot.url" value="http://download.java.net/java/jdk10/docs"/>  
203    <property name="java11.docroot.url" value="http://download.java.net/java/jdk11/docs"/>    <property name="java11.docroot.url" value="http://download.java.net/java/jdk11/docs"/>
204    <property name="java.docroot.url"   value="${java9.docroot.url}"/>    <property name="java12.docroot.url" value="http://download.java.net/java/jdk12/docs"/>
205      <!-- Default jdk doc location (latest stable release seems best) -->
206      <property name="java.docroot.url"   value="${java10.docroot.url}"/>
207    
208    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
209    <property name="java5.api.url"      value="${java5.docroot.url}/api/"/>    <property name="java5.api.url"      value="${java5.docroot.url}/api/"/>
# Line 206  Line 213 
213    <property name="java9.api.url"      value="${java9.docroot.url}/api/"/>    <property name="java9.api.url"      value="${java9.docroot.url}/api/"/>
214    <property name="java10.api.url"     value="${java10.docroot.url}/api/"/>    <property name="java10.api.url"     value="${java10.docroot.url}/api/"/>
215    <property name="java11.api.url"     value="${java11.docroot.url}/api/"/>    <property name="java11.api.url"     value="${java11.docroot.url}/api/"/>
216      <property name="java12.api.url"     value="${java12.docroot.url}/api/"/>
217    <property name="java.api.url"       value="${java.docroot.url}/api/"/>    <property name="java.api.url"       value="${java.docroot.url}/api/"/>
218    
219    <!-- Define the "jtreg" task -->    <!-- Define the "jtreg" task -->
# Line 238  Line 246 
246    
247      <local name="modules"/>      <local name="modules"/>
248      <condition property="modules">      <condition property="modules">
249        <available file="${jdk@{compile-target}.home}/jmods" type="dir"/>        <available file="${jdk@{compile-target}.home}/lib/modules" type="file"/>
250      </condition>      </condition>
251    
252      <local name="use-doclint"/>      <local name="use-doclint"/>
# Line 305  Line 313 
313    </macrodef>    </macrodef>
314    
315    <!-- Define jtreg test sets for different jdk versions -->    <!-- Define jtreg test sets for different jdk versions -->
316    <fileset dir="${jtreg11.src.dir}">    <!-- ant -Djtreg.test.pattern="**/ConcurrentHashMap/" -->
317      <patternset id="jdk11.jtreg.tests">    <!-- ant -Djtreg.test.pattern="**/ToArray.java" -->
318        <include name="**/*.java"/>    <property name="jtreg.test.pattern" value="**/*.java"/>
319      </patternset>    <macrodef name="defjtregtests">
320    </fileset>      <attribute name="v"/>
321        <sequential>
322    <fileset dir="${jtreg10.src.dir}">        <fileset dir="${jtreg@{v}.src.dir}">
323      <patternset id="jdk10.jtreg.tests">          <patternset id="jdk@{v}.jtreg.tests">
324        <include name="**/*.java"/>            <include name="${jtreg.test.pattern}"/>
325      </patternset>          </patternset>
326    </fileset>        </fileset>
327        </sequential>
328    <fileset dir="${jtreg9.src.dir}">    </macrodef>
     <patternset id="jdk9.jtreg.tests">  
       <include name="**/*.java"/>  
     </patternset>  
   </fileset>  
   
   <fileset dir="${jtreg8.src.dir}">  
     <patternset id="jdk8.jtreg.tests">  
       <include name="**/*.java"/>  
     </patternset>  
   </fileset>  
329    
330    <fileset dir="${jtreg7.src.dir}">    <defjtregtests v="12"/>
331      <patternset id="jdk7.jtreg.tests">    <defjtregtests v="11"/>
332        <include name="**/*.java"/>    <defjtregtests v="10"/>
333      </patternset>    <defjtregtests v="9"/>
334    </fileset>    <defjtregtests v="8"/>
335      <defjtregtests v="7"/>
336    
337    <!-- ant -Djtreg.flags=-timeoutFactor:4 -->    <!-- ant -Djtreg.flags=-timeoutFactor:4 -->
338    <property name="jtreg.flags" value=""/>    <property name="jtreg.flags" value=""/>
# Line 354  Line 353 
353    
354      <local name="modules"/>      <local name="modules"/>
355      <condition property="modules">      <condition property="modules">
356        <available file="${jdk@{target}.home}/jmods" type="dir"/>        <available file="${jdk@{target}.home}/lib/modules" type="file"/>
357      </condition>      </condition>
358    
359      <delete dir="@{workdir}/JTwork"   quiet="true"/>      <delete dir="@{workdir}/JTwork"   quiet="true"/>
# Line 396  Line 395 
395      <sequential>      <sequential>
396        <property name="build.main.java"    value="${java@{v}}"/>        <property name="build.main.java"    value="${java@{v}}"/>
397        <property name="build.main.javac"   value="${javac@{v}}"/>        <property name="build.main.javac"   value="${javac@{v}}"/>
398        <property name="build.main.javadoc" value="${javadoc@{v}}"/>        <!-- Force javadoc version to be at least 10,
399               so we can use override-methods=summary -->
400          <condition property="build.main.javadoc"
401                     value="${javadoc11}"
402                     else="${javadoc@{v}}">
403            <equals arg1="@{v}" arg2="9"/>
404          </condition>
405      </sequential>      </sequential>
406    </macrodef>    </macrodef>
407    <define-build-main-properties v="${build.main.java.version}"/>    <define-build-main-properties v="${build.main.java.version}"/>
# Line 490  Line 495 
495        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
496        <arg value="-html5"/>        <arg value="-html5"/>
497        <arg value="--patch-module=java.base=${src.dir}"/>        <arg value="--patch-module=java.base=${src.dir}"/>
498        <arg value="-tag"/>        <arg value="--override-methods=summary"/>
499        <arg value="${javadoc.jls.option}"/>        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>
500  <!-- @apiNote currently unused -->        <arg value="-tag"/> <arg value="implSpec:a:Implementation Requirements:"/>
501  <!--       <arg value="-tag"/> -->        <arg value="-tag"/> <arg value="implNote:a:Implementation Note:"/>
502  <!--       <arg value="apiNote:a:API Note:"/> -->        <arg value="-tag"/> <arg value="apiNote:a:API Note:"/>
       <arg value="-tag"/>  
       <arg value="implSpec:a:Implementation Requirements:"/>  
       <arg value="-tag"/>  
       <arg value="implNote:a:Implementation Note:"/>  
503  <!-- tags added in jdk9: currently unused -->  <!-- tags added in jdk9: currently unused -->
504  <!--       <arg value="-tag"/> -->  <!--  <arg value="-tag"/> <arg value="revised:X"/> -->
505  <!--       <arg value="revised:X"/> -->  <!--  <arg value="-tag"/> <arg value="spec:X"/> -->
 <!--       <arg value="-tag"/> -->  
 <!--       <arg value="spec:X"/> -->  
506      </javadoc>      </javadoc>
507    </target>    </target>
508    
# Line 615  Line 614 
614    
615  <!--   </target> -->  <!--   </target> -->
616    
617    <target name="test91011"    <target name="test9101112"
618            description="Runs tck and jtreg tests for src/main for multiple java versions">            description="Runs tck and jtreg tests for src/main for multiple java versions">
619    
620      <antcall target="clean"/>      <antcall target="clean"/>
# Line 633  Line 632 
632        <param name="build.main.java.version" value="11"/>        <param name="build.main.java.version" value="11"/>
633      </antcall>      </antcall>
634    
635        <antcall target="clean"/>
636        <antcall target="test">
637          <param name="build.main.java.version" value="12"/>
638        </antcall>
639    
640      <!-- Clean up to avoid obscure wrong class file version bugs -->      <!-- Clean up to avoid obscure wrong class file version bugs -->
641      <antcall target="clean"/>      <antcall target="clean"/>
642    
# Line 845  Line 849 
849        </fileset>        </fileset>
850        <arg line="-Xdocrootparent ${java8.docroot.url}"/>        <arg line="-Xdocrootparent ${java8.docroot.url}"/>
851        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
852        <arg value="-tag"/>        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>
853        <arg value="${javadoc.jls.option}"/>        <arg value="-tag"/> <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
854  <!-- @apiNote currently unused -->        <arg value="-tag"/> <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>
855  <!--       <arg value="-tag"/> -->  <!-- @apiNote tag currently unused -->
856  <!--       <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/> -->  <!--  <arg value="-tag"/> <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/> -->
       <arg value="-tag"/>  
       <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>  
       <arg value="-tag"/>  
       <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>  
857      </javadoc>      </javadoc>
858    </target>    </target>
859    
# Line 1383  Line 1383 
1383    
1384  <!-- Find buglets that can be detected by static build tools -->  <!-- Find buglets that can be detected by static build tools -->
1385    
1386    <target name="lint">  <!--   <target name="lint"> -->
1387      <antcall target="dists">  <!--     <antcall target="dists"> -->
1388        <param name="build.javadoc.access" value="public"/>  <!--       <param name="build.javadoc.access" value="protected"/> -->
1389      </antcall>  <!--     </antcall> -->
1390    </target>  <!--   </target> -->
1391    
1392  <!-- Generates all doclint warnings, even for private methods (rarely useful) -->  <!-- Generates all doclint warnings, even for private methods (rarely useful) -->
1393    <target name="lint-private">    <target name="doclint-private">
1394      <antcall target="dist">      <antcall target="dist">
1395        <param name="build.javadoc.access" value="private"/>        <param name="build.javadoc.access" value="private"/>
1396      </antcall>      </antcall>
# Line 1400  Line 1400 
1400  <!-- ==============================================================  <!-- ==============================================================
1401    Experimental errorprone support - http://errorprone.info    Experimental errorprone support - http://errorprone.info
1402  =================================================================== -->  =================================================================== -->
1403    <property name="errorprone.jar" location="${lib.dir}/error_prone_ant-2.2.0.jar"/>    <property name="errorprone.jar" location="${lib.dir}/error_prone_ant-2.3.1.jar"/>
1404      <property name="errorprone.jsr166.user.flags" value=""/>
1405    <property name="errorprone.jsr166.flags"    <property name="errorprone.jsr166.flags"
1406              value="-Xep:HashtableContains:OFF              value="-Xep:HashtableContains:OFF
1407                     -Xep:JdkObsolete:OFF                     -Xep:JdkObsolete:OFF
# Line 1414  Line 1415 
1415                     -Xep:LongLiteralLowerCaseSuffix:ERROR                     -Xep:LongLiteralLowerCaseSuffix:ERROR
1416                     -Xep:RedundantThrows:ERROR                     -Xep:RedundantThrows:ERROR
1417                     -Xep:IdentityBinaryExpression:WARN                     -Xep:IdentityBinaryExpression:WARN
1418                     -Xep:MethodCanBeStatic:WARN"/>                     -Xep:MethodCanBeStatic:WARN
1419                       ${errorprone.jsr166.user.flags}"/>
1420    <!-- -Xep:WildcardImport:ERROR -->    <!-- -Xep:WildcardImport:ERROR -->
1421    <property name="errorprone.jsr166.test.flags"    <property name="errorprone.jsr166.test.flags"
1422              value="-Xep:StringSplitter:OFF              value="-Xep:StringSplitter:OFF
# Line 1442  Line 1444 
1444             fork="true">             fork="true">
1445    
1446        <include name="**/*.java"/>        <include name="**/*.java"/>
1447          <!-- Needed to silence -Xep:FutureReturnValueIgnored -->
1448          <compilerarg value="-J--illegal-access=permit"/>
1449        <compilerarg value="-XDcompilePolicy=simple"/>        <compilerarg value="-XDcompilePolicy=simple"/>
1450        <compilerarg line="-processorpath ${errorprone.jar}"/>        <compilerarg line="-processorpath ${errorprone.jar}"/>
1451        <compilerarg value="-Xplugin:ErrorProne        <compilerarg value="-Xplugin:ErrorProne
# Line 1464  Line 1468 
1468        workdir="${build.dir}"        workdir="${build.dir}"
1469        classes="${product.jar}">        classes="${product.jar}">
1470        <javac-elements>        <javac-elements>
1471            <!-- Needed to silence -Xep:FutureReturnValueIgnored -->
1472            <compilerarg value="-J--illegal-access=permit"/>
1473          <compilerarg value="-XDcompilePolicy=simple"/>          <compilerarg value="-XDcompilePolicy=simple"/>
1474          <compilerarg line="-processorpath ${errorprone.jar}"/>          <compilerarg line="-processorpath ${errorprone.jar}"/>
1475          <compilerarg value="-Xplugin:ErrorProne          <compilerarg value="-Xplugin:ErrorProne
# Line 1492  Line 1498 
1498          <arg value="-javacoption:-Xplugin:ErrorProne          <arg value="-javacoption:-Xplugin:ErrorProne
1499                              ${errorprone.jsr166.flags}                              ${errorprone.jsr166.flags}
1500                              ${errorprone.jsr166.test.flags}                              ${errorprone.jsr166.test.flags}
1501                                -Xep:MultipleTopLevelClasses:WARN
1502                              -Xep:NonAtomicVolatileUpdate:OFF"/>                              -Xep:NonAtomicVolatileUpdate:OFF"/>
1503        </jtreg-elements>        </jtreg-elements>
1504      </run-jtreg-tests>      </run-jtreg-tests>

Legend:
Removed from v.1.264  
changed lines
  Added in v.1.275

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