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

Diff of /jsr166/build.xml

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

revision 1.304 by jsr166, Sun Oct 6 17:34:58 2019 UTC revision 1.322 by jsr166, Sat Dec 12 22:13:53 2020 UTC
# Line 23  Line 23 
23    $HOME/jdk/jdk12    $HOME/jdk/jdk12
24    $HOME/jdk/jdk13    $HOME/jdk/jdk13
25    $HOME/jdk/jdk14    $HOME/jdk/jdk14
26      $HOME/jdk/jdk15
27      $HOME/jdk/jdk16
28      $HOME/jdk/jdk17
29    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
30    $HOME/jdk/src/jdk11    $HOME/jdk/src/jdk11
31    $HOME/jdk/src/jdk12    $HOME/jdk/src/jdk12
32    $HOME/jdk/src/jdk13    $HOME/jdk/src/jdk13
33    $HOME/jdk/src/jdk14    $HOME/jdk/src/jdk14
34      $HOME/jdk/src/jdk15
35      $HOME/jdk/src/jdk16
36      $HOME/jdk/src/jdk17
37    where each of the above is a JDK source tree or a symlink to same.    where each of the above is a JDK source tree or a symlink to same.
38    
39    Alternatively, define ant variables thus:    Alternatively, define ant variables thus:
40    ant -Djdk$N.home=... -Djdk$N.src.home=...    ant -Djdk$N.home=... -Djdk$N.src.home=...
41    for $N in 11 .. 14 ...    for $N in 11 .. 17 ...
42    
43    As of 2016-03, the sources in src/main are for jdk9+ only.    As of 2016-03, the sources in src/main are for jdk9+ only.
44    As of 2019-08, the sources in src/main are for jdk11+ only.    As of 2019-08, the sources in src/main are for jdk11+ only.
# Line 96  Line 102 
102    <defjdklocations v="12"/>    <defjdklocations v="12"/>
103    <defjdklocations v="13"/>    <defjdklocations v="13"/>
104    <defjdklocations v="14"/>    <defjdklocations v="14"/>
105      <defjdklocations v="15"/>
106      <defjdklocations v="16"/>
107      <defjdklocations v="17"/>
108    
109    <!-- Source locations -->    <!-- Source locations -->
110    <property name="src.dir"              location="${basedir}/src/main"/>    <property name="src.dir"              location="${basedir}/src/main"/>
# Line 106  Line 115 
115    <property name="jtreg12.src.dir"      location="${test.src.dir}/jtreg"/>    <property name="jtreg12.src.dir"      location="${test.src.dir}/jtreg"/>
116    <property name="jtreg13.src.dir"      location="${test.src.dir}/jtreg"/>    <property name="jtreg13.src.dir"      location="${test.src.dir}/jtreg"/>
117    <property name="jtreg14.src.dir"      location="${test.src.dir}/jtreg"/>    <property name="jtreg14.src.dir"      location="${test.src.dir}/jtreg"/>
118      <property name="jtreg15.src.dir"      location="${test.src.dir}/jtreg"/>
119      <property name="jtreg16.src.dir"      location="${test.src.dir}/jtreg"/>
120      <property name="jtreg17.src.dir"      location="${test.src.dir}/jtreg"/>
121    <property name="jtreg.src.dir"        location="${jtreg11.src.dir}"/>    <property name="jtreg.src.dir"        location="${jtreg11.src.dir}"/>
122    <property name="lib.dir"              location="${basedir}/lib"/>    <property name="lib.dir"              location="${basedir}/lib"/>
123    <property name="dist.dir"             location="${basedir}/dist"/>    <property name="dist.dir"             location="${basedir}/dist"/>
# Line 132  Line 144 
144    <property name="java11.docroot.url" value="https://docs.oracle.com/en/java/javase/11/docs"/>    <property name="java11.docroot.url" value="https://docs.oracle.com/en/java/javase/11/docs"/>
145    <property name="java12.docroot.url" value="https://docs.oracle.com/en/java/javase/12/docs"/>    <property name="java12.docroot.url" value="https://docs.oracle.com/en/java/javase/12/docs"/>
146    <property name="java13.docroot.url" value="https://docs.oracle.com/en/java/javase/13/docs"/>    <property name="java13.docroot.url" value="https://docs.oracle.com/en/java/javase/13/docs"/>
147    <property name="java14.docroot.url" value="https://download.java.net/java/early_access/jdk14/docs"/>    <property name="java14.docroot.url" value="https://docs.oracle.com/en/java/javase/14/docs"/>
148      <property name="java15.docroot.url" value="https://docs.oracle.com/en/java/javase/15/docs"/>
149      <property name="java16.docroot.url" value="https://download.java.net/java/early_access/jdk16/docs"/>
150      <property name="java17.docroot.url" value="https://download.java.net/java/early_access/jdk17/docs"/>
151    <!-- Default jdk doc location (latest stable LTS release seems best) -->    <!-- Default jdk doc location (latest stable LTS release seems best) -->
152    <property name="java.docroot.url"   value="${java11.docroot.url}"/>    <property name="java.docroot.url"   value="${java11.docroot.url}"/>
153    
# Line 141  Line 156 
156    <property name="java12.api.url"     value="${java12.docroot.url}/api/"/>    <property name="java12.api.url"     value="${java12.docroot.url}/api/"/>
157    <property name="java13.api.url"     value="${java13.docroot.url}/api/"/>    <property name="java13.api.url"     value="${java13.docroot.url}/api/"/>
158    <property name="java14.api.url"     value="${java14.docroot.url}/api/"/>    <property name="java14.api.url"     value="${java14.docroot.url}/api/"/>
159      <property name="java15.api.url"     value="${java15.docroot.url}/api/"/>
160      <property name="java16.api.url"     value="${java16.docroot.url}/api/"/>
161      <property name="java17.api.url"     value="${java17.docroot.url}/api/"/>
162    <property name="java.api.url"       value="${java.docroot.url}/api/"/>    <property name="java.api.url"       value="${java.docroot.url}/api/"/>
163    
164    <!-- Define the "jtreg" task -->    <!-- Define the "jtreg" task -->
# Line 242  Line 260 
260      </sequential>      </sequential>
261    </macrodef>    </macrodef>
262    
263      <defjtregtests v="17"/>
264      <defjtregtests v="16"/>
265      <defjtregtests v="15"/>
266    <defjtregtests v="14"/>    <defjtregtests v="14"/>
267    <defjtregtests v="13"/>    <defjtregtests v="13"/>
268    <defjtregtests v="12"/>    <defjtregtests v="12"/>
# Line 264  Line 285 
285      <!-- ant -Djtreg.verbose=time,fail,error jtreg -->      <!-- ant -Djtreg.verbose=time,fail,error jtreg -->
286      <property name="jtreg.verbose" value="nopass,fail,error"/>      <property name="jtreg.verbose" value="nopass,fail,error"/>
287    
288      <delete dir="@{workdir}/JTwork"   quiet="true"/>      <!-- concurrency > 1 mitigates slowness of some jtreg tests -->
289        <!-- BUT concurrency:auto starts "too many" VMs; just 1 free core each -->
290        <!-- In 2020 concurrency:3 seems like a sweet spot -->
291        <!-- Override using:  ant -Djtreg.concurrency="N" jtreg -->
292        <property name="jtreg.concurrency" value="3"/>
293    
294        <delete dir="@{workdir}/JTwork" quiet="true"/>
295      <jtreg dir="${jtreg@{target}.src.dir}"      <jtreg dir="${jtreg@{target}.src.dir}"
296             jdk="${jdk@{target}.home}"             jdk="${jdk@{target}.home}"
297             workDir="@{workdir}/JTwork">             workDir="@{workdir}/JTwork">
298        <patternset refid="jdk@{target}.jtreg.tests"/>        <patternset refid="jdk@{target}.jtreg.tests"/>
299        <arg value="-javacoptions:--patch-module=java.base=@{classes}"/>        <arg value="-javacoption:--patch-module=java.base=@{classes}"/>
300        <arg value="-vmoptions:--patch-module=java.base=@{classes}"/>        <arg value="-vmoption:--patch-module=java.base=@{classes}"/>
301          <arg value="-vmoption:-Xmx256m"/>
302          <arg value="-concurrency:${jtreg.concurrency}"/>
303          <arg value="-vmoptions:-esa -ea"/>
304          <arg value="-vmoptions:${vmoptions}" if:set="vmoptions"/>
305        <arg value="-agentvm"/>        <arg value="-agentvm"/>
306        <arg value="-noreport"/>        <arg value="-noreport"/>
307        <arg value="-verbose:@{verbose}"/>        <arg value="-verbose:@{verbose}"/>
       <arg value="-vmoptions:-esa -ea"/>  
