ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/build.xml
(Generate patch)

Comparing jsr166/build.xml (file contents):
Revision 1.201 by dl, Sat Mar 26 12:35:25 2016 UTC vs.
Revision 1.220 by jsr166, Sun Sep 25 01:28:54 2016 UTC

# Line 7 | Line 7
7  
8    Usage: ant [target]
9  
10 +  See http://gee.cs.oswego.edu/dl/concurrency-interest/index.html for
11 +  more details.
12 +
13    User-specific settings are read from user.properties.
14    See user.properties.sample for an explanation of some useful settings.
15  
# Line 30 | Line 33
33    ant -Djdk$N.home=... -Djdk$N.src.home=...
34    for $N in 6 7 8 9 ...
35  
36 <  As of 2015-09, there is incomplete hacky support for jigsaw
37 <  Build for jigsaw using something like:
35 <  ant -Djdk9.home="$HOME/jdk/jigsaw" -Djdk9.src.home="$HOME/jdk/src/jigsaw" clean test dist
36 <  "docs" target is still broken.
36 >  As of 2016-03, the sources in src/main are for jdk9+ only.  The "docs"
37 >  target is currently broken.
38   ------------------------------------------------------------------------------
39    </description>
40  
41 <  <!-- Display main targets by running 'ant -projecthelp' -->
41 >  <!-- Run 'ant -projecthelp' (default target) -->
42    <target name="usage">
43      <java classname="org.apache.tools.ant.Main">
44        <arg value="-projecthelp" />
# Line 185 | Line 186
186    <property name="java6.docroot.url"      value="http://docs.oracle.com/javase/6/docs"/>
187    <property name="java7.docroot.url"      value="http://docs.oracle.com/javase/7/docs"/>
188    <property name="java8.docroot.url"      value="http://docs.oracle.com/javase/8/docs"/>
189 <  <!-- The expected canonical location does not yet exist as of 2016-03 -->
189 >  <!-- The expected canonical location does not yet exist as of 2016-04 -->
190    <!-- <property name="java9.docroot.url" value="http://docs.oracle.com/javase/9/docs"/> -->
191 <  <property name="java9.docroot.url"      value="http://download.java.net/jdk9/docs"/>
191 >  <property name="java9.docroot.url"      value="http://download.java.net/java/jdk9/docs"/>
192    <!-- Default jdk doc location (latest stable release seems best) -->
193    <property name="java.docroot.url"       value="${java8.docroot.url}"/>
194  
# Line 244 | Line 245
245             classpath="${junit.jar}"
246             includeAntRuntime="false"
247             includeJavaRuntime="false"
248 +           encoding="ASCII"
249             executable="${javac@{compile-target}}"
250             fork="true">
251  
# Line 251 | Line 253
253        <compilerarg value="-XDignore.symbol.file=true"/>
254        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>
255        <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
256 <      <compilerarg value="-Xpatch:${build.classes.dir}" if:set="modules"/>
256 >      <compilerarg line="--patch-module java.base=${build.classes.dir}/java.base" if:set="modules"/>
257        <compilerarg line="${build.args}"/>
258        <javac-elements/>
259  
# Line 262 | Line 264
264            jvm="${java@{target}}"
265            fork="true">
266          <jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
267 <        <jvmarg value="-Xpatch:${build.classes.dir}" if:set="modules"/>
267 >        <jvmarg line="--patch-module java.base=${build.classes.dir}/java.base" if:set="modules"/>
268          <jvmarg line="@{jvmflags}"/>
269 +        <!-- ant -Dvmoptions="-Xmx8m" -Djsr166.tckTestClass=CompletableFutureTest tck -->
270 +        <jvmarg line="${vmoptions}" if:set="vmoptions"/>
271  
272 <        <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->
272 >        <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->
273          <syspropertyset id="system-properties-used-by-tck">
274            <propertyref prefix="java.util.concurrent.ForkJoinPool"/>
275            <propertyref prefix="jsr166."/>
# Line 326 | Line 330
330  
331      <delete dir="@{workdir}/JTwork"   quiet="true"/>
332      <delete dir="@{workdir}/JTreport" quiet="true"/>
329    <mkdir dir="@{workdir}/JTwork/scratch"/>
330    <!-- workaround for https://bugs.openjdk.java.net/browse/CODETOOLS-7901571 -->
331    <mkdir dir="@{workdir}/JTreport/html"/>
332    <mkdir dir="@{workdir}/JTreport/text"/>
333      <jtreg dir="${jtreg@{target}.src.dir}"
334             jdk="${jdk@{target}.home}"
335             workDir="@{workdir}/JTwork"
336             reportDir="@{workdir}/JTreport">
337        <patternset refid="jdk@{target}.jtreg.tests"/>
338        <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
339 <      <arg value="-Xpatch:${build.classes.dir}" if:set="modules"/>
339 >      <arg value="-vmoptions:--patch-module java.base=${build.classes.dir}/java.base" if:set="modules"/>
340        <arg value="-agentvm"/>
341        <arg value="-verbose:${jtreg.verbose}"/>
342        <arg value="-vmoptions:-esa -ea"/>
# Line 392 | Line 392
392             classpath=""
393             includeAntRuntime="false"
394             includeJavaRuntime="false"
395 +           encoding="ASCII"
396             executable="${build.main.javac}"
397             fork="true">
398  
# Line 406 | Line 407
407        <compilerarg line="${build.args}"/>
408  
409      </javac>
409
410    <!-- We need jdk9's Contended annotation, but at compile time only -->
411    <!--
412        <delete file="${destdir}/jdk/internal/vm/annotation/Contended.class"/>
413    -->
410    </target>
411  
412  
413    <target name="jar"
414            depends="compile"
415 <          description="Builds library jar from compiled sources">
416 <
415 >          description="Builds library jar for src/main from compiled sources">
416 >    <local name="subdir"/>
417 >    <available property="subdir" file="${build.classes.dir}/java.base" type="dir" value="/java.base"/>
418      <jar destfile="${product.jar}">
419 <      <fileset dir="${build.classes.dir}"/>
419 >      <fileset dir="${build.classes.dir}${subdir}"/>
420        <manifest>
421          <attribute name="Built-By" value="${user.name}"/>
422          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
# Line 437 | Line 434
434      <!-- the packagenames="none" hack below prevents scanning the -->
435      <!-- sourcepath for packages -->
436  
437 + <!--  TODO: sourcepath="${src.dir}:${jdk9.src.dir}" -->
438 + <!--  TODO: sourcepath="${src.dir}:${jdk9.src.dir}:${jdk9.src.home}/jdk/src/java.logging/share/classes" -->
439      <javadoc destdir="${docs.dir}"
440               packagenames="none"
441               link="${java9.api.url}"
442               overview="${src.dir}/intro.html"
443               access="${build.javadoc.access}"
444 <             sourcepath="${src.dir}:${jdk9.src.dir}"
444 >             sourcepath="${src.dir}"
445               classpath=""
446               executable="${javadoc9}">
447        <fileset dir="${src.dir}" defaultexcludes="yes">
# Line 451 | Line 450
450        <arg line="-Xdocrootparent ${java9.docroot.url}"/>
451        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
452        <arg value="-XDignore.symbol.file=true"/>
453 < <!--  TODO     <arg value="-Xmodule:java.base"/> -->
453 >      <arg value="-Xmodule:java.base"/>
454        <arg value="-tag"/>
455        <arg value="${javadoc.jls.option}"/>
456 <      <arg value="-tag"/>
457 <      <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>
456 > <!-- @apiNote currently unused -->
457 > <!--       <arg value="-tag"/> -->
458 > <!--       <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/> -->
459        <arg value="-tag"/>
460        <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
461        <arg value="-tag"/>
462        <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>
463 < <!-- tags added in jdk9 -->
464 <      <arg value="-tag"/>
465 <      <arg value="revised:X"/>
466 <      <arg value="-tag"/>
467 <      <arg value="spec:X"/>
463 > <!-- tags added in jdk9: currently unused -->
464 > <!--       <arg value="-tag"/> -->
465 > <!--       <arg value="revised:X"/> -->
466 > <!--       <arg value="-tag"/> -->
467 > <!--       <arg value="spec:X"/> -->
468      </javadoc>
469    </target>
470  
# Line 525 | Line 525
525  
526    <target name="tck"
527            depends="jar"
528 <          description="Runs tck tests for main directly">
528 >          description="Runs tck tests for src/main directly">
529  
530      <run-tck-tests
531        target="${build.main.java.version}"
# Line 534 | Line 534
534    </target>
535  
536    <target name="tck-parallelism-1"
537 <          description="Runs tck with given common pool parallelism">
537 >          description="Runs tck with common pool parallelism 1">
538      <antcall target="tck">
539        <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="1"/>
540      </antcall>
541    </target>
542  
543    <target name="tck-parallelism-0"
544 <          description="Runs tck with given common pool parallelism">
544 >          description="Runs tck with common pool parallelism 0">
545      <antcall target="tck">
546        <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="0"/>
547      </antcall>
548    </target>
549  
550 +  <target name="tck-security-manager"
551 +          description="Runs tck with a security manager">
552 +    <antcall target="tck">
553 +      <param name="jsr166.useSecurityManager" value="true"/>
554 +    </antcall>
555 +  </target>
556 +
557    <target name="jtreg"
558            depends="jar"
559 <          description="Runs jtreg tests for main using the jtreg ant task">
559 >          description="Runs jtreg tests for src/main using the jtreg ant task">
560      <run-jtreg-tests
561         target="${build.main.java.version}"
562         workdir="${build.dir}"
# Line 557 | Line 564
564    </target>
565  
566    <target name="test"
567 <          depends="tck, tck-parallelism-1, jtreg"
568 <          description="Runs tck and jtreg tests for main">
567 >          depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"
568 >          description="Runs tck and jtreg tests for src/main">
569    </target>
570  
571 <  <target name="jtreg8" description="Runs jtreg tests with jdk8">
571 > <!--   <target name="jtreg8" description="Runs jtreg tests with jdk8"> -->
572  
573 <    <antcall target="jtreg">
574 <      <param name="build.main.java.version" value="8"/>
575 <      <param name="build.main.javac" value="${javac8}"/>
576 <    </antcall>
573 > <!--     <antcall target="jtreg"> -->
574 > <!--       <param name="build.main.java.version" value="8"/> -->
575 > <!--       <param name="build.main.javac" value="${javac8}"/> -->
576 > <!--     </antcall> -->
577  
578 <  </target>
578 > <!--   </target> -->
579  
580 <  <target name="test89"
581 <          description="Runs tck and jtreg tests for main for multiple java versions">
580 > <!--   <target name="test89" -->
581 > <!--           description="Runs tck and jtreg tests for src/main for multiple java versions"> -->
582  
583 <    <antcall target="clean"/>
584 <    <antcall target="test">
585 <      <param name="build.main.java.version" value="8"/>
586 <      <param name="build.main.javac" value="${javac8}"/>
587 <    </antcall>
583 > <!--     <antcall target="clean"/> -->
584 > <!--     <antcall target="test"> -->
585 > <!--       <param name="build.main.java.version" value="8"/> -->
586 > <!--       <param name="build.main.javac" value="${javac8}"/> -->
587 > <!--     </antcall> -->
588  
589 <    <antcall target="clean"/>
590 <    <antcall target="test">
591 <      <param name="build.main.java.version" value="9"/>
592 <      <param name="build.main.javac" value="${javac9}"/>
593 <    </antcall>
589 > <!--     <antcall target="clean"/> -->
590 > <!--     <antcall target="test"> -->
591 > <!--       <param name="build.main.java.version" value="9"/> -->
592 > <!--       <param name="build.main.javac" value="${javac9}"/> -->
593 > <!--     </antcall> -->
594  
595 <  </target>
595 > <!--   </target> -->
596  
597  
598  
# Line 615 | Line 622
622    <!-- Various demos and test programs -->
623  
624  
625 <  <target name="loops" depends="configure-compiler"
626 <          description="Benchmark from Doug Lea's AQS paper">
625 >  <!-- description="Benchmark from Doug Lea's AQS paper" -->
626 >  <target name="loops" depends="configure-compiler">
627  
628      <mkdir dir="${build.loops.dir}"/>
629  
# Line 627 | Line 634
634        deprecation="${build.deprecation}"
635             source="${build.sourcelevel}"
636             target="${build.sourcelevel}"
637 +         encoding="ASCII"
638               fork="true">
639  
640        <compilerarg line="${build.args}"/>
# Line 654 | Line 662
662             deprecation="${build.deprecation}"
663             includeAntRuntime="false"
664             includeJavaRuntime="false"
665 +           encoding="ASCII"
666             executable="${javac9}"
667             fork="true">
668  
# Line 687 | Line 696
696             bootclasspath="${bootclasspath8}"
697             includeAntRuntime="false"
698             includeJavaRuntime="false"
699 +           encoding="ASCII"
700             executable="${javac8}"
701             fork="true">
702  
# Line 717 | Line 727
727             bootclasspath="${bootclasspath8}"
728             includeAntRuntime="false"
729             includeJavaRuntime="false"
730 +           encoding="ASCII"
731             executable="${javac8}"
732             fork="true">
733  
# Line 792 | Line 803
803               access="${build.javadoc.access}"
804               sourcepath="${4jdk8src.dir}:${jdk8.src.dir}"
805               classpath=""
806 <             executable="${javadoc8}">
806 >             executable="${javadoc8}"
807 >             failonerror = "true">
808        <fileset dir="${4jdk8src.dir}" defaultexcludes="yes">
809          <include name="**/*.java"/>
810        </fileset>
# Line 800 | Line 812
812        <arg value="-XDignore.symbol.file=true"/>
813        <arg value="-tag"/>
814        <arg value="${javadoc.jls.option}"/>
815 <      <arg value="-tag"/>
816 <      <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>
815 > <!-- @apiNote currently unused -->
816 > <!--       <arg value="-tag"/> -->
817 > <!--       <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/> -->
818        <arg value="-tag"/>
819        <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
820        <arg value="-tag"/>
# Line 855 | Line 868
868             bootclasspath="${bootclasspath6}"
869             includeAntRuntime="false"
870             includeJavaRuntime="false"
871 +           encoding="ASCII"
872             executable="${javac7}"
873             fork="true">
874  
# Line 885 | Line 899
899             bootclasspath="${bootclasspath6}"
900             includeAntRuntime="false"
901             includeJavaRuntime="false"
902 +           encoding="ASCII"
903             executable="${javac8}"
904             fork="true">
905  
# Line 940 | Line 955
955    </target>
956  
957  
958 +  <!-- Runs tck tests for jsr166-4jdk7 via junit task (dead experiment) -->
959    <target name="4jdk7-tck-junit"
960 <          depends="4jdk7compile"
945 <          description="Runs tck tests for jsr166-4jdk7 via junit task (experimental)">
960 >          depends="4jdk7compile">
961  
962      <junit printsummary="true"
963             showoutput="true"
# Line 997 | Line 1012
1012               access="${build.javadoc.access}"
1013               sourcepath="${4jdk7src.dir}:${jdk7.src.dir}"
1014               classpath=""
1015 <             executable="${javadoc7}">
1015 >             executable="${javadoc7}"
1016 >             failonerror = "true">
1017        <fileset dir="${4jdk7src.dir}" defaultexcludes="yes">
1018          <include name="**/*.java"/>
1019        </fileset>
# Line 1051 | Line 1067
1067             target="5"
1068             includeAntRuntime="false"
1069             includeJavaRuntime="false"
1070 +           encoding="ASCII"
1071             executable="${javac7}"
1072             fork="true">
1073  
# Line 1092 | Line 1109
1109               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1110               bootclasspath="${bootclasspath6}"
1111               source="5"
1112 <             executable="${javadoc7}">
1112 >             executable="${javadoc7}"
1113 >             failonerror = "true">
1114        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1115        <arg value="-XDignore.symbol.file=true"/>
1116  
# Line 1143 | Line 1161
1161             bootclasspath="${bootclasspath6}"
1162             includeAntRuntime="false"
1163             includeJavaRuntime="false"
1164 +           encoding="ASCII"
1165             executable="${javac7}"
1166             fork="true">
1167  
# Line 1184 | Line 1203
1203               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1204               bootclasspath="${bootclasspath6}"
1205               source="6"
1206 <             executable="${javadoc7}">
1206 >             executable="${javadoc7}"
1207 >             failonerror = "true">
1208        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1209        <arg value="-XDignore.symbol.file=true"/>
1210  
# Line 1236 | Line 1256
1256             target="6"
1257             includeAntRuntime="false"
1258             includeJavaRuntime="false"
1259 +           encoding="ASCII"
1260             executable="${javac7}"
1261             fork="true">
1262  
# Line 1397 | Line 1418
1418               access="${build.javadoc.access}"
1419               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1420               source="${build.jsr166e.java.version}"
1421 <             executable="${javadoc7}">
1421 >             executable="${javadoc7}"
1422 >             failonerror = "true">
1423        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1424        <arg value="-XDignore.symbol.file=true"/>
1425  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines