You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2022/12/27 18:45:16 UTC

svn commit: r1906232 - in /poi/trunk: ./ poi-examples/ poi-examples/src/main/java9/ poi-excelant/ poi-excelant/src/main/java9/ poi-excelant/src/test/java9/ poi-integration/ poi-integration/src/test/java9/ poi-ooxml-full/ poi-ooxml-full/src/main/java9/ ...

Author: fanningpj
Date: Tue Dec 27 18:45:15 2022
New Revision: 1906232

URL: http://svn.apache.org/viewvc?rev=1906232&view=rev
Log:
try to get rid of cached module-info classes

Removed:
    poi/trunk/poi-examples/src/main/java9/module-info.class
    poi/trunk/poi-excelant/src/main/java9/module-info.class
    poi/trunk/poi-excelant/src/test/java9/module-info.class
    poi/trunk/poi-integration/src/test/java9/module-info.class
    poi/trunk/poi-ooxml-full/src/main/java9/module-info.class
    poi/trunk/poi-ooxml-lite-agent/src/main/java9/module-info.class
    poi/trunk/poi-ooxml-lite/src/main/java9/module-info.class
    poi/trunk/poi-ooxml/src/main/java9/module-info.class
    poi/trunk/poi-ooxml/src/test/java9/module-info.class
    poi/trunk/poi-scratchpad/src/main/java9/module-info.class
    poi/trunk/poi-scratchpad/src/test/java9/module-info.class
    poi/trunk/poi/src/main/java9/module-info.class
    poi/trunk/poi/src/test/java9/module-info.class
Modified:
    poi/trunk/build.gradle
    poi/trunk/poi-examples/build.gradle
    poi/trunk/poi-excelant/build.gradle
    poi/trunk/poi-integration/build.gradle
    poi/trunk/poi-ooxml-full/build.gradle
    poi/trunk/poi-ooxml-lite-agent/build.gradle
    poi/trunk/poi-ooxml-lite/build.gradle
    poi/trunk/poi-ooxml/build.gradle
    poi/trunk/poi-scratchpad/build.gradle
    poi/trunk/poi/build.gradle

Modified: poi/trunk/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/build.gradle?rev=1906232&r1=1906231&r2=1906232&view=diff
==============================================================================
--- poi/trunk/build.gradle (original)
+++ poi/trunk/build.gradle Tue Dec 27 18:45:15 2022
@@ -821,19 +821,19 @@ task soLinkCheck() {
 }
 
 var srcDep = [
-    ':poi:cacheJava9',
-    ':poi:cacheTest9',
-    ':poi-ooxml-full:cacheJava9',
-    ':poi-ooxml-lite-agent:cacheJava9',
-    ':poi-ooxml:cacheJava9',
-    ':poi-ooxml:cacheTest9',
-    ':poi-scratchpad:cacheJava9',
-    ':poi-scratchpad:cacheTest9',
-    ':poi-excelant:cacheJava9',
-    ':poi-excelant:cacheTest9',
-    ':poi-examples:cacheJava9',
-    ':poi-integration:cacheTest9',
-    ':poi-ooxml-lite:cacheJava9',
+    ':poi:compileJava9',
+    ':poi:compileTest9',
+    ':poi-ooxml-full:compileJava9',
+    ':poi-ooxml-lite-agent:compileJava9',
+    ':poi-ooxml:compileJava9',
+    ':poi-ooxml:compileTest9',
+    ':poi-scratchpad:compileJava9',
+    ':poi-scratchpad:compileTest9',
+    ':poi-excelant:compileJava9',
+    ':poi-excelant:compileTest9',
+    ':poi-examples:compileJava9',
+    ':poi-integration:compileTest9',
+    ':poi-ooxml-lite:compileJava9',
     ':poi-ooxml-lite:generateModuleInfo'
 ]
 

Modified: poi/trunk/poi-examples/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/poi-examples/build.gradle?rev=1906232&r1=1906231&r2=1906232&view=diff
==============================================================================
--- poi/trunk/poi-examples/build.gradle (original)
+++ poi/trunk/poi-examples/build.gradle Tue Dec 27 18:45:15 2022
@@ -19,9 +19,7 @@ import java.util.regex.Pattern
 
 sourceSets {
     main {
-        if (jdkVersion > 8) {
-            output.dir(JAVA9_OUT, builtBy: 'cacheJava9')
-        }
+        output.dir(JAVA9_OUT, builtBy: 'compileJava9')
     }
 }
 