308        <arg value="-automatic"/>        <arg value="-automatic"/>
309        <arg value="-k:!ignore"/>        <arg value="-k:!ignore"/>
310        <arg line="@{jtregflags}"/>        <arg line="@{jtregflags}"/>
# Line 344  Line 374 
374  <!--   Xlint:-removal for jdk12 Unsafe Object -> Reference renaming -->  <!--   Xlint:-removal for jdk12 Unsafe Object -> Reference renaming -->
375        <compilerarg value="-Xlint:all,-removal"/>        <compilerarg value="-Xlint:all,-removal"/>
376        <compilerarg line="--doclint-format html5"/>        <compilerarg line="--doclint-format html5"/>
377        <compilerarg value="-Xdoclint:all/protected,reference/private"/>  <!--  Temporarily disable doclint for private elements, due to -->
378    <!--  https://bugs.openjdk.java.net/browse/JDK-8214571 -->
379    <!--  which is expected to be fixed in openjdk 11.0.8 -->
380    <!--  <compilerarg value="-Xdoclint:all/protected,reference/private"/> -->
381          <compilerarg value="-Xdoclint:all/protected"/>
382        <compilerarg value="-Xdoclint/package:java.util.*"/>        <compilerarg value="-Xdoclint/package:java.util.*"/>
383        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
384        <compilerarg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>        <compilerarg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
# Line 372  Line 406 
406    <target name="docs"    <target name="docs"
407            description="Builds javadocs for src/main to dist dir">            description="Builds javadocs for src/main to dist dir">
408    
409      <delete dir="${docs.dir}"/>      <delete dir="${docs.dir}" quiet="true"/>
410      <mkdir dir="${docs.dir}"/>      <mkdir dir="${docs.dir}"/>
411    
412        <!-- old school frames via docs/index.html?overview-summary.html -->
413        <!-- dash-dash-frames no longer a supported option in jdk13+ -->
414        <local name="use-frames"/>
415        <condition property="use-frames">
416          <equals arg1="${build.main.javadoc}" arg2="${javadoc12}"/>
417        </condition>
418    
419      <!-- the packagenames="none" hack below prevents scanning the -->      <!-- the packagenames="none" hack below prevents scanning the -->
420      <!-- sourcepath for packages -->      <!-- sourcepath for packages -->
421    
# Line 394  Line 435 
435               executable="${build.main.javadoc}">               executable="${build.main.javadoc}">
436  <!-- TODO: JDK-8214571 failonerror = "true" -->  <!-- TODO: JDK-8214571 failonerror = "true" -->
437        <fileset dir="${src.dir}" defaultexcludes="yes">        <fileset dir="${src.dir}" defaultexcludes="yes">
438          <include name="**/*.java"/>          <include name="java/**/*.java"/>
439        </fileset>        </fileset>
440        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
441        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
442          <arg value="-quiet"/>
443        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
444        <arg value="-html5"/>        <arg value="-html5"/>
445          <arg value="-Xdoclint:all,-missing"/>
446        <arg value="--patch-module=java.base=${src.dir}"/>        <arg value="--patch-module=java.base=${src.dir}"/>
447  <!-- old school frames via docs/index.html?overview-summary.html -->        <arg value="--frames" if:set="use-frames"/>
 <!-- TODO: - -frames no longer a supported option in jdk13+ -->  
       <arg value="--frames"/>  
