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

Diff of /jsr166/build.xml

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

revision 1.245 by jsr166, Fri Jun 16 20:50:16 2017 UTC revision 1.280 by jsr166, Sun Oct 7 03:43:04 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 21  Line 22 
22    $HOME/jdk/jdk8    $HOME/jdk/jdk8
23    $HOME/jdk/jdk9    $HOME/jdk/jdk9
24    $HOME/jdk/jdk10    $HOME/jdk/jdk10
25      $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
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 101  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 132  Line 137 
137    <defjdklocations v="8"/>    <defjdklocations v="8"/>
138    <defjdklocations v="9"/>    <defjdklocations v="9"/>
139    <defjdklocations v="10"/>    <defjdklocations v="10"/>
140      <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 142  Line 149 
149    <property name="jtreg8.src.dir"       location="${test.src.dir}/jtreg-jdk8"/>    <property name="jtreg8.src.dir"       location="${test.src.dir}/jtreg-jdk8"/>
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"/>
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 181  Line 190 
190    <property name="junit.jar"        location="${lib.dir}/junit.jar"/>    <property name="junit.jar"        location="${lib.dir}/junit.jar"/>
191    
192    <!-- Canonical location of jdk docs root, to use with javadoc -Xdocrootparent flag -->    <!-- Canonical location of jdk docs root, to use with javadoc -Xdocrootparent flag -->
193    <property name="java5.docroot.url"      value="http://docs.oracle.com/javase/1.5.0/docs"/>    <!-- Switched to https: in 2017-10 - JDK-8190312 -->
194    <property name="java6.docroot.url"      value="http://docs.oracle.com/javase/6/docs"/>    <property name="java5.docroot.url"  value="https://docs.oracle.com/javase/1.5.0/docs"/>
195    <property name="java7.docroot.url"      value="http://docs.oracle.com/javase/7/docs"/>    <property name="java6.docroot.url"  value="https://docs.oracle.com/javase/6/docs"/>
196    <property name="java8.docroot.url"      value="http://docs.oracle.com/javase/8/docs"/>    <property name="java7.docroot.url"  value="https://docs.oracle.com/javase/7/docs"/>
197    <!-- The expected canonical location does not yet exist as of 2016-04 -->    <property name="java8.docroot.url"  value="https://docs.oracle.com/javase/8/docs"/>
198    <!-- <property name="java9.docroot.url" value="http://docs.oracle.com/javase/9/docs"/> -->    <property name="java9.docroot.url"  value="https://docs.oracle.com/javase/9/docs"/>
199    <property name="java9.docroot.url"      value="http://download.java.net/java/jdk9/docs"/>    <property name="java10.docroot.url" value="https://docs.oracle.com/javase/10/docs"/>
200      <property name="java11.docroot.url" value="https://docs.oracle.com/en/java/javase/11/docs"/>
201      <!-- The location of jdk early access docs (RIP) -->
202      <!-- <property name="java9.docroot.url" value="http://download.java.net/java/jdk9/docs"/> -->
203      <!-- <property name="java10.docroot.url" value="http://download.java.net/java/jdk10/docs"/> -->
204      <!-- <property name="java11.docroot.url" value="http://download.java.net/java/jdk11/docs"/> -->
205      <property name="java12.docroot.url" value="https://download.java.net/java/jdk12/docs"/>
206    <!-- Default jdk doc location (latest stable release seems best) -->    <!-- Default jdk doc location (latest stable release seems best) -->
207    <property name="java.docroot.url"       value="${java8.docroot.url}"/>    <!-- But pin to jdk 10 until fix for -->
208      <!-- 8211194: javadoc -link doesn't take module path into consideration -->
209      <property name="java.docroot.url"   value="${java10.docroot.url}"/>
210    
211    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
212    <property name="java5.api.url"      value="${java5.docroot.url}/api/"/>    <property name="java5.api.url"      value="${java5.docroot.url}/api/"/>
# Line 197  Line 214 
214    <property name="java7.api.url"      value="${java7.docroot.url}/api/"/>    <property name="java7.api.url"      value="${java7.docroot.url}/api/"/>
215    <property name="java8.api.url"      value="${java8.docroot.url}/api/"/>    <property name="java8.api.url"      value="${java8.docroot.url}/api/"/>
216    <property name="java9.api.url"      value="${java9.docroot.url}/api/"/>    <property name="java9.api.url"      value="${java9.docroot.url}/api/"/>
217      <property name="java10.api.url"     value="${java10.docroot.url}/api/"/>
218      <property name="java11.api.url"     value="${java11.docroot.url}/api/"/>
219      <property name="java12.api.url"     value="${java12.docroot.url}/api/"/>
220    <property name="java.api.url"       value="${java.docroot.url}/api/"/>    <property name="java.api.url"       value="${java.docroot.url}/api/"/>
221    
222    <!-- Define the "jtreg" task -->    <!-- Define the "jtreg" task -->
# Line 229  Line 249 
249    
250      <local name="modules"/>      <local name="modules"/>
251      <condition property="modules">      <condition property="modules">
252        <available file="${jdk@{compile-target}.home}/jmods" type="dir"/>        <available file="${jdk@{compile-target}.home}/lib/modules" type="file"/>
253      </condition>      </condition>
254    
255      <local name="use-doclint"/>      <local name="use-doclint"/>
# Line 296  Line 316 
316    </macrodef>    </macrodef>
317    
318    <!-- Define jtreg test sets for different jdk versions -->    <!-- Define jtreg test sets for different jdk versions -->
319    <fileset dir="${jtreg9.src.dir}">    <!-- ant -Djtreg.test.pattern="**/ConcurrentHashMap/" -->
320      <patternset id="jdk9.jtreg.tests">    <!-- ant -Djtreg.test.pattern="**/ToArray.java" -->
321        <include name="**/*.java"/>    <property name="jtreg.test.pattern" value="**/*.java"/>
322      </patternset>    <macrodef name="defjtregtests">
323    </fileset>      <attribute name="v"/>
324        <sequential>
325    <fileset dir="${jtreg8.src.dir}">        <fileset dir="${jtreg@{v}.src.dir}">
326      <patternset id="jdk8.jtreg.tests">          <patternset id="jdk@{v}.jtreg.tests">
327        <include name="**/*.java"/>            <include name="${jtreg.test.pattern}"/>
328      </patternset>          </patternset>
329    </fileset>        </fileset>
330        </sequential>
331      </macrodef>
332    
333    <fileset dir="${jtreg7.src.dir}">    <defjtregtests v="12"/>
334      <patternset id="jdk7.jtreg.tests">    <defjtregtests v="11"/>
335        <include name="**/*.java"/>    <defjtregtests v="10"/>
336      </patternset>    <defjtregtests v="9"/>
337    </fileset>    <defjtregtests v="8"/>
338      <defjtregtests v="7"/>
339    
340    <!-- ant -Djtreg.flags=-timeoutFactor:4 -->    <!-- ant -Djtreg.flags=-timeoutFactor:4 -->
341    <property name="jtreg.flags" value=""/>    <property name="jtreg.flags" value=""/>
# Line 322  Line 345 
345      <attribute name="target"/>      <attribute name="target"/>
346      <attribute name="workdir"/>      <attribute name="workdir"/>
347      <attribute name="classes"/>      <attribute name="classes"/>
348        <attribute name="verbose" default="${jtreg.verbose}"/>
349      <attribute name="jtregflags" default=""/>      <attribute name="jtregflags" default=""/>
350        <element name="jtreg-elements" optional="true"/>
351    
352      <sequential>      <sequential>
353    
# Line 331  Line 356 
356    
357      <local name="modules"/>      <local name="modules"/>
358      <condition property="modules">      <condition property="modules">
359        <available file="${jdk@{target}.home}/jmods" type="dir"/>        <available file="${jdk@{target}.home}/lib/modules" type="file"/>
360      </condition>      </condition>
361    
362      <delete dir="@{workdir}/JTwork"   quiet="true"/>      <delete dir="@{workdir}/JTwork"   quiet="true"/>
# Line 340  Line 365 
365             workDir="@{workdir}/JTwork">             workDir="@{workdir}/JTwork">
366        <patternset refid="jdk@{target}.jtreg.tests"/>        <patternset refid="jdk@{target}.jtreg.tests"/>
367        <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>        <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
368        <arg value="-javacoptions:--patch-module java.base=@{classes}" if:set="modules"/>        <arg value="-javacoptions:--patch-module=java.base=@{classes}" if:set="modules"/>
369        <arg value="-vmoptions:--patch-module java.base=@{classes}" if:set="modules"/>        <arg value="-vmoptions:--patch-module=java.base=@{classes}" if:set="modules"/>
370        <arg value="-agentvm"/>        <arg value="-agentvm"/>
371        <arg value="-noreport"/>        <arg value="-noreport"/>
372        <arg value="-verbose:${jtreg.verbose}"/>        <arg value="-verbose:@{verbose}"/>
373        <arg value="-vmoptions:-esa -ea"/>        <arg value="-vmoptions:-esa -ea"/>
374        <arg value="-automatic"/>        <arg value="-automatic"/>
375        <arg value="-k:!ignore"/>        <arg value="-k:!ignore"/>
376        <arg line="@{jtregflags}"/>        <arg line="@{jtregflags}"/>
377        <arg line="${jtreg.flags}"/>        <arg line="${jtreg.flags}"/>
378          <jtreg-elements/>
379      </jtreg>      </jtreg>
380      </sequential>      </sequential>
381    </macrodef>    </macrodef>
# Line 365  Line 391 
391    
392    <!-- Main targets -->    <!-- Main targets -->
393    
394    <property name="build.main.java.version" value="9"/>    <property name="build.main.java.version" value="11"/>
395    <property name="build.main.javac" value="${javac9}"/>    <!-- Workaround "no nested properties in ant" -->
396      <macrodef name="define-build-main-properties">
397        <attribute name="v"/>
398        <sequential>
399          <property name="build.main.java"    value="${java@{v}}"/>
400          <property name="build.main.javac"   value="${javac@{v}}"/>
401          <!-- Force javadoc version to be at least 10, so we can use override-methods=summary -->
402          <!-- Force javadoc version to be at least 12, due to JDK-8202628 -->
403          <condition property="build.main.javadoc"
404                     value="${javadoc12}"
405                     else="${javadoc@{v}}">
406            <matches pattern="^(9|10|11)$" string="@{v}"/>
407          </condition>
408          <property name="build.main.javadoc"   value="${javadoc12}"/>
409        </sequential>
410      </macrodef>
411      <define-build-main-properties v="${build.main.java.version}"/>
412    
413    <target name="dists"    <target name="dists"
414            depends="dist, 4jdk8dist"            depends="dist, 4jdk8dist"
# Line 379  Line 421 
421            depends="configure-compiler"            depends="configure-compiler"
422            description="Compiles src/main sources to build dir">            description="Compiles src/main sources to build dir">
423    
     <local name="modules"/>  
     <condition property="modules">  
       <and>  
         <available file="${jdk9.home}/jmods" type="dir"/>  
         <equals arg1="9" arg2="${build.main.java.version}"/>  
       </and>  
     </condition>  
   
