try to fix missing modules error and move addOpens detection into ant build

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1852072 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andreas Beeker 2019-01-24 20:35:18 +00:00
parent bf59b76c22
commit 07e190317f
2 changed files with 32 additions and 61 deletions

View File

@ -64,6 +64,17 @@ under the License.
<contains string="${java.vendor}" substring="IBM" casesensitive="false"/>
</condition>
<!-- add addOpens parameter for Java 9 and higher -->
<condition property="addOpens">
<not><matches pattern="1\..*" string="${java.version}"/></not>
</condition>
<!-- add addOpens parameter for Java 10 -->
<condition property="addOpens10">
<matches pattern="10\..*" string="${java.version}"/>
</condition>
<!--
Logging is suppressed by default.
To redirect log output to console, run ant with -Dorg.apache.poi.util.POILogger=org.apache.poi.util.SystemOutLogger
@ -87,6 +98,7 @@ under the License.
<property name="testpattern" value="Test*"/> <!--note: this excludes BaseTest* -->
<property name="POI.testdata.path" location="test-data"/>
<property name="java.awt.headless" value="true"/>
<property name="java.locale.providers" value="JRE,CLDR"/>
<property name="additionaljar" value=""/>
<propertyreset name="user.language" value="en"/>
<propertyreset name="user.country" value="US"/>
@ -1230,14 +1242,15 @@ under the License.
<jvmarg value="-ea"/>
<!-- some "add-opens" and other properties are needed when running with Java 9 or newer -->
<jvmarg value="${java9addmods}" if:set="java9addmods" />
<jvmarg value="${java9addmodsvalue}" if:set="java9addmodsvalue" />
<jvmarg value="${java9addopens1}" if:set="java9addopens1" />
<jvmarg value="${java9addopens2}" if:set="java9addopens2" />
<jvmarg value="${java9addopens3}" if:set="java9addopens3" />
<jvmarg value="${java9addopens4}" if:set="java9addopens4" />
<jvmarg value="${java9addopens5}" if:set="java9addopens5" />
<jvmarg value="${java9addopens6}" if:set="java9addopens6}" />
<jvmarg value="--add-modules=java.xml.bind" if:true="${addOpens10}" />
<jvmarg value="--add-opens=java.base/java.lang=java.xml.bind" if:true="${addOpens10}" />
<jvmarg value="-Dsun.reflect.debugModuleAccessChecks=true" if:true="${addOpens}" />
<jvmarg value="--add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED" if:true="${addOpens}" />
<jvmarg value="--add-opens=java.base/java.io=ALL-UNNAMED" if:true="${addOpens}" />
<jvmarg value="--add-opens=java.base/java.nio=ALL-UNNAMED" if:true="${addOpens}" />
<jvmarg value="--add-opens=java.base/java.lang=ALL-UNNAMED" if:true="${addOpens}" />
<jvmarg value="--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED" if:true="${addOpens}" />
<jvmarg value="-javaagent:${ooxml.lite.agent}=${ooxml.lite.report}|${ooxml.lite.includes}" if:true="${ooxml.lite.agent.exists}"/>
@ -1777,7 +1790,7 @@ under the License.
<include name="org/apache/poi/**"/>
</packageset>
<arg value="${javadoc9addmods}" if:set="${javadoc9addmods}"/>
<arg value="--add-modules=java.xml.bind" if:true="${addOpens10}"/>
<doctitle><![CDATA[<h1>POI API Documentation</h1>]]></doctitle>
<bottom>

View File