448        <arg value="--override-methods=summary"/>        <arg value="--override-methods=summary"/>
449        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>
450        <arg value="-tag"/> <arg value="implSpec:a:Implementation Requirements:"/>        <arg value="-tag"/> <arg value="implSpec:a:Implementation Requirements:"/>
# Line 493  Line 534 
534            description="Runs tck and jtreg tests for src/main"/>            description="Runs tck and jtreg tests for src/main"/>
535    
536    <target name="test-version-permutations"    <target name="test-version-permutations"
537            depends="test11, test12, test13, test14, test11-12, test11-13, test11-14, clean, test, docs">            depends="test11, test12, test13, test14, test15, test16,
538    </target>            test11-12, test11-13, test11-14, test11-15, test11-16,
539              clean, test, docs"
540              description="Runs tck and jtreg tests for various build-time and runtime java versions"/>
541    
542    <target name="test11">    <target name="test11">
     <antcall target="clean"/>  
543      <antcall>      <antcall>
544        <param name="java.runtime.target" value="11"/>        <param name="java.runtime.target" value="11"/>
545        <param name="build.main.javac" value="${javac11}"/>        <param name="build.main.javac" value="${javac11}"/>
546        <param name="build.main.javadoc" value="${javadoc12}"/>        <param name="build.main.javadoc" value="${javadoc12}"/>
547        <param name="build.main.javadoc.source" value="11"/>        <param name="build.main.javadoc.source" value="11"/>
548          <target name="clean"/>
549        <target name="test"/>        <target name="test"/>
550        <target name="docs"/>        <target name="docs"/>
551      </antcall>      </antcall>
552    </target>    </target>
553    
554    <target name="test12">    <target name="test12">
     <antcall target="clean"/>  
