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

Diff of /jsr166/build.xml

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

revision 1.211 by jsr166, Sat May 21 00:12:12 2016 UTC revision 1.231 by jsr166, Sun Jan 29 20:19:00 2017 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" xmlns:unless="ant:unless"
3      xmlns:ivy="antlib:org.apache.ivy.ant">
4    
5    <description>    <description>
6  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
# Line 63  Line 64 
64    <property name="build.classes.dir"           location="${build.dir}/classes"/>    <property name="build.classes.dir"           location="${build.dir}/classes"/>
65    <property name="build.testcases.dir"         location="${build.dir}/testcases"/>    <property name="build.testcases.dir"         location="${build.dir}/testcases"/>
66    <property name="build.loops.dir"             location="${build.dir}/loops"/>    <property name="build.loops.dir"             location="${build.dir}/loops"/>
   <property name="build.reports.dir"           location="${build.dir}/reports"/>  
67    
68    <property name="build.4jdk7.dir"             location="${build.dir}/jsr166-4jdk7"/>    <property name="build.4jdk7.dir"             location="${build.dir}/jsr166-4jdk7"/>
69    <property name="build.4jdk7.classes.dir"     location="${build.4jdk7.dir}/classes"/>    <property name="build.4jdk7.classes.dir"     location="${build.4jdk7.dir}/classes"/>
# Line 188  Line 188 
188    <property name="java8.docroot.url"      value="http://docs.oracle.com/javase/8/docs"/>    <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-04 -->    <!-- 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"/> -->    <!-- <property name="java9.docroot.url" value="http://docs.oracle.com/javase/9/docs"/> -->
191    <property name="java9.docroot.url"      value="http://http://download.java.net/java/jdk9/docs"/>    <property name="java9.docroot.url"      value="http://download.java.net/java/jdk9/docs"/>
192    <!-- Default jdk doc location (latest stable release seems best) -->    <!-- Default jdk doc location (latest stable release seems best) -->
193    <property name="java.docroot.url"       value="${java8.docroot.url}"/>    <property name="java.docroot.url"       value="${java8.docroot.url}"/>
194    
# Line 245  Line 245 
245             classpath="${junit.jar}"             classpath="${junit.jar}"
246             includeAntRuntime="false"             includeAntRuntime="false"
247             includeJavaRuntime="false"             includeJavaRuntime="false"
248               encoding="ASCII"
249             executable="${javac@{compile-target}}"             executable="${javac@{compile-target}}"
250             fork="true">             fork="true">
251    
# Line 252  Line 253 
253        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
254        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>
255        <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>        <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
256        <compilerarg value="-Xpatch:java.base=${build.classes.dir}/java.base" if:set="modules"/>        <compilerarg line="--patch-module java.base=@{classes}" if:set="modules"/>
257        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
258        <javac-elements/>        <javac-elements/>
259    
# Line 263  Line 264 
264            jvm="${java@{target}}"            jvm="${java@{target}}"
265            fork="true">            fork="true">
266          <jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>          <jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
267          <jvmarg value="-Xpatch:java.base=${build.classes.dir}/java.base" if:set="modules"/>          <jvmarg line="--patch-module java.base=@{classes}" if:set="modules"/>
268            <jvmarg line="--add-opens java.base/java.lang=ALL-UNNAMED" if:set="modules"/>
269            <jvmarg line="--add-opens java.base/java.util=ALL-UNNAMED" if:set="modules"/>
270            <jvmarg line="--add-opens java.base/java.util.concurrent=ALL-UNNAMED" if:set="modules"/>
271            <jvmarg line="--add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED" if:set="modules"/>
272            <jvmarg line="--add-opens java.base/java.util.concurrent.locks=ALL-UNNAMED" if:set="modules"/>
273          <jvmarg line="@{jvmflags}"/>          <jvmarg line="@{jvmflags}"/>
274            <!-- ant -Dvmoptions="-Xmx8m" -Djsr166.tckTestClass=CompletableFutureTest tck -->
275            <jvmarg line="${vmoptions}" if:set="vmoptions"/>
276    
277          <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->          <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->
278          <syspropertyset id="system-properties-used-by-tck">          <syspropertyset id="system-properties-used-by-tck">
279            <propertyref prefix="java.util.concurrent.ForkJoinPool"/>            <propertyref prefix="java.util.concurrent.ForkJoinPool"/>
280            <propertyref prefix="jsr166."/>            <propertyref prefix="jsr166."/>
# Line 292  Line 300 
300    <fileset dir="${jtreg8.src.dir}">    <fileset dir="${jtreg8.src.dir}">
301      <patternset id="jdk8.jtreg.tests">      <patternset id="jdk8.jtreg.tests">
302        <include name="**/*.java"/>        <include name="**/*.java"/>
       <exclude name="**/SpliteratorCharacteristics.java"/>  
       <!-- https://bugs.openjdk.java.net/browse/JDK-6842353 -->  
       <exclude name="**/GCDuringIteration.java"/>  