424      <local name="destdir"/>      <local name="destdir"/>
425      <property name="destdir" value="${build.classes.dir}/java.base" if:set="modules"/>      <property name="destdir" value="${build.classes.dir}/java.base"/>
     <property name="destdir" value="${build.classes.dir}" unless:set="modules"/>  
426    
427      <mkdir dir="${destdir}"/>      <mkdir dir="${destdir}"/>
428    
# Line 406  Line 439 
439             fork="true">             fork="true">
440    
441        <include name="**/*.java"/>        <include name="**/*.java"/>
442        <compilerarg value="--patch-module=java.base=${src.dir}" if:set="modules"/>        <compilerarg value="--patch-module=java.base=${src.dir}"/>
443        <compilerarg value="-Xprefer:source"/>        <compilerarg value="-Xprefer:source"/>
444        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
445        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
# Line 451  Line 484 
484  <!-- TODO: <arg line="- -module-source-path ${jdk9.home}/src.zip"/> -->  <!-- TODO: <arg line="- -module-source-path ${jdk9.home}/src.zip"/> -->
485      <javadoc destdir="${docs.dir}"      <javadoc destdir="${docs.dir}"
486               packagenames="none"               packagenames="none"
487               link="${java9.api.url}"               link="${java11.api.url}"
488               overview="${src.dir}/intro.html"               overview="${src.dir}/intro.html"
489               access="${build.javadoc.access}"               access="${build.javadoc.access}"
490               sourcepath="${src.dir}"               sourcepath="${src.dir}"
491               classpath=""               classpath=""
492               source="9"               source="11"
493               executable="${javadoc9}">               executable="${build.main.javadoc}">
494        <fileset dir="${src.dir}" defaultexcludes="yes">        <fileset dir="${src.dir}" defaultexcludes="yes">
495          <include name="**/*.java"/>          <include name="**/*.java"/>
496        </fileset>        </fileset>
497        <arg line="-Xdocrootparent ${java9.docroot.url}"/>        <arg line="-Xdocrootparent ${java10.docroot.url}"/>
498        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
499        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
500        <arg value="-html5"/>        <arg value="-html5"/>
501        <arg value="--patch-module=java.base=${src.dir}"/>        <arg value="--patch-module=java.base=${src.dir}"/>
502        <arg value="-tag"/>        <arg value="--override-methods=summary"/>
503        <arg value="${javadoc.jls.option}"/>        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>
504  <!-- @apiNote currently unused -->        <arg value="-tag"/> <arg value="implSpec:a:Implementation Requirements:"/>
505  <!--       <arg value="-tag"/> -->        <arg value="-tag"/> <arg value="implNote:a:Implementation Note:"/>
506  <!--       <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:"/>  
507  <!-- tags added in jdk9: currently unused -->  <!-- tags added in jdk9: currently unused -->
508  <!--       <arg value="-tag"/> -->  <!--  <arg value="-tag"/> <arg value="revised:X"/> -->
509  <!--       <arg value="revised:X"/> -->  <!--  <arg value="-tag"/> <arg value="spec:X"/> -->
 <!--       <arg value="-tag"/> -->  
 <!--       <arg value="spec:X"/> -->  