555      <antcall>      <antcall>
556        <param name="java.runtime.target" value="12"/>        <param name="java.runtime.target" value="12"/>
557        <param name="build.main.javac" value="${javac12}"/>        <param name="build.main.javac" value="${javac12}"/>
558        <param name="build.main.javadoc" value="${javadoc12}"/>        <param name="build.main.javadoc" value="${javadoc12}"/>
559        <param name="build.main.javadoc.source" value="12"/>        <param name="build.main.javadoc.source" value="12"/>
560          <target name="clean"/>
561        <target name="test"/>        <target name="test"/>
562        <target name="docs"/>        <target name="docs"/>
563      </antcall>      </antcall>
564    </target>    </target>
565    
566    <target name="test13">    <target name="test13">
     <antcall target="clean"/>  
567      <antcall>      <antcall>
568        <param name="java.runtime.target" value="13"/>        <param name="java.runtime.target" value="13"/>
569        <param name="build.main.javac" value="${javac13}"/>        <param name="build.main.javac" value="${javac13}"/>
570        <param name="build.main.javadoc" value="${javadoc13}"/>        <param name="build.main.javadoc" value="${javadoc13}"/>
571        <param name="build.main.javadoc.source" value="13"/>        <param name="build.main.javadoc.source" value="13"/>
572          <target name="clean"/>
573        <target name="test"/>        <target name="test"/>
574        <target name="docs"/>        <target name="docs"/>
575      </antcall>      </antcall>
576    </target>    </target>
577    
578    <target name="test14">    <target name="test14">
     <antcall target="clean"/>  