303      </patternset>      </patternset>
304    </fileset>    </fileset>
305    
# Line 326  Line 331 
331      </condition>      </condition>
332    
333      <delete dir="@{workdir}/JTwork"   quiet="true"/>      <delete dir="@{workdir}/JTwork"   quiet="true"/>
     <delete dir="@{workdir}/JTreport" quiet="true"/>  
334      <jtreg dir="${jtreg@{target}.src.dir}"      <jtreg dir="${jtreg@{target}.src.dir}"
335             jdk="${jdk@{target}.home}"             jdk="${jdk@{target}.home}"
336             workDir="@{workdir}/JTwork"             workDir="@{workdir}/JTwork">
            reportDir="@{workdir}/JTreport">  
337        <patternset refid="jdk@{target}.jtreg.tests"/>        <patternset refid="jdk@{target}.jtreg.tests"/>
338        <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>        <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
339        <arg value="-vmoption:-Xpatch:java.base=${build.classes.dir}/java.base" if:set="modules"/>        <arg value="-javacoptions:--patch-module java.base=@{classes}" if:set="modules"/>
340          <arg value="-vmoptions:--patch-module java.base=@{classes}" if:set="modules"/>
341        <arg value="-agentvm"/>        <arg value="-agentvm"/>
342          <arg value="-noreport"/>
343        <arg value="-verbose:${jtreg.verbose}"/>        <arg value="-verbose:${jtreg.verbose}"/>
344        <arg value="-vmoptions:-esa -ea"/>        <arg value="-vmoptions:-esa -ea"/>
345        <arg value="-automatic"/>        <arg value="-automatic"/>
# Line 389  Line 394 
394             classpath=""             classpath=""
395             includeAntRuntime="false"             includeAntRuntime="false"
396             includeJavaRuntime="false"             includeJavaRuntime="false"
397               encoding="ASCII"
398             executable="${build.main.javac}"             executable="${build.main.javac}"
399             fork="true">             fork="true">
400    
# Line 409  Line 415 
415    <target name="jar"    <target name="jar"
416            depends="compile"            depends="compile"
417            description="Builds library jar for src/main from compiled sources">            description="Builds library jar for src/main from compiled sources">
418        <local name="subdir"/>
419        <available property="subdir" file="${build.classes.dir}/java.base" type="dir" value="/java.base"/>
420      <jar destfile="${product.jar}">      <jar destfile="${product.jar}">
421        <fileset dir="${build.classes.dir}"/>        <fileset dir="${build.classes.dir}${subdir}"/>
422        <manifest>        <manifest>
423          <attribute name="Built-By" value="${user.name}"/>          <attribute name="Built-By" value="${user.name}"/>
424          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
# Line 429  Line 436 
436      <!-- the packagenames="none" hack below prevents scanning the -->      <!-- the packagenames="none" hack below prevents scanning the -->
437      <!-- sourcepath for packages -->      <!-- sourcepath for packages -->
438    
439    <!-- TODO: sourcepath="${src.dir}:${jdk9.src.dir}" -->
440    <!-- TODO: sourcepath="${src.dir}:${jdk9.src.dir}:${jdk9.src.home}/jdk/src/java.logging/share/classes" -->
441    <!-- TODO: sourcepath="${src.dir}:${jdk9.home}/src.zip" -->
442    <!-- TODO: <arg line="-sourcepath ${src.dir}:${jdk9.home}/src.zip"/> -->
443    <!-- TODO: <arg line="- -module-source-path ${jdk9.home}/src.zip"/> -->
444      <javadoc destdir="${docs.dir}"      <javadoc destdir="${docs.dir}"
445               packagenames="none"               packagenames="none"
446               link="${java9.api.url}"               link="${java9.api.url}"
447               overview="${src.dir}/intro.html"               overview="${src.dir}/intro.html"
448               access="${build.javadoc.access}"               access="${build.javadoc.access}"
449               sourcepath="${src.dir}:${jdk9.src.dir}"               sourcepath="${src.dir}"
450               classpath=""               classpath=""
451               executable="${javadoc9}">               executable="${javadoc9}">
452        <fileset dir="${src.dir}" defaultexcludes="yes">        <fileset dir="${src.dir}" defaultexcludes="yes">
# Line 443  Line 455 
455        <arg line="-Xdocrootparent ${java9.docroot.url}"/>        <arg line="-Xdocrootparent ${java9.docroot.url}"/>
456        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
457        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
458  <!--  TODO     <arg value="-Xmodule:java.base"/> -->        <arg value="-Xmodule:java.base"/>
459        <arg value="-tag"/>        <arg value="-tag"/>
460        <arg value="${javadoc.jls.option}"/>        <arg value="${javadoc.jls.option}"/>
461    <!-- @apiNote currently unused -->
462    <!--       <arg value="-tag"/> -->
463    <!--       <arg value="apiNote:a:API Note:"/> -->
464        <arg value="-tag"/>        <arg value="-tag"/>
465        <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>        <arg value="implSpec:a:Implementation Requirements:"/>
       <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;"/>  
 <!-- tags added in jdk9 -->  
