From a3f0121147c3fb708b17795e7906a92a2bde2331 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Thu, 25 Nov 2021 10:05:00 +0000 Subject: [PATCH] saxon test git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1895319 13f79535-47bb-0310-9956-ffa450edef68 --- build.gradle | 1 + jenkins/create_jobs.groovy | 5 +++++ poi-examples/build.gradle | 4 ++++ poi-excelant/build.gradle | 6 +++++- poi-integration/build.gradle | 6 +++++- poi-ooxml/build.gradle | 5 ++++- poi-scratchpad/build.gradle | 6 +++++- poi/build.gradle | 6 +++++- 8 files changed, 34 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index d8d4d8e566..da789acb7a 100644 --- a/build.gradle +++ b/build.gradle @@ -132,6 +132,7 @@ subprojects { VERSIONS9 = 'META-INF/versions/9' NO_SCRATCHPAD = (findProperty("scratchpad.ignore") == "true") + SAXON_TEST = (findProperty("saxon.test") == "true") } configurations { diff --git a/jenkins/create_jobs.groovy b/jenkins/create_jobs.groovy index a14b9bebb7..8cddebe02c 100644 --- a/jenkins/create_jobs.groovy +++ b/jenkins/create_jobs.groovy @@ -67,6 +67,8 @@ def poijobs = [ // ], [ name: 'POI-DSL-no-scratchpad', trigger: triggerSundays, noScratchpad: true, gradle: true ], + [ name: 'POI-DSL-saxon-test', trigger: triggerSundays, saxonTest: true, gradle: true + ], // [ name: 'POI-DSL-SonarQube', jdk: '1.11', trigger: 'H 7 * * *', maven: true, sonar: true, skipcigame: true, // email: 'kiwiwings@apache.org', // // replaced by Gradle-based build now @@ -424,6 +426,9 @@ poijobs.each { poijob -> if (poijob.noScratchpad) { switches('-Pscratchpad.ignore=true') } + if (poijob.saxonTest) { + switches('-Psaxon.test=true') + } } } else { ant { diff --git a/poi-examples/build.gradle b/poi-examples/build.gradle index 5c1c7a54e5..97567a4927 100644 --- a/poi-examples/build.gradle +++ b/poi-examples/build.gradle @@ -45,6 +45,10 @@ dependencies { } } testImplementation project(path: ':poi', configuration: 'tests') + + if (SAXON_TEST) { + testRuntimeOnly 'net.sf.saxon:Saxon-HE:10.6' + } } final String MODULE_NAME = 'org.apache.poi.examples' diff --git a/poi-excelant/build.gradle b/poi-excelant/build.gradle index 3838b58e8d..b59f595f8d 100644 --- a/poi-excelant/build.gradle +++ b/poi-excelant/build.gradle @@ -47,7 +47,11 @@ dependencies { } testImplementation 'com.google.guava:guava:31.0.1-jre' testImplementation "org.apache.logging.log4j:log4j-slf4j18-impl:${log4jVersion}" - testImplementation 'org.apiguardian:apiguardian-api:1.1.2' + testRuntimeOnly 'org.apiguardian:apiguardian-api:1.1.2' + + if (SAXON_TEST) { + testRuntimeOnly 'net.sf.saxon:Saxon-HE:10.6' + } } final String MODULE_NAME = 'org.apache.poi.excelant' diff --git a/poi-integration/build.gradle b/poi-integration/build.gradle index e6eafcbb8f..7dc9f3ebe7 100644 --- a/poi-integration/build.gradle +++ b/poi-integration/build.gradle @@ -78,7 +78,11 @@ dependencies { } testImplementation project(path: ':poi-ooxml-lite-agent', configuration: 'archives') testImplementation "org.apache.logging.log4j:log4j-slf4j18-impl:${log4jVersion}" - testImplementation 'org.apiguardian:apiguardian-api:1.1.2' + testRuntimeOnly 'org.apiguardian:apiguardian-api:1.1.2' + + if (SAXON_TEST) { + testRuntimeOnly 'net.sf.saxon:Saxon-HE:10.6' + } } final String MODULE_NAME = 'org.apache.poi.stress' diff --git a/poi-ooxml/build.gradle b/poi-ooxml/build.gradle index 412880b609..f8f2510a74 100644 --- a/poi-ooxml/build.gradle +++ b/poi-ooxml/build.gradle @@ -131,7 +131,7 @@ dependencies { } testImplementation project(path:':poi', configuration:'tests') testImplementation project(path:':poi-ooxml-lite-agent', configuration: 'archives') - testImplementation 'org.apiguardian:apiguardian-api:1.1.2' + testRuntimeOnly 'org.apiguardian:apiguardian-api:1.1.2' testImplementation 'org.xmlunit:xmlunit-core:2.8.3' testImplementation 'org.reflections:reflections:0.10.2' testImplementation 'org.openjdk.jmh:jmh-core:1.33' @@ -143,6 +143,9 @@ dependencies { // see https://logging.apache.org/log4j/2.x/log4j-slf4j-impl/ testImplementation "org.apache.logging.log4j:log4j-slf4j18-impl:${log4jVersion}" + if (SAXON_TEST) { + testRuntimeOnly 'net.sf.saxon:Saxon-HE:10.6' + } broken("org.apache.xmlgraphics:batik-script:${batikVersion}"){ exclude group: 'xalan', module: 'xalan' diff --git a/poi-scratchpad/build.gradle b/poi-scratchpad/build.gradle index 6b7781df5b..d5276b8f22 100644 --- a/poi-scratchpad/build.gradle +++ b/poi-scratchpad/build.gradle @@ -45,7 +45,11 @@ dependencies { testImplementation project(path: ':poi', configuration: 'tests') testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}" - testImplementation 'org.apiguardian:apiguardian-api:1.1.2' + testRuntimeOnly 'org.apiguardian:apiguardian-api:1.1.2' + + if (SAXON_TEST) { + testRuntimeOnly 'net.sf.saxon:Saxon-HE:10.6' + } javadocs project(':poi') javadocs project(':poi-ooxml') diff --git a/poi/build.gradle b/poi/build.gradle index fbf2ba4725..c741223f86 100644 --- a/poi/build.gradle +++ b/poi/build.gradle @@ -53,7 +53,11 @@ dependencies { testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}" - testImplementation 'org.apiguardian:apiguardian-api:1.1.2' + testRuntimeOnly 'org.apiguardian:apiguardian-api:1.1.2' + + if (SAXON_TEST) { + testRuntimeOnly 'net.sf.saxon:Saxon-HE:10.6' + } // needed for locating the external references javadocs project(':poi-ooxml') -- 2.39.5