510      </javadoc>      </javadoc>
511    </target>    </target>
512    
# Line 591  Line 618 
618    
619  <!--   </target> -->  <!--   </target> -->
620    
621  <!--   <target name="test89" -->    <target name="test9101112"
622  <!--           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">
623    
624  <!--     <antcall target="clean"/> -->      <antcall target="clean"/>
625  <!--     <antcall target="test"> -->      <antcall target="test">
626  <!--       <param name="build.main.java.version" value="8"/> -->        <param name="build.main.java.version" value="9"/>
627  <!--       <param name="build.main.javac" value="${javac8}"/> -->        <param name="build.main.java" value="${java9}"/>
628  <!--     </antcall> -->        <param name="build.main.javac" value="${javac9}"/>
629        </antcall>
630    
631  <!--     <antcall target="clean"/> -->      <antcall target="clean"/>
632  <!--     <antcall target="test"> -->      <antcall target="test">
633  <!--       <param name="build.main.java.version" value="9"/> -->        <param name="build.main.java.version" value="10"/>
634  <!--       <param name="build.main.javac" value="${javac9}"/> -->        <param name="build.main.java" value="${java10}"/>
635  <!--     </antcall> -->        <param name="build.main.javac" value="${javac10}"/>
636        </antcall>
637    
638  <!--   </target> -->      <antcall target="clean"/>
639        <antcall target="test">
640          <param name="build.main.java.version" value="11"/>
641          <param name="build.main.java" value="${java11}"/>
642          <param name="build.main.javac" value="${javac11}"/>
643        </antcall>
644    
645        <antcall target="clean"/>
646        <antcall target="test">
647          <param name="build.main.java.version" value="12"/>
648          <param name="build.main.java" value="${java12}"/>
649          <param name="build.main.javac" value="${javac12}"/>
650        </antcall>
651        <antcall target="docs">
652          <param name="build.main.java.version" value="12"/>
653          <param name="build.main.java" value="${java12}"/>
654          <param name="build.main.javac" value="${javac12}"/>
655          <param name="build.main.javadoc" value="${javadoc12}"/>
656        </antcall>
657    
658        <!-- Clean up to avoid obscure wrong class file version bugs -->
659        <antcall target="clean"/>
660    
661      </target>
662    
663    
664    
# Line 674  Line 726 
726             includeAntRuntime="false"             includeAntRuntime="false"
727             includeJavaRuntime="false"             includeJavaRuntime="false"
728             encoding="ASCII"             encoding="ASCII"
729             executable="${javac9}"             executable="${build.main.javac}"
730             fork="true">             fork="true">
731    
732        <include name="*.java"/>        <include name="*.java"/>
# Line 815  Line 867 
867        </fileset>        </fileset>
868        <arg line="-Xdocrootparent ${java8.docroot.url}"/>        <arg line="-Xdocrootparent ${java8.docroot.url}"/>
869        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
870        <arg value="-tag"/>        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>
871        <arg value="${javadoc.jls.option}"/>        <arg value="-tag"/> <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
872  <!-- @apiNote currently unused -->        <arg value="-tag"/> <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>
873  <!--       <arg value="-tag"/> -->  <!-- @apiNote tag currently unused -->
874  <!--       <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;"/>  
875      </javadoc>      </javadoc>
876    </target>    </target>
877    
# Line 1353  Line 1401 
1401    
1402  <!-- Find buglets that can be detected by static build tools -->  <!-- Find buglets that can be detected by static build tools -->
1403    
1404    <target name="lint">  <!--   <target name="lint"> -->
1405      <antcall target="dists">  <!--     <antcall target="dists"> -->
1406        <param name="build.javadoc.access" value="public"/>  <!--       <param name="build.javadoc.access" value="protected"/> -->
1407      </antcall>  <!--     </antcall> -->
1408    </target>  <!--   </target> -->
1409    
1410  <!-- Generates all doclint warnings, even for private methods (rarely useful) -->  <!-- Generates all doclint warnings, even for private methods (rarely useful) -->
1411    <target name="lint-private">    <target name="doclint-private">
1412      <antcall target="dist">      <antcall target="dist">
1413        <param name="build.javadoc.access" value="private"/>        <param name="build.javadoc.access" value="private"/>
1414      </antcall>      </antcall>
# Line 1368  Line 1416 
1416    
1417    
1418  <!-- ==============================================================  <!-- ==============================================================
1419    Experimental errorprone support - http://errorprone.info    Experimental errorprone support - https://errorprone.info
   You may need to bring your own errorprone jar.  