466        <arg value="-tag"/>        <arg value="-tag"/>
467        <arg value="revised:X"/>        <arg value="implNote:a:Implementation Note:"/>
468        <arg value="-tag"/>  <!-- tags added in jdk9: currently unused -->
469        <arg value="spec:X"/>  <!--       <arg value="-tag"/> -->
470    <!--       <arg value="revised:X"/> -->
471    <!--       <arg value="-tag"/> -->
472    <!--       <arg value="spec:X"/> -->
473      </javadoc>      </javadoc>
474    </target>    </target>
475    
# Line 539  Line 552 
552      </antcall>      </antcall>
553    </target>    </target>
554    
555      <target name="tck-security-manager"
556              description="Runs tck with a security manager">
557        <antcall target="tck">
558          <param name="jsr166.useSecurityManager" value="true"/>
559        </antcall>
560      </target>
561    
562    <target name="jtreg"    <target name="jtreg"
563            depends="jar"            depends="jar"
564            description="Runs jtreg tests for src/main using the jtreg ant task">            description="Runs jtreg tests for src/main using the jtreg ant task">
# Line 619  Line 639 
639        deprecation="${build.deprecation}"        deprecation="${build.deprecation}"
640             source="${build.sourcelevel}"             source="${build.sourcelevel}"
641             target="${build.sourcelevel}"             target="${build.sourcelevel}"
642             encoding="ASCII"
643               fork="true">               fork="true">
644    
645        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
# Line 646  Line 667 
667             deprecation="${build.deprecation}"             deprecation="${build.deprecation}"
668             includeAntRuntime="false"             includeAntRuntime="false"
669             includeJavaRuntime="false"             includeJavaRuntime="false"
670               encoding="ASCII"
671             executable="${javac9}"             executable="${javac9}"
672             fork="true">             fork="true">
673    
# Line 679  Line 701 
701             bootclasspath="${bootclasspath8}"             bootclasspath="${bootclasspath8}"
702             includeAntRuntime="false"             includeAntRuntime="false"
703             includeJavaRuntime="false"             includeJavaRuntime="false"
704               encoding="ASCII"
705             executable="${javac8}"             executable="${javac8}"
706             fork="true">             fork="true">
707    
# Line 709  Line 732 
732             bootclasspath="${bootclasspath8}"             bootclasspath="${bootclasspath8}"
733             includeAntRuntime="false"             includeAntRuntime="false"
734             includeJavaRuntime="false"             includeJavaRuntime="false"
735               encoding="ASCII"
736             executable="${javac8}"             executable="${javac8}"
737             fork="true">             fork="true">
738    
# Line 793  Line 817 
817        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
818        <arg value="-tag"/>        <arg value="-tag"/>
819        <arg value="${javadoc.jls.option}"/>        <arg value="${javadoc.jls.option}"/>
820        <arg value="-tag"/>  <!-- @apiNote currently unused -->
821        <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>  <!--       <arg value="-tag"/> -->
822    <!--       <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/> -->
823        <arg value="-tag"/>        <arg value="-tag"/>
824        <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>        <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
825        <arg value="-tag"/>        <arg value="-tag"/>
# Line 848  Line 873 
873             bootclasspath="${bootclasspath6}"             bootclasspath="${bootclasspath6}"
874             includeAntRuntime="false"             includeAntRuntime="false"
875             includeJavaRuntime="false"             includeJavaRuntime="false"
876               encoding="ASCII"
877             executable="${javac7}"             executable="${javac7}"
878             fork="true">             fork="true">
879    
# Line 878  Line 904 
904             bootclasspath="${bootclasspath6}"             bootclasspath="${bootclasspath6}"
905             includeAntRuntime="false"             includeAntRuntime="false"
906             includeJavaRuntime="false"             includeJavaRuntime="false"
907               encoding="ASCII"
908             executable="${javac8}"             executable="${javac8}"
909             fork="true">             fork="true">
910    
# Line 1045  Line 1072 
1072             target="5"             target="5"
1073             includeAntRuntime="false"             includeAntRuntime="false"
1074             includeJavaRuntime="false"             includeJavaRuntime="false"
1075               encoding="ASCII"
1076             executable="${javac7}"             executable="${javac7}"
1077             fork="true">             fork="true">
1078    
# Line 1138  Line 1166 
1166             bootclasspath="${bootclasspath6}"             bootclasspath="${bootclasspath6}"
1167             includeAntRuntime="false"             includeAntRuntime="false"
1168             includeJavaRuntime="false"             includeJavaRuntime="false"
1169               encoding="ASCII"
1170             executable="${javac7}"             executable="${javac7}"
1171             fork="true">             fork="true">
1172    
# Line 1232  Line 1261 
1261             target="6"             target="6"
1262             includeAntRuntime="false"             includeAntRuntime="false"
1263             includeJavaRuntime="false"             includeJavaRuntime="false"
1264               encoding="ASCII"
1265             executable="${javac7}"             executable="${javac7}"
1266             fork="true">             fork="true">
1267    
# Line 1479  Line 1509 
1509      </antcall>      </antcall>
1510    </target>    </target>
1511    
1512    <!-- ==============================================================
1513      Running guava tests against jsr166 code
1514    =================================================================== -->
1515    
1516    <!-- <ivy:cachepath pathid="lib.path.id" inline="true" conf="*" -->
1517    <!--   organisation="com.google.guava" module="guava-testlib" revision="21.0"/> -->
1518    <!-- <property name="guava.version" value="21.0"/> -->
1519    
1520    <!-- HOWTO debug print a path id -->
1521    <!-- <pathconvert property="guava.testlib.classpath" refid="guava.testlib.classpath" /> -->
1522    <!-- <echo message="guava.testlib.classpath=${guava.testlib.classpath}"/> -->
1523    
1524    <!-- <ivy:retrieve pathid="guava.tests.classpath" type="jar" inline="true" conf="*" pattern="${lib.dir}/[type]/[artifact].[ext]" -->
1525    <!--   organisation="com.google.guava" module="guava-tests"/> -->
1526    <!-- <get src="http://repo2.maven.org/maven2/com/google/guava/guava-tests/${guava.version}/guava-tests-${guava.version}-tests.jar" -->
1527    <!--   dest="${lib.dir}/jar/guava-tests-tests.jar" usetimestamp="true"/> -->
1528    <!--     <ivy:cachepath pathid="lib.path.id" inline="true" conf="*" type="*" -->
1529    <!--       organisation="com.google.guava" module="guava-testlib" revision="${guava.version}"/> -->
1530    
1531    <!-- <test name="com.google.common.collect.testing.TestsForQueuesInJavaUtil"/> -->
1532    <!-- <test name="com.google.common.collect.testing.TestsForListsInJavaUtil"/> -->
1533    <!-- <test name="com.google.common.collect.testing.TestsForSetsInJavaUtil"/> -->
1534    <!-- <test name="com.google.common.collect.testing.TestsForMapsInJavaUtil"/> -->
1535    
1536    <!-- <ivy:retrieve pathid="guava.testlib.classpath" -->
1537    <!--   type="*" inline="true" conf="*(private),*(public)" -->
1538    <!--   pattern="${guava.dir}/[artifact].[ext]" -->
1539    <!--   organisation="com.google.guava" module="guava-testlib"/> -->
1540    
1541    <!-- Work around bug below by downloading guava-testlib-tests.jar "by hand": -->
1542    <!-- https://issues.apache.org/jira/browse/IVY-1444 -->
1543    <!-- maven tests artifacts cannot be downloaded because they are mapped to private configurations -->
1544    
1545      <target name="init-ivy">
1546        <get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar"
1547             dest="${build.dir}/ivy.jar" usetimestamp="true" skipexisting="true"/>
1548        <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant"
1549                 classpath="${build.dir}/ivy.jar"/>
1550      </target>
1551    
1552      <target name="guava-tests" depends="jar, init-ivy"
1553              description="Guava tests run against jsr166 collections">
1554        <property name="guava.dir" value="${build.dir}/guava-testlib"/>
1555        <mkdir dir="${guava.dir}"/>
1556        <ivy:retrieve pathid="guava.testlib.classpath"
1557          type="jar,bundle" inline="true" conf="default,master"
1558          pattern="${guava.dir}/[artifact].[ext]"
1559          organisation="com.google.guava" module="guava-testlib"/>
1560        <property name="guava.version" value="21.0"/>
1561        <get src="http://repo2.maven.org/maven2/com/google/guava/guava-testlib/${guava.version}/guava-testlib-${guava.version}-tests.jar"
1562             dest="${guava.dir}/guava-testlib-tests.jar" usetimestamp="true"/>
1563        <junit printsummary="true" showoutput="true" haltonfailure="true"
1564               jvm="${java9}" fork="true">
1565          <jvmarg line="-ea -esa --patch-module java.base=${product.jar}"/>
1566          <formatter type="brief"/>
1567          <classpath>
1568            <pathelement location="${guava.dir}/guava-testlib-tests.jar"/>
1569            <path refid="guava.testlib.classpath"/>
1570          </classpath>
1571    
1572          <!-- "6" in "OpenJdk6Tests" misleadingly means "6+" -->
1573          <test name="com.google.common.collect.testing.OpenJdk6Tests"/>
1574        </junit>
1575      </target>
1576    
1577  </project>  </project>

Legend:
Removed from v.1.211  
changed lines
  Added in v.1.231

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