579      <antcall>      <antcall>
580        <param name="java.runtime.target" value="14"/>        <param name="java.runtime.target" value="14"/>
581        <param name="build.main.javac" value="${javac14}"/>        <param name="build.main.javac" value="${javac14}"/>
582        <param name="build.main.javadoc" value="${javadoc14}"/>        <param name="build.main.javadoc" value="${javadoc14}"/>
583        <param name="build.main.javadoc.source" value="14"/>        <param name="build.main.javadoc.source" value="14"/>
584          <target name="clean"/>
585          <target name="test"/>
586          <target name="docs"/>
587        </antcall>
588      </target>
589    
590      <target name="test15">
591        <antcall>
592          <param name="java.runtime.target" value="15"/>
593          <param name="build.main.javac" value="${javac15}"/>
594          <param name="build.main.javadoc" value="${javadoc15}"/>
595          <param name="build.main.javadoc.source" value="15"/>
596          <target name="clean"/>
597          <target name="test"/>
598          <target name="docs"/>
599        </antcall>
600      </target>
601    
602      <target name="test16">
603        <antcall>
604          <param name="java.runtime.target" value="16"/>
605          <param name="build.main.javac" value="${javac16}"/>
606          <param name="build.main.javadoc" value="${javadoc16}"/>
607          <param name="build.main.javadoc.source" value="16"/>
608          <target name="clean"/>
609        <target name="test"/>        <target name="test"/>
610        <target name="docs"/>        <target name="docs"/>
611      </antcall>      </antcall>
612    </target>    </target>
613    
614    <target name="test11-12">    <target name="test11-12">
     <antcall target="clean"/>  
615      <antcall>      <antcall>
616        <param name="java.runtime.target" value="12"/>        <param name="java.runtime.target" value="12"/>
617        <param name="build.main.javac" value="${javac11}"/>        <param name="build.main.javac" value="${javac11}"/>
618        <param name="build.main.javadoc" value="${javadoc12}"/>        <param name="build.main.javadoc" value="${javadoc12}"/>
619        <param name="build.main.javadoc.source" value="11"/>        <param name="build.main.javadoc.source" value="11"/>
620          <target name="clean"/>
621        <target name="test"/>        <target name="test"/>
622        <target name="docs"/>        <target name="docs"/>
623      </antcall>      </antcall>
624    </target>    </target>
625    
626    <target name="test11-13">    <target name="test11-13">
     <antcall target="clean"/>  
627      <antcall>      <antcall>
628        <param name="java.runtime.target" value="13"/>        <param name="java.runtime.target" value="13"/>
629        <param name="build.main.javac" value="${javac11}"/>        <param name="build.main.javac" value="${javac11}"/>
630        <param name="build.main.javadoc" value="${javadoc13}"/>        <param name="build.main.javadoc" value="${javadoc13}"/>
631        <param name="build.main.javadoc.source" value="11"/>        <param name="build.main.javadoc.source" value="11"/>
632          <target name="clean"/>
633        <target name="test"/>        <target name="test"/>
634        <target name="docs"/>        <target name="docs"/>
635      </antcall>      </antcall>
636    </target>    </target>
637    
638    <target name="test11-14">    <target name="test11-14">
     <antcall target="clean"/>  
