diff --git a/README.rst b/README.rst index 8578fbdaac..25cf27288c 100644 --- a/README.rst +++ b/README.rst @@ -55,12 +55,12 @@ Source code: * Official `Apache Git repo`_ at apache.org -Requires Java 1.8 or later. +Requires Java 11 or later. Contributing ------------------ -* Download and install git, Java JDK 1.8+, and Apache Ant 1.8+ or Gradle +* Download and install git, Java JDK 11+, and Apache Ant 1.8+ or Gradle * Check out the code from git diff --git a/build.gradle b/build.gradle index 273b425aa6..f53115329a 100644 --- a/build.gradle +++ b/build.gradle @@ -124,7 +124,7 @@ subprojects { xmlSecVersion = '3.0.6' apiGuardianVersion = '1.1.2' - jdkVersion = (project.properties['jdkVersion'] ?: '8') as int + jdkVersion = (project.properties['jdkVersion'] ?: '11') as int // see https://github.com/gradle/gradle/blob/master/subprojects/jvm-services/src/main/java/org/gradle/internal/jvm/inspection/JvmVendor.java jdkVendor = (project.properties['jdkVendor'] ?: '') as String @@ -205,7 +205,7 @@ subprojects { doFirst { options { - if (jdkVersion > 8) addBooleanOption('html5', true) + addBooleanOption('html5', true) addBooleanOption('Xdoclint:all,-missing', true) links 'https://poi.apache.org/apidocs/dev/' if (jdkVersion >= 23) links 'https://docs.oracle.com/en/java/javase/23/docs/api/' else links 'https://docs.oracle.com/javase/8/docs/api/' @@ -213,7 +213,7 @@ subprojects { links 'https://commons.apache.org/proper/commons-compress/apidocs/' use = true splitIndex = true - source = "1.8" + source = "1.11" } } } @@ -414,27 +414,25 @@ subprojects { systemProperties['java.locale.providers'] = 'JRE,CLDR' doFirst { - if (jdkVersion > 8) { - // some options were removed in JDK 18 - if (jdkVersion < 18) { - jvmArgs += [ - '--illegal-access=warn', - ] - } - + // some options were removed in JDK 18 + if (jdkVersion < 18) { jvmArgs += [ - // see https://github.com/java9-modularity/gradle-modules-plugin/issues/97 - // opposed to the recommendation there, it doesn't work to add ... to the dependencies - // testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.13.2' - // gradles gradle-worker.jar is still not a JPMS module and thus runs as unnamed module - '--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=org.apache.poi.poi', - '--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED', - '--add-exports','org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED', - - '-Dsun.reflect.debugModuleAccessChecks=true', - '-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true', + '--illegal-access=warn', ] } + + jvmArgs += [ + // see https://github.com/java9-modularity/gradle-modules-plugin/issues/97 + // opposed to the recommendation there, it doesn't work to add ... to the dependencies + // testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.13.2' + // gradles gradle-worker.jar is still not a JPMS module and thus runs as unnamed module + '--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=org.apache.poi.poi', + '--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED', + '--add-exports','org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED', + + '-Dsun.reflect.debugModuleAccessChecks=true', + '-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true', + ] } jacoco { @@ -739,7 +737,7 @@ task jenkinsLite(dependsOn: [ if (!f.exists()) { println 'writing file ' + f.getAbsolutePath() f.getParentFile().mkdirs() - new URL('https://ci-builds.apache.org/job/POI/job/POI-XMLBeans-DSL-1.8/lastSuccessfulBuild/artifact/build/xmlbeans-5.0.0.jar').withInputStream{ i -> f.withOutputStream{ it << i }} + new URL('https://ci-builds.apache.org/job/POI/job/POI-XMLBeans-DSL-1.11/lastSuccessfulBuild/artifact/build/xmlbeans-5.0.0.jar').withInputStream{ i -> f.withOutputStream{ it << i }} } }*/ diff --git a/build.xml b/build.xml index 63b8a4c20e..0e70f9c0a5 100644 --- a/build.xml +++ b/build.xml @@ -26,7 +26,7 @@ under the License. To build the documentation you will need to install forrest and set the FORREST_HOME environment variable. - Since POI 4.0 you will need JDK 1.8 or newer to build and run POI. + Since POI 6.0 you will need JDK 11 or newer to build and run POI. Some people may find the tests hang when run through Ant. If this happens to you, try giving Ant some more memory when you run it, eg: @@ -60,8 +60,8 @@ under the License. - - + + @@ -69,7 +69,7 @@ under the License. - + @@ -296,11 +296,11 @@ under the License. - - - + + + - + diff --git a/osgi/README.md b/osgi/README.md index d6042126b6..c1c348168d 100644 --- a/osgi/README.md +++ b/osgi/README.md @@ -29,7 +29,7 @@ These are required to sign or validate signed Office documents. The OSGi bundles - XML Commons Resolver: https://mvnrepository.com/artifact/xml-resolver/xml-resolver/1.2-osgi - - Bouncy Castle: https://mvnrepository.com/artifact/org.bouncycastle/bcprov-ext-jdk18on/1.81, https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk18on/1.81 + - Bouncy Castle: https://mvnrepository.com/artifact/org.bouncycastle/bcprov-ext-jdk18on/1.82, https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk18on/1.82 4. PDFBox and PDFBox Graphics2D Required to render to PDF documents. The required jars can be downloaded from: diff --git a/osgi/pom.xml b/osgi/pom.xml index 6a3ed4c277..99899b7b71 100644 --- a/osgi/pom.xml +++ b/osgi/pom.xml @@ -39,8 +39,8 @@ maven-compiler-plugin 3.8.0 - 1.8 - 1.8 + 11 + 11 diff --git a/poi-examples/build.gradle b/poi-examples/build.gradle index 832485358c..8c494e67d6 100644 --- a/poi-examples/build.gradle +++ b/poi-examples/build.gradle @@ -53,8 +53,8 @@ tasks.register('compileJava9', JavaCompile) { javaCompiler = javaToolchains.compilerFor { languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion)) } - sourceCompatibility = 1.9 - targetCompatibility = 1.9 + sourceCompatibility = 1.11 + targetCompatibility = 1.11 destinationDirectory = file(JAVA9_OUT + VERSIONS9) source = file(JAVA9_SRC) classpath = files() diff --git a/poi-excelant/build.gradle b/poi-excelant/build.gradle index 9bcfa821ba..3b849a107a 100644 --- a/poi-excelant/build.gradle +++ b/poi-excelant/build.gradle @@ -142,13 +142,9 @@ test { doFirst { jvmArgs += [ "-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}", + '--add-modules', MODULE_NAME, + '--module-path', '../build/dist/maven/poi-excelant-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath, ] - if (jdkVersion > 8) { - jvmArgs += [ - '--add-modules', MODULE_NAME, - '--module-path', '../build/dist/maven/poi-excelant-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath, - ] - } } } diff --git a/poi-integration/build.gradle b/poi-integration/build.gradle index 4328dae3e6..09094a88ce 100644 --- a/poi-integration/build.gradle +++ b/poi-integration/build.gradle @@ -143,20 +143,13 @@ test { dependsOn { testJar } systemProperties['junit.jupiter.execution.parallel.enabled'] = 'true' - if (jdkVersion == 8) { - systemProperties['sun.java2d.renderer'] = 'sun.java2d.marlin.MarlinRenderingEngine' - } doFirst { jvmArgs += [ "-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}", + '--add-modules', MODULE_NAME, + '--module-path', '../build/dist/maven/poi-integration-tests' + File.pathSeparator + files(MODULE_RUNTIME_PATH).asPath, ] - if (jdkVersion > 8) { - jvmArgs += [ - '--add-modules', MODULE_NAME, - '--module-path', '../build/dist/maven/poi-integration-tests' + File.pathSeparator + files(MODULE_RUNTIME_PATH).asPath, - ] - } if (NO_SCRATCHPAD) { systemProperty 'scratchpad.ignore', 'true' } diff --git a/poi-integration/build.xml b/poi-integration/build.xml index e3974c50e5..89fcd6b184 100644 --- a/poi-integration/build.xml +++ b/poi-integration/build.xml @@ -126,7 +126,7 @@ Before running this, you should execute the "jar" target in the main build.gradl @@ -150,7 +150,7 @@ Before running this, you should execute the "jar" target in the main build.gradl diff --git a/poi-ooxml-full/build.gradle b/poi-ooxml-full/build.gradle index 4495a6c8b4..61dc57c980 100644 --- a/poi-ooxml-full/build.gradle +++ b/poi-ooxml-full/build.gradle @@ -60,8 +60,8 @@ tasks.register('compileJava9', JavaCompile) { javaCompiler = javaToolchains.compilerFor { languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion)) } - sourceCompatibility = 1.9 - targetCompatibility = 1.9 + sourceCompatibility = 1.11 + targetCompatibility = 1.11 destinationDirectory = file(JAVA9_OUT + VERSIONS9) source = file(JAVA9_SRC) classpath = files() diff --git a/poi-ooxml-lite-agent/build.gradle b/poi-ooxml-lite-agent/build.gradle index 8964cab094..4286a57abc 100644 --- a/poi-ooxml-lite-agent/build.gradle +++ b/poi-ooxml-lite-agent/build.gradle @@ -42,8 +42,8 @@ tasks.register('compileJava9', JavaCompile) { javaCompiler = javaToolchains.compilerFor { languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion)) } - sourceCompatibility = 1.9 - targetCompatibility = 1.9 + sourceCompatibility = 1.11 + targetCompatibility = 1.11 destinationDirectory = file(JAVA9_OUT + VERSIONS9) source = file(JAVA9_SRC) classpath = files() diff --git a/poi-ooxml-lite/build.gradle b/poi-ooxml-lite/build.gradle index 655b8fc32c..921f41ef50 100644 --- a/poi-ooxml-lite/build.gradle +++ b/poi-ooxml-lite/build.gradle @@ -93,8 +93,8 @@ task compileJava9(type: JavaCompile, dependsOn: 'compileJava') { javaCompiler = javaToolchains.compilerFor { languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion)) } - sourceCompatibility = 1.9 - targetCompatibility = 1.9 + sourceCompatibility = 1.11 + targetCompatibility = 1.11 destinationDirectory = file(JAVA9_OUT + VERSIONS9) source = file(JAVA9_SRC) classpath = files() diff --git a/poi-ooxml/build.gradle b/poi-ooxml/build.gradle index c63cb57474..d4217cbe41 100644 --- a/poi-ooxml/build.gradle +++ b/poi-ooxml/build.gradle @@ -157,8 +157,8 @@ tasks.register('compileJava9', JavaCompile) { javaCompiler = javaToolchains.compilerFor { languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion)) } - sourceCompatibility = 1.9 - targetCompatibility = 1.9 + sourceCompatibility = 11 + targetCompatibility = 11 destinationDirectory = file(JAVA9_OUT + VERSIONS9) source = file(JAVA9_SRC) classpath = files() @@ -174,8 +174,8 @@ tasks.register('compileTest9', JavaCompile) { javaCompiler = javaToolchains.compilerFor { languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion)) } - sourceCompatibility = 1.9 - targetCompatibility = 1.9 + sourceCompatibility = 1.11 + targetCompatibility = 1.11 destinationDirectory = file(TEST9_OUT + VERSIONS9) source = file(TEST9_SRC) options.compilerArgs = [ @@ -214,12 +214,12 @@ javadoc { failOnError = true doFirst { options { - if (jdkVersion > 8) addBooleanOption('html5', true) + addBooleanOption('html5', true) links 'https://poi.apache.org/apidocs/dev/' if (jdkVersion >= 23) links 'https://docs.oracle.com/en/java/javase/23/docs/api/' else links 'https://docs.oracle.com/javase/8/docs/api/' use = true splitIndex = true - source = "1.8" + source = "1.11" classpath += configurations.javadocs.files } } @@ -250,9 +250,6 @@ test { dependsOn { testJar } systemProperties['junit.jupiter.execution.parallel.enabled'] = 'true' - if (jdkVersion == 8) { - systemProperties['sun.java2d.renderer'] = 'sun.java2d.marlin.MarlinRenderingEngine' - } if (NO_SCRATCHPAD) { useJUnitPlatform { @@ -265,13 +262,9 @@ test { "-Xverify:all", "-XX:ErrorFile=../build/hs_err_pid%p.log", "-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}" + '--add-modules', MODULE_NAME, + '--module-path', '../build/dist/maven/poi-ooxml-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath, ] - if (jdkVersion > 8) { - jvmArgs += [ - '--add-modules', MODULE_NAME, - '--module-path', '../build/dist/maven/poi-ooxml-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath, - ] - } } } diff --git a/poi-scratchpad/build.gradle b/poi-scratchpad/build.gradle index 3cfec7a5de..544d0f64fa 100644 --- a/poi-scratchpad/build.gradle +++ b/poi-scratchpad/build.gradle @@ -58,8 +58,8 @@ tasks.register('compileJava9', JavaCompile) { javaCompiler = javaToolchains.compilerFor { languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion)) } - sourceCompatibility = 1.9 - targetCompatibility = 1.9 + sourceCompatibility = 1.11 + targetCompatibility = 1.11 destinationDirectory = file(JAVA9_OUT + VERSIONS9) source = file(JAVA9_SRC) classpath = files() @@ -75,8 +75,8 @@ tasks.register('compileTest9', JavaCompile) { javaCompiler = javaToolchains.compilerFor { languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion)) } - sourceCompatibility = 1.9 - targetCompatibility = 1.9 + sourceCompatibility = 1.11 + targetCompatibility = 1.11 destinationDirectory = file(TEST9_OUT + VERSIONS9) source = file(TEST9_SRC) options.compilerArgs = [ @@ -147,12 +147,10 @@ test { systemProperties['junit.jupiter.execution.parallel.enabled'] = 'true' doFirst { - if (jdkVersion > 8) { - jvmArgs += [ - '--add-modules', MODULE_NAME, - '--module-path', '../build/dist/maven/poi-scratchpad-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath, - ] - } + jvmArgs += [ + '--add-modules', MODULE_NAME, + '--module-path', '../build/dist/maven/poi-scratchpad-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath, + ] } } diff --git a/poi/build.gradle b/poi/build.gradle index f42e93fb81..5871af6296 100644 --- a/poi/build.gradle +++ b/poi/build.gradle @@ -172,12 +172,10 @@ test { systemProperties['junit.jupiter.execution.parallel.enabled'] = 'true' doFirst { - if (jdkVersion > 8) { - jvmArgs += [ - '--add-modules', MODULE_NAME, - '--module-path', '../build/dist/maven/poi-tests' + File.pathSeparator + files(MODULE_PATH).asPath, - ] - } + jvmArgs += [ + '--add-modules', MODULE_NAME, + '--module-path', '../build/dist/maven/poi-tests' + File.pathSeparator + files(MODULE_PATH).asPath, + ] } } diff --git a/src/documentation/RELEASE-NOTES.txt b/src/documentation/RELEASE-NOTES.txt index c394295b0a..f6a4de7fb4 100644 --- a/src/documentation/RELEASE-NOTES.txt +++ b/src/documentation/RELEASE-NOTES.txt @@ -19,7 +19,7 @@ Release Contents This release comes in source form: - source archive you can build POI from (poi-src-@VERSION@-@DSTAMP@.zip or poi-src-@VERSION@-@DSTAMP@.tar.gz) - Unpack the archive and use the following command to build all POI components with JDK 1.8 or higher: + Unpack the archive and use the following command to build all POI components with JDK 11 or higher: gradle jar diff --git a/src/documentation/content/xdocs/components/index.xml b/src/documentation/content/xdocs/components/index.xml index 7264361237..c10d8a7978 100644 --- a/src/documentation/content/xdocs/components/index.xml +++ b/src/documentation/content/xdocs/components/index.xml @@ -338,8 +338,8 @@ poi-ooxml-full (known as ooxml-schemas) xmlbeans
For signing: - bcpkix-jdk18on, - bcprov-jdk18on, + bcpkix-jdk18on, + bcprov-jdk18on, xmlsec, slf4j-api diff --git a/src/documentation/content/xdocs/devel/nightly.xml b/src/documentation/content/xdocs/devel/nightly.xml index cbc29e2cc4..92df5af1d9 100644 --- a/src/documentation/content/xdocs/devel/nightly.xml +++ b/src/documentation/content/xdocs/devel/nightly.xml @@ -34,7 +34,7 @@

  • - + Last Successful Jenkins build for POI-trunk
  • diff --git a/src/documentation/content/xdocs/encryption.xml b/src/documentation/content/xdocs/encryption.xml index 4d0839c926..d5cb5b9475 100644 --- a/src/documentation/content/xdocs/encryption.xml +++ b/src/documentation/content/xdocs/encryption.xml @@ -249,7 +249,7 @@

    The classes have been tested against the following libraries, which need to be included additionally to the default dependencies:

      -
    • BouncyCastle bcpkix, bcprov and bcutil (tested against 1.81)
    • +
    • BouncyCastle bcpkix, bcprov and bcutil (tested against 1.82)
    • Apache Santuario "xmlsec" (tested against 3.0.5)
    • and slf4j-api (tested against 2.0.x)
    diff --git a/src/documentation/release-guide.txt b/src/documentation/release-guide.txt index 53cac95f08..9a60a491b7 100644 --- a/src/documentation/release-guide.txt +++ b/src/documentation/release-guide.txt @@ -35,7 +35,7 @@ 2b. You must be a member of the committee group 3. Release manager must have their public key appended to the KEYS file checked in to SVN and the key published on one of the public key servers. More info can be found here: https://www.apache.org/dev/release-signing.html - 4. You must have Java JDK 1.8 installed and active. + 4. You must have Java JDK 11 installed and active. 5. You must have the following utilities installed on your local machine and available in your path: * ssh * gnupg @@ -102,9 +102,9 @@ svn update --set-depth infinity dist/release/poi/ - build.gradle - osgi/pom.xml (version and poi.version) - 2. Force a new build at https://ci-builds.apache.org/job/POI/job/POI-DSL-1.8 + 2. Force a new build at https://ci-builds.apache.org/job/POI/job/POI-DSL-1.11 - when build completes, download the built jars from - https://ci-builds.apache.org/job/POI/job/POI-DSL-1.8/lastSuccessfulBuild/artifact/ + https://ci-builds.apache.org/job/POI/job/POI-DSL-1.11/lastSuccessfulBuild/artifact/ 3. To produce the source distributions, run - ./gradlew srcDistZip @@ -146,8 +146,8 @@ find . -name "*.asc" -exec gpg --no-secmem-warning --verify {} \; (III) Deploy Jars to Maven Staging 1. Ensure that there has been a build with the right svn commit and then download the jars - - https://ci-builds.apache.org/job/POI/job/POI-DSL-1.8 - - https://ci-builds.apache.org/job/POI/job/POI-DSL-1.8/lastSuccessfulBuild/artifact/ + - https://ci-builds.apache.org/job/POI/job/POI-DSL-1.11 + - https://ci-builds.apache.org/job/POI/job/POI-DSL-1.11/lastSuccessfulBuild/artifact/ 2. Set up a `poi-prep` directory and copy all the jars other than the `test` jars into it. - The artifacts in the archive.zip that you can download (see 1 above) are grouped in different dirs