@@ -72,24 +70,11 @@ task compileJava9(type: JavaCompile) {
     ]
 }
 
-task cacheJava9(type: Copy) {
-    dependsOn 'compileJava9'
-
-    from(file(JAVA9_OUT + VERSIONS9))
-    into(JAVA9_SRC)
-}
-
 jar {
-    dependsOn cacheJava9
+    dependsOn compileJava9
 
     destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
 
-    if (jdkVersion == 8) {
-        into('META-INF/versions/9') {
-            from JAVA9_SRC include '*.class'
-        }
-    }
-
     manifest {
         attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
     }

Modified: poi/trunk/poi-excelant/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/poi-excelant/build.gradle?rev=1906232&r1=1906231&r2=1906232&view=diff
==============================================================================
--- poi/trunk/poi-excelant/build.gradle (original)
+++ poi/trunk/poi-excelant/build.gradle Tue Dec 27 18:45:15 2022
@@ -23,14 +23,10 @@ configurations {
 
 sourceSets {
     main {
-        if (jdkVersion > 8) {
-            output.dir(JAVA9_OUT, builtBy: 'cacheJava9')
-        }
+        output.dir(JAVA9_OUT, builtBy: 'compileJava9')
     }
     test {
-        if (jdkVersion > 8) {
-            output.dir(TEST9_OUT, builtBy: 'cacheTest9')
-        }
+        output.dir(TEST9_OUT, builtBy: 'compileTest9')
     }
 }
 
@@ -82,13 +78,6 @@ task compileJava9(type: JavaCompile) {
     ]
 }
 
-task cacheJava9(type: Copy) {
-    dependsOn 'compileJava9'
-
-    from(file(JAVA9_OUT + VERSIONS9))
-    into(JAVA9_SRC)
-}
-
 task compileTest9(type: JavaCompile) {
     dependsOn 'compileTestJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'
 
@@ -107,24 +96,11 @@ task compileTest9(type: JavaCompile) {
 }
 
 
-task cacheTest9(type: Copy) {
-    dependsOn 'compileTest9'
-
-    from(file(TEST9_OUT + VERSIONS9))
-    into(TEST9_SRC)
-}
-
 jar {
-    dependsOn cacheJava9
+    dependsOn compileJava9
 
     destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
 
-    if (jdkVersion == 8) {
-        into('META-INF/versions/9') {
-            from JAVA9_SRC include '*.class'
-        }
-    }
-
     manifest {
         attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
     }
@@ -146,19 +122,13 @@ sourcesJar {
 
 // Create a separate jar for test-code to depend on it in other projects
 // See http://stackoverflow.com/questions/5144325/gradle-test-dependency
-task testJar(type: Jar, dependsOn: [ testClasses, cacheTest9 ] ) {
+task testJar(type: Jar, dependsOn: [ testClasses, compileTest9 ] ) {
     destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-tests")
 
     classifier 'tests'
     // ignore second module-info.class from main
     duplicatesStrategy = 'exclude'
 
-    if (jdkVersion == 8) {
-        into('META-INF/versions/9') {
-            from TEST9_SRC include '*.class'
-        }
-    }
-
     from sourceSets.test.output + sourceSets.main.output
 
     manifest {

Modified: poi/trunk/poi-integration/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/poi-integration/build.gradle?rev=1906232&r1=1906231&r2=1906232&view=diff
==============================================================================
--- poi/trunk/poi-integration/build.gradle (original)
+++ poi/trunk/poi-integration/build.gradle Tue Dec 27 18:45:15 2022
@@ -29,9 +29,7 @@ configurations {
 
 sourceSets {
     test {
-        if (jdkVersion > 8) {
-            output.dir(TEST9_OUT, builtBy: 'cacheTest9')
-        }
+        output.dir(TEST9_OUT, builtBy: 'compileTest9')
         if (IBMVM) {
             java {
                 exclude '**/HeapDump**'
@@ -121,13 +119,6 @@ task compileTest9(type: JavaCompile) {
 }
 
 
-task cacheTest9(type: Copy) {
-    dependsOn 'compileTest9'
-
-    from(file(TEST9_OUT + VERSIONS9))
-    into(TEST9_SRC)
-}
-
 jar {
     destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
 
@@ -138,19 +129,13 @@ jar {
 
 // Create a separate jar for test-code to depend on it in other projects
 // See http://stackoverflow.com/questions/5144325/gradle-test-dependency
-task testJar(type: Jar, dependsOn: [ testClasses, cacheTest9 ] ) {
+task testJar(type: Jar, dependsOn: [ testClasses, compileTest9 ] ) {
     destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-tests")
 
     classifier 'tests'
     // ignore second module-info.class from main
     duplicatesStrategy = 'exclude'
 
-    if (jdkVersion == 8) {
-        into('META-INF/versions/9') {
-            from TEST9_SRC include '*.class'
-        }
-    }
-
     from sourceSets.test.output + sourceSets.main.output
 
     manifest {

Modified: poi/trunk/poi-ooxml-full/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml-full/build.gradle?rev=1906232&r1=1906231&r2=1906232&view=diff
==============================================================================
--- poi/trunk/poi-ooxml-full/build.gradle (original)
+++ poi/trunk/poi-ooxml-full/build.gradle Tue Dec 27 18:45:15 2022
@@ -26,9 +26,7 @@ sourceSets {
         // TypeSystemHolder.class is in the resources
         output.dir(BEANS_RES, builtBy: 'generate_beans')
         compileClasspath += files(BEANS_RES)
-        if (jdkVersion > 8) {
-            output.dir(JAVA9_OUT, builtBy: 'cacheJava9')
-        }
+        output.dir(JAVA9_OUT, builtBy: 'compileJava9')
         java {
             srcDirs = [BEANS_SRC]
         }
@@ -73,13 +71,6 @@ task compileJava9(type: JavaCompile) {
     ]
 }
 
-task cacheJava9(type: Copy) {
-    dependsOn 'compileJava9'
-
-    from(file(JAVA9_OUT + VERSIONS9))
-    into(JAVA9_SRC)
-}
-
 task copy_xsds(type: Copy) {
     from ('src/main/xmlschema/org/apache/poi/xdgf')
     from ('src/main/xmlschema/org/apache/poi/schemas') {
@@ -142,12 +133,6 @@ task sourceJar(type: Jar) {
 jar {
     dependsOn 'sourceJar'
 
-    if (jdkVersion == 8) {
-        into('META-INF/versions/9') {
-            from JAVA9_SRC include '*.class'
-        }
-    }
-
     manifest {
         attributes ('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
     }

Modified: poi/trunk/poi-ooxml-lite-agent/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml-lite-agent/build.gradle?rev=1906232&r1=1906231&r2=1906232&view=diff
==============================================================================
--- poi/trunk/poi-ooxml-lite-agent/build.gradle (original)
+++ poi/trunk/poi-ooxml-lite-agent/build.gradle Tue Dec 27 18:45:15 2022
@@ -17,9 +17,7 @@
 
 sourceSets {
     main {
-        if (jdkVersion > 8) {
-            output.dir(JAVA9_OUT, builtBy: 'cacheJava9')
-        }
+        output.dir(JAVA9_OUT, builtBy: 'compileJava9')
     }
 }
 
@@ -57,22 +55,9 @@ task compileJava9(type: JavaCompile) {
     }
 }
 
-task cacheJava9(type: Copy) {
-    dependsOn 'compileJava9'
-
-    from(file(JAVA9_OUT + VERSIONS9))
-    into(JAVA9_SRC)
-}
-
 jar {
     destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
 
-    if (jdkVersion == 8) {
-        into('META-INF/versions/9') {
-            from JAVA9_SRC include '*.class'
-        }
-    }
-
     manifest {
         attributes (
             'Automatic-Module-Name' : MODULE_NAME,

Modified: poi/trunk/poi-ooxml-lite/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml-lite/build.gradle?rev=1906232&r1=1906231&r2=1906232&view=diff
==============================================================================
--- poi/trunk/poi-ooxml-lite/build.gradle (original)
+++ poi/trunk/poi-ooxml-lite/build.gradle Tue Dec 27 18:45:15 2022
@@ -22,9 +22,7 @@ final String BEANS_RES = "${buildDir}/ge
 
 sourceSets {
     main {
-        if (jdkVersion > 8) {
-            output.dir(JAVA9_OUT, builtBy: 'cacheJava9')
-        }
+        output.dir(JAVA9_OUT, builtBy: 'compileJava9')
         compileClasspath += files(BEANS_RES)
         java {
             srcDirs += BEANS_SRC
@@ -116,11 +114,6 @@ task compileJava9(type: JavaCompile, dep
     }
 }
 
-task cacheJava9(type: Copy, dependsOn: 'compileJava9') {
-    from(file(JAVA9_OUT + VERSIONS9))
-    into(JAVA9_SRC)
-}
-
 jar {
     destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
 
@@ -138,12 +131,6 @@ jar {
         }
     }
 
-    if (jdkVersion == 8) {
-        into('META-INF/versions/9') {
-            from JAVA9_SRC include '*.class'
-        }
-    }
-
     // ignore second module-info.class from poi-ooxml-full
     // duplicatesStrategy = 'exclude'
     includeEmptyDirs = false

Modified: poi/trunk/poi-ooxml/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/build.gradle?rev=1906232&r1=1906231&r2=1906232&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/build.gradle (original)
+++ poi/trunk/poi-ooxml/build.gradle Tue Dec 27 18:45:15 2022
@@ -35,14 +35,10 @@ configurations {
 
 sourceSets {
     main {
-        if (jdkVersion > 8) {
-            output.dir(JAVA9_OUT, builtBy: 'cacheJava9')
-        }
+        output.dir(JAVA9_OUT, builtBy: 'compileJava9')
     }
     test {
-        if (jdkVersion > 8) {
-            output.dir(TEST9_OUT, builtBy: 'cacheTest9')
-        }
+        output.dir(TEST9_OUT, builtBy: 'compileTest9')
     }
 }
 
@@ -175,13 +171,6 @@ task compileJava9(type: JavaCompile) {
     ]
 }
 
-task cacheJava9(type: Copy) {
-    dependsOn 'compileJava9'
-
-    from(file(JAVA9_OUT + VERSIONS9))
-    into(JAVA9_SRC)
-}
-
 task compileTest9(type: JavaCompile) {
     dependsOn 'compileTestJava', ':poi:testJar'
 
@@ -200,22 +189,9 @@ task compileTest9(type: JavaCompile) {
 }
 
 
-task cacheTest9(type: Copy) {
-    dependsOn 'compileTest9'
-
-    from(file(TEST9_OUT + VERSIONS9))
-    into(TEST9_SRC)
-}
-
 jar {
     destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
 
-    if (jdkVersion == 8) {
-        into('META-INF/versions/9') {
-            from JAVA9_SRC include '*.class'
-        }
-    }
-
     manifest {
         attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
     }
@@ -230,12 +206,6 @@ task testJar(type: Jar, dependsOn: testC
     // ignore second module-info.class from main
     duplicatesStrategy = 'exclude'
 
-    if (jdkVersion == 8) {
-        into('META-INF/versions/9') {
-            from TEST9_SRC include '*.class'
-        }
-    }
-
     from sourceSets.test.output + sourceSets.main.output
 
     manifest {

Modified: poi/trunk/poi-scratchpad/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/poi-scratchpad/build.gradle?rev=1906232&r1=1906231&r2=1906232&view=diff
==============================================================================
--- poi/trunk/poi-scratchpad/build.gradle (original)
+++ poi/trunk/poi-scratchpad/build.gradle Tue Dec 27 18:45:15 2022
@@ -24,14 +24,10 @@ configurations {
 
 sourceSets {
     main {
-        if (jdkVersion > 8) {
-            output.dir(JAVA9_OUT, builtBy: 'cacheJava9')
-        }
+        output.dir(JAVA9_OUT, builtBy: 'compileJava9')
     }
     test {
-        if (jdkVersion > 8) {
-            output.dir(TEST9_OUT, builtBy: 'cacheTest9')
-        }
+        output.dir(TEST9_OUT, builtBy: 'compileTest9')
     }
 }
 
@@ -78,13 +74,6 @@ task compileJava9(type: JavaCompile) {
     ]
 }
 
-task cacheJava9(type: Copy) {
-    dependsOn 'compileJava9'
-
-    from(file(JAVA9_OUT + VERSIONS9))
-    into(JAVA9_SRC)
-}
-
 task compileTest9(type: JavaCompile) {
     dependsOn 'compileTestJava', ':poi:jar'
 
@@ -103,22 +92,9 @@ task compileTest9(type: JavaCompile) {
 }
 
 
-task cacheTest9(type: Copy) {
-    dependsOn 'compileTest9'
-
-    from(file(TEST9_OUT + VERSIONS9))
-    into(TEST9_SRC)
-}
-
 jar {
     destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
 
-    if (jdkVersion == 8) {
-        into('META-INF/versions/9') {
-            from JAVA9_SRC include '*.class'
-        }
-    }
-
     manifest {
         attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
     }
@@ -133,12 +109,6 @@ task testJar(type: Jar, dependsOn: testC
     // ignore second module-info.class from main
     duplicatesStrategy = 'exclude'
 
-    if (jdkVersion == 8) {
-        into('META-INF/versions/9') {
-            from TEST9_SRC include '*.class'
-        }
-    }
-
     from sourceSets.test.output + sourceSets.main.output
 
     manifest {

Modified: poi/trunk/poi/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/poi/build.gradle?rev=1906232&r1=1906231&r2=1906232&view=diff
==============================================================================
--- poi/trunk/poi/build.gradle (original)
+++ poi/trunk/poi/build.gradle Tue Dec 27 18:45:15 2022
@@ -24,18 +24,14 @@ configurations {
 
 sourceSets {
     main {
-        if (jdkVersion > 8) {
-            output.dir(JAVA9_OUT, builtBy: 'cacheJava9')
-        }
+        output.dir(JAVA9_OUT, builtBy: 'compileJava9')
         java {
             // also include the generated Version.java
             srcDirs += 'build/generated-sources'
         }
     }
     test {
-        if (jdkVersion > 8) {
-            output.dir(TEST9_OUT, builtBy: 'cacheTest9')
-        }
+        output.dir(TEST9_OUT, builtBy: 'compileTest9')
     }
 }
 
@@ -46,7 +42,6 @@ dependencies {
     api "commons-io:commons-io:${commonsIoVersion}"
     api 'com.zaxxer:SparseBitSet:1.2'
     api "org.apache.logging.log4j:log4j-api:${log4jVersion}"
-    // implementation 'javax.activation:activation:1.1.1'
 
     testImplementation 'org.reflections:reflections:0.10.2'
     testImplementation 'org.apache.ant:ant:1.10.12'
@@ -107,13 +102,6 @@ task compileJava9(type: JavaCompile) {
     ]
 }
 
-task cacheJava9(type: Copy) {
-    dependsOn 'compileJava9'
-
-    from(file(JAVA9_OUT + VERSIONS9))
-    into(JAVA9_SRC)
-}
-
 task compileTest9(type: JavaCompile) {
     dependsOn 'compileTestJava'
 
@@ -131,22 +119,8 @@ task compileTest9(type: JavaCompile) {
     classpath = files()
 }
 
-
-task cacheTest9(type: Copy) {
-    dependsOn 'compileTest9'
-
-    from(file(TEST9_OUT + VERSIONS9))
-    into(TEST9_SRC)
-}
-
 jar {
-    dependsOn cacheJava9
-
-    if (jdkVersion == 8) {
-        into('META-INF/versions/9') {
-            from JAVA9_SRC include '*.class'
-        }
-    }
+    dependsOn compileJava9
 
     manifest {
         attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
@@ -155,19 +129,13 @@ jar {
 
 // Create a separate jar for test-code to depend on it in other projects
 // See http://stackoverflow.com/questions/5144325/gradle-test-dependency
-task testJar(type: Jar, dependsOn: [ testClasses, cacheTest9 ]) {
+task testJar(type: Jar, dependsOn: [ testClasses, compileTest9 ]) {
     destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-tests")
 
     classifier 'tests'
     // ignore second module-info.class from main
     duplicatesStrategy = 'exclude'
 
-    if (jdkVersion == 8) {
-        into('META-INF/versions/9') {
-            from TEST9_SRC include '*.class'
-        }
-    }
-
     from sourceSets.test.output + sourceSets.main.output
 
     manifest {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org