639      <antcall>      <antcall>
640        <param name="java.runtime.target" value="14"/>        <param name="java.runtime.target" value="14"/>
641        <param name="build.main.javac" value="${javac11}"/>        <param name="build.main.javac" value="${javac11}"/>
642        <param name="build.main.javadoc" value="${javadoc14}"/>        <param name="build.main.javadoc" value="${javadoc14}"/>
643        <param name="build.main.javadoc.source" value="11"/>        <param name="build.main.javadoc.source" value="11"/>
644          <target name="clean"/>
645          <target name="test"/>
646          <target name="docs"/>
647        </antcall>
648      </target>
649    
650      <target name="test11-15">
651        <antcall>
652          <param name="java.runtime.target" value="15"/>
653          <param name="build.main.javac" value="${javac11}"/>
654          <param name="build.main.javadoc" value="${javadoc15}"/>
655          <param name="build.main.javadoc.source" value="11"/>
656          <target name="clean"/>
657          <target name="test"/>
658          <target name="docs"/>
659        </antcall>
660      </target>
661    
662      <target name="test11-16">
663        <antcall>
664          <param name="java.runtime.target" value="16"/>
665          <param name="build.main.javac" value="${javac11}"/>
666          <param name="build.main.javadoc" value="${javadoc16}"/>
667          <param name="build.main.javadoc.source" value="11"/>
668          <target name="clean"/>
669        <target name="test"/>        <target name="test"/>
670        <target name="docs"/>        <target name="docs"/>
671      </antcall>      </antcall>
672    </target>    </target>
673    
674      <target name="docs16">
675        <antcall>
676          <param name="java.runtime.target" value="16"/>
677          <param name="build.main.javac" value="${javac16}"/>
678          <param name="build.main.javadoc" value="${javadoc16}"/>
679          <param name="build.main.javadoc.source" value="16"/>
680          <target name="clean"/>
681          <target name="docs"/>
682        </antcall>
683      </target>
684    
685    
686    <target name="configure-compiler">    <target name="configure-compiler">
687      <fail message="ant version too old">      <fail message="ant version too old">
# Line 657  Line 759 
759    https://github.com/google/error-prone/issues/1143    https://github.com/google/error-prone/issues/1143
760  =================================================================== -->  =================================================================== -->
761    <path id="errorprone.processorpath.path">    <path id="errorprone.processorpath.path">
762      <pathelement location="${lib.dir}/error_prone_core-2.3.2-with-dependencies.jar"/>      <pathelement location="${lib.dir}/error_prone_core-2.3.4-with-dependencies.jar"/>
763      <pathelement location="${lib.dir}/dataflow-2.5.7.jar"/>      <pathelement location="${lib.dir}/dataflow-2.5.7.jar"/>
764      <pathelement location="${lib.dir}/javacutil-2.5.7.jar"/>      <pathelement location="${lib.dir}/javacutil-2.5.7.jar"/>
765      <pathelement location="${lib.dir}/jFormatString-3.0.0.jar"/>      <pathelement location="${lib.dir}/jFormatString-3.0.0.jar"/>
766        <pathelement location="${lib.dir}/caffeine-2.8.0.jar"/>
767    </path>    </path>
768    <property name="errorprone.processorpath" refid="errorprone.processorpath.path" />    <property name="errorprone.processorpath" refid="errorprone.processorpath.path" />
769    <property name="errorprone.jsr166.user.flags" value=""/>    <property name="errorprone.jsr166.user.flags" value=""/>
770    <property name="errorprone.jsr166.flags"    <property name="errorprone.jsr166.flags"
771              value="-Xep:HashtableContains:OFF              value="-Xep:HashtableContains:OFF
772                       -Xep:PreferJavaTimeOverload:OFF
773                     -Xep:JdkObsolete:OFF                     -Xep:JdkObsolete:OFF
774                     -Xep:MissingOverride:OFF                     -Xep:MissingOverride:OFF
775                     -Xep:MissingFail:OFF                     -Xep:MissingFail:OFF
# Line 685  Line 789 
789    <property name="errorprone.jsr166.test.flags"    <property name="errorprone.jsr166.test.flags"
790              value="-Xep:StringSplitter:OFF              value="-Xep:StringSplitter:OFF
791                     -Xep:BoxedPrimitiveConstructor:OFF                     -Xep:BoxedPrimitiveConstructor:OFF
792                       -Xep:UnnecessaryParentheses:OFF
793                     -Xep:ModifyingCollectionWithItself:OFF"/>                     -Xep:ModifyingCollectionWithItself:OFF"/>
794    <!-- ant -emacs errorprone |& grep -EA1 '(warning|error):|warnings' -->    <!-- ant -emacs errorprone |& grep -EA1 '(warning|error):|warnings' -->
795    <target name="errorprone"    <target name="errorprone"

Legend:
Removed from v.1.304  
changed lines
  Added in v.1.322

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