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.224 by jsr166, Thu Nov 24 01:58:04 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 62 | Line 63
63    <property name="build.classes.dir"           location="${build.dir}/classes"/>
64    <property name="build.testcases.dir"         location="${build.dir}/testcases"/>
65    <property name="build.loops.dir"             location="${build.dir}/loops"/>
65  <property name="build.reports.dir"           location="${build.dir}/reports"/>
66  
67    <property name="build.4jdk7.dir"             location="${build.dir}/jsr166-4jdk7"/>
68    <property name="build.4jdk7.classes.dir"     location="${build.4jdk7.dir}/classes"/>
# Line 185 | Line 185
185    <property name="java6.docroot.url"      value="http://docs.oracle.com/javase/6/docs"/>
186    <property name="java7.docroot.url"      value="http://docs.oracle.com/javase/7/docs"/>
187    <property name="java8.docroot.url"      value="http://docs.oracle.com/javase/8/docs"/>
188 <  <!-- The expected canonical location does not yet exist as of 2016-03 -->
188 >  <!-- The expected canonical location does not yet exist as of 2016-04 -->
189    <!-- <property name="java9.docroot.url" value="http://docs.oracle.com/javase/9/docs"/> -->
190 <  <property name="java9.docroot.url"      value="http://download.java.net/jdk9/docs"/>
190 >  <property name="java9.docroot.url"      value="http://download.java.net/java/jdk9/docs"/>
191    <!-- Default jdk doc location (latest stable release seems best) -->
192    <property name="java.docroot.url"       value="${java8.docroot.url}"/>
193  
# Line 244 | Line 244
244             classpath="${junit.jar}"
245             includeAntRuntime="false"
246             includeJavaRuntime="false"
247 +           encoding="ASCII"
248             executable="${javac@{compile-target}}"
249             fork="true">
250  
# Line 251 | Line 252
252        <compilerarg value="-XDignore.symbol.file=true"/>
253        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>
254        <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
255 <      <compilerarg value="-Xpatch:${build.classes.dir}" if:set="modules"/>
255 >      <compilerarg line="--patch-module java.base=${build.classes.dir}/java.base" if:set="modules"/>
256        <compilerarg line="${build.args}"/>
257        <javac-elements/>
258  
# Line 262 | Line 263
263            jvm="${java@{target}}"
264            fork="true">
265          <jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
266 <        <jvmarg value="-Xpatch:${build.classes.dir}" if:set="modules"/>
266 >        <jvmarg line="--patch-module java.base=${build.classes.dir}/java.base" if:set="modules"/>
267          <jvmarg line="@{jvmflags}"/>
268 +        <!-- ant -Dvmoptions="-Xmx8m" -Djsr166.tckTestClass=CompletableFutureTest tck -->
269 +        <jvmarg line="${vmoptions}" if:set="vmoptions"/>
270  
271 <        <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->
271 >        <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->
272          <syspropertyset id="system-properties-used-by-tck">
273            <propertyref prefix="java.util.concurrent.ForkJoinPool"/>
274            <propertyref prefix="jsr166."/>
# Line 325 | Line 328
328      </condition>
329  
330      <delete dir="@{workdir}/JTwork"   quiet="true"/>
328    <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"/>
331      <jtreg dir="${jtreg@{target}.src.dir}"
332             jdk="${jdk@{target}.home}"
333 <           workDir="@{workdir}/JTwork"
336 <           reportDir="@{workdir}/JTreport">
333 >           workDir="@{workdir}/JTwork">
334        <patternset refid="jdk@{target}.jtreg.tests"/>
335        <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
336 <      <arg value="-Xpatch:${build.classes.dir}" if:set="modules"/>
336 >      <arg value="-javacoptions:--patch-module java.base=${build.classes.dir}/java.base" if:set="modules"/>
337 >      <arg value="-vmoptions:--patch-module java.base=${build.classes.dir}/java.base" if:set="modules"/>
338        <arg value="-agentvm"/>
339 +      <arg value="-noreport"/>
340        <arg value="-verbose:${jtreg.verbose}"/>
341        <arg value="-vmoptions:-esa -ea"/>
342        <arg value="-automatic"/>
# Line 392 | Line 391
391             classpath=""
392             includeAntRuntime="false"
393             includeJavaRuntime="false"
394 +           encoding="ASCII"
395             executable="${build.main.javac}"
396             fork="true">
397  
# Line 406 | Line 406
406        <compilerarg line="${build.args}"/>
407  
408      </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    -->
409    </target>
410  
411  
412    <target name="jar"
413            depends="compile"
414 <          description="Builds library jar from compiled sources">
415 <
414 >          description="Builds library jar for src/main from compiled sources">
415 >    <local name="subdir"/>
416 >    <available property="subdir" file="${build.classes.dir}/java.base" type="dir" value="/java.base"/>
417      <jar destfile="${product.jar}">
418 <      <fileset dir="${build.classes.dir}"/>
418 >      <fileset dir="${build.classes.dir}${subdir}"/>
419        <manifest>
420          <attribute name="Built-By" value="${user.name}"/>
421          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
# Line 437 | Line 433
433      <!-- the packagenames="none" hack below prevents scanning the -->
434      <!-- sourcepath for packages -->
435  
436 + <!--  TODO: sourcepath="${src.dir}:${jdk9.src.dir}" -->
437 + <!--  TODO: sourcepath="${src.dir}:${jdk9.src.dir}:${jdk9.src.home}/jdk/src/java.logging/share/classes" -->
438      <javadoc destdir="${docs.dir}"
439               packagenames="none"
440               link="${java9.api.url}"
441               overview="${src.dir}/intro.html"
442               access="${build.javadoc.access}"
443 <             sourcepath="${src.dir}:${jdk9.src.dir}"
443 >             sourcepath="${src.dir}"
444               classpath=""
445               executable="${javadoc9}">
446        <fileset dir="${src.dir}" defaultexcludes="yes">
# Line 451 | Line 449
449        <arg line="-Xdocrootparent ${java9.docroot.url}"/>
450        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
451        <arg value="-XDignore.symbol.file=true"/>
452 < <!--  TODO     <arg value="-Xmodule:java.base"/> -->
452 >      <arg value="-Xmodule:java.base"/>
453        <arg value="-tag"/>
454        <arg value="${javadoc.jls.option}"/>
455 + <!-- @apiNote currently unused -->
456 + <!--       <arg value="-tag"/> -->
457 + <!--       <arg value="apiNote:a:API Note:"/> -->
458        <arg value="-tag"/>
459 <      <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>
459 >      <arg value="implSpec:a:Implementation Requirements:"/>
460        <arg value="-tag"/>
461 <      <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
462 <      <arg value="-tag"/>
463 <      <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>
464 < <!-- tags added in jdk9 -->
465 <      <arg value="-tag"/>
466 <      <arg value="revised:X"/>
466 <      <arg value="-tag"/>
467 <      <arg value="spec:X"/>
461 >      <arg value="implNote:a:Implementation Note:"/>
462 > <!-- tags added in jdk9: currently unused -->
463 > <!--       <arg value="-tag"/> -->
464 > <!--       <arg value="revised:X"/> -->
465 > <!--       <arg value="-tag"/> -->
466 > <!--       <arg value="spec:X"/> -->
467      </javadoc>
468    </target>
469  
# Line 525 | Line 524
524  
525    <target name="tck"
526            depends="jar"
527 <          description="Runs tck tests for main directly">
527 >          description="Runs tck tests for src/main directly">
528  
529      <run-tck-tests
530        target="${build.main.java.version}"
# Line 534 | Line 533
533    </target>
534  
535    <target name="tck-parallelism-1"
536 <          description="Runs tck with given common pool parallelism">
536 >          description="Runs tck with common pool parallelism 1">
537      <antcall target="tck">
538        <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="1"/>
539      </antcall>
540    </target>
541  
542    <target name="tck-parallelism-0"
543 <          description="Runs tck with given common pool parallelism">
543 >          description="Runs tck with common pool parallelism 0">
544      <antcall target="tck">
545        <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="0"/>
546      </antcall>
547    </target>
548  
549 +  <target name="tck-security-manager"
550 +          description="Runs tck with a security manager">
551 +    <antcall target="tck">
552 +      <param name="jsr166.useSecurityManager" value="true"/>
553 +    </antcall>
554 +  </target>
555 +
556    <target name="jtreg"
557            depends="jar"
558 <          description="Runs jtreg tests for main using the jtreg ant task">
558 >          description="Runs jtreg tests for src/main using the jtreg ant task">
559      <run-jtreg-tests
560         target="${build.main.java.version}"
561         workdir="${build.dir}"
# Line 557 | Line 563
563    </target>
564  
565    <target name="test"
566 <          depends="tck, tck-parallelism-1, jtreg"
567 <          description="Runs tck and jtreg tests for main">
566 >          depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"
567 >          description="Runs tck and jtreg tests for src/main">
568    </target>
569  
570 <  <target name="jtreg8" description="Runs jtreg tests with jdk8">
570 > <!--   <target name="jtreg8" description="Runs jtreg tests with jdk8"> -->
571  
572 <    <antcall target="jtreg">
573 <      <param name="build.main.java.version" value="8"/>
574 <      <param name="build.main.javac" value="${javac8}"/>
575 <    </antcall>
572 > <!--     <antcall target="jtreg"> -->
573 > <!--       <param name="build.main.java.version" value="8"/> -->
574 > <!--       <param name="build.main.javac" value="${javac8}"/> -->
575 > <!--     </antcall> -->
576  
577 <  </target>
577 > <!--   </target> -->
578  
579 <  <target name="test89"
580 <          description="Runs tck and jtreg tests for main for multiple java versions">
579 > <!--   <target name="test89" -->
580 > <!--           description="Runs tck and jtreg tests for src/main for multiple java versions"> -->
581  
582 <    <antcall target="clean"/>
583 <    <antcall target="test">
584 <      <param name="build.main.java.version" value="8"/>
585 <      <param name="build.main.javac" value="${javac8}"/>
586 <    </antcall>
582 > <!--     <antcall target="clean"/> -->
583 > <!--     <antcall target="test"> -->
584 > <!--       <param name="build.main.java.version" value="8"/> -->
585 > <!--       <param name="build.main.javac" value="${javac8}"/> -->
586 > <!--     </antcall> -->
587  
588 <    <antcall target="clean"/>
589 <    <antcall target="test">
590 <      <param name="build.main.java.version" value="9"/>
591 <      <param name="build.main.javac" value="${javac9}"/>
592 <    </antcall>
588 > <!--     <antcall target="clean"/> -->
589 > <!--     <antcall target="test"> -->
590 > <!--       <param name="build.main.java.version" value="9"/> -->
591 > <!--       <param name="build.main.javac" value="${javac9}"/> -->
592 > <!--     </antcall> -->
593  
594 <  </target>
594 > <!--   </target> -->
595  
596  
597  
# Line 615 | Line 621
621    <!-- Various demos and test programs -->
622  
623  
624 <  <target name="loops" depends="configure-compiler"
625 <          description="Benchmark from Doug Lea's AQS paper">
624 >  <!-- description="Benchmark from Doug Lea's AQS paper" -->
625 >  <target name="loops" depends="configure-compiler">
626  
627      <mkdir dir="${build.loops.dir}"/>
628  
# Line 627 | Line 633
633        deprecation="${build.deprecation}"
634             source="${build.sourcelevel}"
635             target="${build.sourcelevel}"
636 +         encoding="ASCII"
637               fork="true">
638  
639        <compilerarg line="${build.args}"/>
# Line 654 | Line 661
661             deprecation="${build.deprecation}"
662             includeAntRuntime="false"
663             includeJavaRuntime="false"
664 +           encoding="ASCII"
665             executable="${javac9}"
666             fork="true">
667  
# Line 687 | Line 695
695             bootclasspath="${bootclasspath8}"
696             includeAntRuntime="false"
697             includeJavaRuntime="false"
698 +           encoding="ASCII"
699             executable="${javac8}"
700             fork="true">
701  
# Line 717 | Line 726
726             bootclasspath="${bootclasspath8}"
727             includeAntRuntime="false"
728             includeJavaRuntime="false"
729 +           encoding="ASCII"
730             executable="${javac8}"
731             fork="true">
732  
# Line 792 | Line 802
802               access="${build.javadoc.access}"
803               sourcepath="${4jdk8src.dir}:${jdk8.src.dir}"
804               classpath=""
805 <             executable="${javadoc8}">
805 >             executable="${javadoc8}"
806 >             failonerror = "true">
807        <fileset dir="${4jdk8src.dir}" defaultexcludes="yes">
808          <include name="**/*.java"/>
809        </fileset>
# Line 800 | Line 811
811        <arg value="-XDignore.symbol.file=true"/>
812        <arg value="-tag"/>
813        <arg value="${javadoc.jls.option}"/>
814 <      <arg value="-tag"/>
815 <      <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>
814 > <!-- @apiNote currently unused -->
815 > <!--       <arg value="-tag"/> -->
816 > <!--       <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/> -->
817        <arg value="-tag"/>
818        <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
819        <arg value="-tag"/>
# Line 855 | Line 867
867             bootclasspath="${bootclasspath6}"
868             includeAntRuntime="false"
869             includeJavaRuntime="false"
870 +           encoding="ASCII"
871             executable="${javac7}"
872             fork="true">
873  
# Line 885 | Line 898
898             bootclasspath="${bootclasspath6}"
899             includeAntRuntime="false"
900             includeJavaRuntime="false"
901 +           encoding="ASCII"
902             executable="${javac8}"
903             fork="true">
904  
# Line 940 | Line 954
954    </target>
955  
956  
957 +  <!-- Runs tck tests for jsr166-4jdk7 via junit task (dead experiment) -->
958    <target name="4jdk7-tck-junit"
959 <          depends="4jdk7compile"
945 <          description="Runs tck tests for jsr166-4jdk7 via junit task (experimental)">
959 >          depends="4jdk7compile">
960  
961      <junit printsummary="true"
962             showoutput="true"
# Line 997 | Line 1011
1011               access="${build.javadoc.access}"
1012               sourcepath="${4jdk7src.dir}:${jdk7.src.dir}"
1013               classpath=""
1014 <             executable="${javadoc7}">
1014 >             executable="${javadoc7}"
1015 >             failonerror = "true">
1016        <fileset dir="${4jdk7src.dir}" defaultexcludes="yes">
1017          <include name="**/*.java"/>
1018        </fileset>
# Line 1051 | Line 1066
1066             target="5"
1067             includeAntRuntime="false"
1068             includeJavaRuntime="false"
1069 +           encoding="ASCII"
1070             executable="${javac7}"
1071             fork="true">
1072  
# Line 1092 | Line 1108
1108               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1109               bootclasspath="${bootclasspath6}"
1110               source="5"
1111 <             executable="${javadoc7}">
1111 >             executable="${javadoc7}"
1112 >             failonerror = "true">
1113        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1114        <arg value="-XDignore.symbol.file=true"/>
1115  
# Line 1143 | Line 1160
1160             bootclasspath="${bootclasspath6}"
1161             includeAntRuntime="false"
1162             includeJavaRuntime="false"
1163 +           encoding="ASCII"
1164             executable="${javac7}"
1165             fork="true">
1166  
# Line 1184 | Line 1202
1202               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1203               bootclasspath="${bootclasspath6}"
1204               source="6"
1205 <             executable="${javadoc7}">
1205 >             executable="${javadoc7}"
1206 >             failonerror = "true">
1207        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1208        <arg value="-XDignore.symbol.file=true"/>
1209  
# Line 1236 | Line 1255
1255             target="6"
1256             includeAntRuntime="false"
1257             includeJavaRuntime="false"
1258 +           encoding="ASCII"
1259             executable="${javac7}"
1260             fork="true">
1261  
# Line 1397 | Line 1417
1417               access="${build.javadoc.access}"
1418               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1419               source="${build.jsr166e.java.version}"
1420 <             executable="${javadoc7}">
1420 >             executable="${javadoc7}"
1421 >             failonerror = "true">
1422        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1423        <arg value="-XDignore.symbol.file=true"/>
1424  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines