]> source.dussan.org Git - poi.git/commitdiff
try to fix build for Java 9+
authorPJ Fanning <fanningpj@apache.org>
Sat, 22 Jan 2022 14:28:17 +0000 (14:28 +0000)
committerPJ Fanning <fanningpj@apache.org>
Sat, 22 Jan 2022 14:28:17 +0000 (14:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897343 13f79535-47bb-0310-9956-ffa450edef68

poi-ooxml/build.gradle
poi-scratchpad/build.gradle

index be0b51868cc7ce2b5459df3a717f3b279a464f14..b15b104ea8d21e201f7a9277adecde8c263a73cf 100644 (file)
@@ -204,6 +204,7 @@ task compileTest9(type: JavaCompile) {
     destinationDirectory = file(TEST9_OUT + VERSIONS9)
     source = file(TEST9_SRC)
     options.compilerArgs = [
+        '--patch-module', "org.apache.poi.poi=${projectDir}/../poi/build/classes/java/main",
         '--patch-module', "${MODULE_NAME}=${(sourceSets.main.output.classesDirs + sourceSets.test.output.classesDirs).asPath}",
         '--module-path', files(TEST_MODULE_PATH).asPath
     ]
@@ -320,12 +321,14 @@ test {
             "-XX:ErrorFile=../build/hs_err_pid%p.log",
             "-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}"
         ]
+        /*
         if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
             jvmArgs += [
                 '--add-modules', MODULE_NAME,
                 '--module-path', '../build/dist/maven/poi-ooxml-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath,
             ]
         }
+        */
     }
 }
 
index 704f33cb8e913e4dc8476b860ae820c8e3ac519e..917ae37673ebe033220db0fec7c9494e8c33e98e 100644 (file)
@@ -90,6 +90,7 @@ task compileTest9(type: JavaCompile) {
     destinationDirectory = file(TEST9_OUT + VERSIONS9)
     source = file(TEST9_SRC)
     options.compilerArgs = [
+        '--patch-module', "org.apache.poi.poi=${projectDir}/../poi/build/classes/java/main",
         '--patch-module', "${MODULE_NAME}=${(sourceSets.main.output.classesDirs + sourceSets.test.output.classesDirs).asPath}",
         '--module-path', files(TEST_MODULE_PATH).asPath
     ]
@@ -175,14 +176,16 @@ test {
 
     systemProperties['junit.jupiter.execution.parallel.enabled'] = 'true'
 
+    /*
     doFirst {
         if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
             jvmArgs += [
                 '--add-modules', MODULE_NAME,
-                '--module-path', '../build/dist/maven/poi-scratchpad-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath,
+                '--module-path', '${projectDir}/../build/dist/maven/poi-scratchpad-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath,
             ]
         }
     }
+    */
 }
 
 publishing {