1420  =================================================================== -->  =================================================================== -->
1421      <property name="errorprone.jar" location="${lib.dir}/error_prone_ant-2.3.1.jar"/>
1422      <property name="errorprone.jsr166.user.flags" value=""/>
1423      <property name="errorprone.jsr166.flags"
1424                value="-Xep:HashtableContains:OFF
1425                       -Xep:JdkObsolete:OFF
1426                       -Xep:MissingOverride:OFF
1427                       -Xep:MissingFail:OFF
1428                       -Xep:MixedArrayDimensions:ERROR
1429                       -Xep:RemoveUnusedImports:ERROR
1430                       -Xep:EmptyIf:ERROR
1431                       -Xep:MultipleTopLevelClasses:ERROR
1432                       -Xep:ClassName:ERROR
1433                       -Xep:LongLiteralLowerCaseSuffix:ERROR
1434                       -Xep:RedundantThrows:ERROR
1435                       -Xep:IdentityBinaryExpression:WARN
1436                       -Xep:MethodCanBeStatic:WARN
1437                       ${errorprone.jsr166.user.flags}"/>
1438      <!-- -Xep:WildcardImport:ERROR -->
1439      <property name="errorprone.jsr166.test.flags"
1440                value="-Xep:StringSplitter:OFF
1441                       -Xep:BoxedPrimitiveConstructor:OFF
1442                       -Xep:ModifyingCollectionWithItself:OFF"/>
1443      <!-- ant -emacs errorprone |& grep -EA1 '(warning|error):|warnings' -->
1444    <target name="errorprone"    <target name="errorprone"
1445            depends="clean, configure-compiler"            depends="clean, configure-compiler"
1446            description="Run errorprone over jsr166 source code (experimental)">            description="Run errorprone over jsr166 source code (experimental)">
# Line 1392  Line 1462 
1462             fork="true">             fork="true">
1463    
1464        <include name="**/*.java"/>        <include name="**/*.java"/>
1465        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/>        <!-- Needed to silence -Xep:FutureReturnValueIgnored -->
1466        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/>        <compilerarg value="-J--illegal-access=permit"/>
1467        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED"/>        <compilerarg value="-XDcompilePolicy=simple"/>
1468        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/>        <compilerarg line="-processorpath ${errorprone.jar}"/>
       <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/>  
       <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED"/>  
       <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/>  
       <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/>  
       <compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/>  
       <compilerarg line="-processorpath ${lib.dir}/error_prone_ant-2.0.20-SNAPSHOT.jar"/>  