@ -25,57 +25,23 @@ def poijobs = [
// the JDK is missing on some slaves so builds are unstable
skipcigame: true
],
[ name: 'POI-DSL-1.10', jdk: '1.10', trigger: triggerSundays,
properties: ['-Djava9addmods=--add-modules=java.xml.bind',
'-Djavadoc9addmods=--add-modules=java.xml.bind',
'-Djava9addmodsvalue=-Dsun.reflect.debugModuleAccessChecks=true',
'-Djava9addopens1=--add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED',
'-Djava9addopens2=--add-opens=java.base/java.io=ALL-UNNAMED',
'-Djava9addopens3=--add-opens=java.base/java.nio=ALL-UNNAMED',
'-Djava9addopens4=--add-opens=java.base/java.lang=ALL-UNNAMED',
'-Djava9addopens5=--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED',
'-Djava9addopens6=--add-opens=java.base/java.lang=java.xml.bind',
'-Djava.locale.providers=JRE,CLDR'],
skipcigame: true
[ name: 'POI-DSL-1.10', jdk: '1.10', trigger: triggerSundays, skipcigame: true
],
[ name: 'POI-DSL-1.11', jdk: '1.11', trigger: triggerSundays,
[ name: 'POI-DSL-1.11', jdk: '1.11', trigger: triggerSundays, skipcigame: true,
// Nodes beam* do not yet have JDK 11 installed
slaveAdd: '&&!beam1&&!beam2&&!beam3&&!beam4&&!beam6&&!beam7&&!beam8&&!beam9&&!beam10&&!beam11&&!beam12&&!beam13&&!beam14&&!beam15&&!beam16',
properties: ['-Djava9addmodsvalue=-Dsun.reflect.debugModuleAccessChecks=true',
'-Djava9addopens1=--add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED',
'-Djava9addopens2=--add-opens=java.base/java.io=ALL-UNNAMED',
'-Djava9addopens3=--add-opens=java.base/java.nio=ALL-UNNAMED',
'-Djava9addopens4=--add-opens=java.base/java.lang=ALL-UNNAMED',
'-Djava9addopens5=--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED',
'-Djava.locale.providers=JRE,CLDR'],
skipcigame: true
slaveAdd: '&&!beam1&&!beam2&&!beam3&&!beam4&&!beam6&&!beam7&&!beam8&&!beam9&&!beam10&&!beam11&&!beam12&&!beam13&&!beam14&&!beam15&&!beam16'
],
[ name: 'POI-DSL-1.12', jdk: '1.12', trigger: triggerSundays,
[ name: 'POI-DSL-1.12', jdk: '1.12', trigger: triggerSundays, skipcigame: true,
// Nodes beam* do not yet have JDK 12 installed
slaveAdd: '&&!beam1&&!beam2&&!beam3&&!beam4&&!beam6&&!beam7&&!beam8&&!beam9&&!beam10&&!beam11&&!beam12&&!beam13&&!beam14&&!beam15&&!beam16',
properties: ['-Djava9addmodsvalue=-Dsun.reflect.debugModuleAccessChecks=true',
'-Djava9addopens1=--add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED',
'-Djava9addopens2=--add-opens=java.base/java.io=ALL-UNNAMED',
'-Djava9addopens3=--add-opens=java.base/java.nio=ALL-UNNAMED',
'-Djava9addopens4=--add-opens=java.base/java.lang=ALL-UNNAMED',
'-Djava9addopens5=--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED',
'-Djava.locale.providers=JRE,CLDR'],
skipcigame: true
// H43 has outdated JDK12 installed
slaveAdd: '&&!beam1&&!beam2&&!beam3&&!beam4&&!beam6&&!beam7&&!beam8&&!beam9&&!beam10&&!beam11&&!beam12&&!beam13&&!beam14&&!beam15&&!beam16&&!H43'
],
[ name: 'POI-DSL-1.13', jdk: '1.13', trigger: triggerSundays,
[ name: 'POI-DSL-1.13', jdk: '1.13', trigger: triggerSundays, skipcigame: true,
// Nodes beam* do not yet have JDK 13 installed
slaveAdd: '&&!beam1&&!beam2&&!beam3&&!beam4&&!beam6&&!beam7&&!beam8&&!beam9&&!beam10&&!beam11&&!beam12&&!beam13&&!beam14&&!beam15&&!beam16',
properties: ['-Djava9addmodsvalue=-Dsun.reflect.debugModuleAccessChecks=true',
'-Djava9addopens1=--add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED',
'-Djava9addopens2=--add-opens=java.base/java.io=ALL-UNNAMED',
'-Djava9addopens3=--add-opens=java.base/java.nio=ALL-UNNAMED',
'-Djava9addopens4=--add-opens=java.base/java.lang=ALL-UNNAMED',
'-Djava9addopens5=--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED',
'-Djava.locale.providers=JRE,CLDR',
// JaCoCo currently fails with "java.lang.NoSuchFieldException: $jacocoAccess",
properties: [// JaCoCo currently fails with "java.lang.NoSuchFieldException: $jacocoAccess",
// need to review/check with newer JDK 13 builds or when at least JaCoCo 0.8.3
'-Dcoverage.enabled=false'],
skipcigame: true
'-Dcoverage.enabled=false']
],
[ name: 'POI-DSL-IBM-JDK', jdk: 'IBMJDK', trigger: triggerSundays, skipcigame: true
],
@ -104,15 +70,7 @@ def poijobs = [
],
[ name: 'POI-DSL-Windows-1.8', trigger: 'H */12 * * *', windows: true, slaves: 'Windows'
],
[ name: 'POI-DSL-Windows-1.12', jdk: '1.12', trigger: triggerSundays, windows: true, slaves: 'Windows',
properties: ['-Djava9addmodsvalue=-Dsun.reflect.debugModuleAccessChecks=true',
'-Djava9addopens1=--add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED',
'-Djava9addopens2=--add-opens=java.base/java.io=ALL-UNNAMED',
'-Djava9addopens3=--add-opens=java.base/java.nio=ALL-UNNAMED',
'-Djava9addopens4=--add-opens=java.base/java.lang=ALL-UNNAMED',
'-Djava9addopens5=--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED',
'-Djava.locale.providers=JRE,CLDR'],
skipcigame: true
[ name: 'POI-DSL-Windows-1.12', jdk: '1.12', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true
],
[ name: 'POI-DSL-Github-PullRequests', trigger: '', githubpr: true, skipcigame: true,
// ensure the file which is needed from the separate documentation module does exist