1469        <compilerarg value="-Xplugin:ErrorProne        <compilerarg value="-Xplugin:ErrorProne
1470                            -Xep:IdentityBinaryExpression:WARN                            ${errorprone.jsr166.flags}"/>
                           -Xep:MissingOverride:OFF  
                           -Xep:MixedArrayDimensions:WARN  
                           -Xep:RemoveUnusedImports:ERROR  
                           -Xep:ClassName:ERROR  
                           -Xep:MultipleTopLevelClasses:ERROR  
                           -Xep:EmptyIf:ERROR  
                           -Xep:LongLiteralLowerCaseSuffix:ERROR  
                           -Xep:ArgumentParameterSwap:ERROR  
                           -Xep:RedundantThrows:ERROR  
                           -Xep:MethodCanBeStatic:WARN"/>  
1471        <compilerarg value="--patch-module=java.base=${src.dir}"/>        <compilerarg value="--patch-module=java.base=${src.dir}"/>
1472        <compilerarg value="-Xprefer:source"/>        <compilerarg value="-Xprefer:source"/>
1473        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
# Line 1432  Line 1486 
1486        workdir="${build.dir}"        workdir="${build.dir}"
1487        classes="${product.jar}">        classes="${product.jar}">
1488        <javac-elements>        <javac-elements>
1489          <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/>          <!-- Needed to silence -Xep:FutureReturnValueIgnored -->
1490          <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/>          <compilerarg value="-J--illegal-access=permit"/>
1491          <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED"/>          <compilerarg value="-XDcompilePolicy=simple"/>
1492          <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/>          <compilerarg line="-processorpath ${errorprone.jar}"/>
         <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/>  
         <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED"/>  
         <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/>  
         <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/>  
         <compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/>  
         <compilerarg line="-processorpath ${lib.dir}/error_prone_ant-2.0.20-SNAPSHOT.jar"/>  
1493          <compilerarg value="-Xplugin:ErrorProne          <compilerarg value="-Xplugin:ErrorProne
1494                              -Xep:IdentityBinaryExpression:WARN                              ${errorprone.jsr166.flags}
1495                              -Xep:BoxedPrimitiveConstructor:OFF                              ${errorprone.jsr166.test.flags}"/>
                             -Xep:HashtableContains:OFF  
                             -Xep:ModifyingCollectionWithItself:OFF  
                             -Xep:MissingOverride:OFF  
                             -Xep:MixedArrayDimensions:WARN  
                             -Xep:RemoveUnusedImports:ERROR  
                             -Xep:ClassName:ERROR  
                             -Xep:MultipleTopLevelClasses:ERROR  
                             -Xep:EmptyIf:ERROR  
                             -Xep:LongLiteralLowerCaseSuffix:ERROR  
                             -Xep:ArgumentParameterSwap:ERROR  
                             -Xep:RedundantThrows:ERROR  
                             -Xep:MethodCanBeStatic:WARN"/>  
1496          <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>          <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>
1497        </javac-elements>        </javac-elements>
1498      </run-tck-tests>      </run-tck-tests>
1499    </target>    </target>
1500    
1501      <!-- ant -emacs errorprone-jtreg |& grep -EA1 '(warning|error):' -->
1502      <!-- -XDcompilePolicy=simple or byfile avoids confusing UnusedImports -->
1503      <target name="errorprone-jtreg"
1504              depends="jar"
1505              description="Run errorprone over jtreg tests (experimental)">
1506    
1507        <run-jtreg-tests
1508           target="${build.main.java.version}"
1509           workdir="${build.dir}"
1510           classes="${product.jar}"
1511           verbose="all">
1512          <jtreg-elements>
1513            <arg value="-javacoption:-XDcompilePolicy=simple"/>
1514            <arg value="-javacoption:-processorpath"/>
1515            <arg value="-javacoption:${errorprone.jar}"/>
1516            <arg value="-javacoption:-Xplugin:ErrorProne
1517                                ${errorprone.jsr166.flags}
1518                                ${errorprone.jsr166.test.flags}
1519                                -Xep:MultipleTopLevelClasses:WARN
1520                                -Xep:NonAtomicVolatileUpdate:OFF"/>
1521          </jtreg-elements>
1522        </run-jtreg-tests>
1523      </target>
1524    
1525    
1526  <!-- ==============================================================  <!-- ==============================================================
1527    Running guava tests against jsr166 code    Running guava tests against jsr166 code
# Line 1515  Line 1575 
1575      <get src="http://repo2.maven.org/maven2/com/google/guava/guava-testlib/${guava.version}/guava-testlib-${guava.version}-tests.jar"      <get src="http://repo2.maven.org/maven2/com/google/guava/guava-testlib/${guava.version}/guava-testlib-${guava.version}-tests.jar"
1576           dest="${guava.dir}/guava-testlib-tests.jar" usetimestamp="true"/>           dest="${guava.dir}/guava-testlib-tests.jar" usetimestamp="true"/>
1577      <junit printsummary="true" showoutput="true" haltonfailure="true"      <junit printsummary="true" showoutput="true" haltonfailure="true"
1578             jvm="${java9}" fork="true">             jvm="${build.main.java}" fork="true">
1579        <jvmarg line="-ea -esa --patch-module java.base=${product.jar}"/>        <jvmarg line="-ea -esa --patch-module=java.base=${product.jar}"/>
1580        <formatter type="brief"/>        <formatter type="brief"/>
1581        <classpath>        <classpath>
1582          <pathelement location="${guava.dir}/guava-testlib-tests.jar"/>          <pathelement location="${guava.dir}/guava-testlib-tests.jar"/>

Legend:
Removed from v.1.245  
changed lines
  Added in v.1.280

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