From 49fd564023aaea73d1643cfe1599a995642e1084 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Thu, 11 Sep 2025 10:52:01 +0100 Subject: [PATCH] log4j bom (#897) --- build.gradle | 4 +++- poi-examples/build.gradle | 2 -- poi-ooxml/build.gradle | 1 - poi-scratchpad/build.gradle | 1 - poi/build.gradle | 1 - 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 95a9f62c3a..1084db31a8 100644 --- a/build.gradle +++ b/build.gradle @@ -171,12 +171,14 @@ subprojects { } dependencies { + api platform("org.apache.logging.log4j:log4j-bom:${log4jVersion}") + api 'org.apache.logging.log4j:log4j-api' testImplementation platform("org.junit:junit-bom:${junitVersion}") testImplementation 'org.junit.jupiter:junit-jupiter' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' testImplementation "org.mockito:mockito-core:${mockitoVersion}" testImplementation "org.hamcrest:hamcrest:${hamcrestVersion}" - testImplementation "org.apache.logging.log4j:log4j-core:${log4jVersion}" + testImplementation 'org.apache.logging.log4j:log4j-core' if (SAXON_TEST) { testRuntimeOnly("net.sf.saxon:Saxon-HE:${saxonVersion}") { diff --git a/poi-examples/build.gradle b/poi-examples/build.gradle index e965b9faa1..832485358c 100644 --- a/poi-examples/build.gradle +++ b/poi-examples/build.gradle @@ -35,8 +35,6 @@ dependencies { implementation project(path: ':poi-scratchpad', configuration: 'archives') } - implementation "org.apache.logging.log4j:log4j-api:${log4jVersion}" - testImplementation(project(path: ':poi-ooxml', configuration: 'tests')) { if (NO_SCRATCHPAD) { exclude group: 'org.apache.poi', module: 'poi-scratchpad' diff --git a/poi-ooxml/build.gradle b/poi-ooxml/build.gradle index c2ef234d37..51c6806f67 100644 --- a/poi-ooxml/build.gradle +++ b/poi-ooxml/build.gradle @@ -68,7 +68,6 @@ dependencies { api "org.apache.commons:commons-compress:${commonsCompressVersion}" api "commons-io:commons-io:${commonsIoVersion}" api 'com.github.virtuald:curvesapi:1.08' - api "org.apache.logging.log4j:log4j-api:${log4jVersion}" api 'org.apache.commons:commons-collections4:4.5.0' signingImplementation "org.apache.santuario:xmlsec:${xmlSecVersion}" diff --git a/poi-scratchpad/build.gradle b/poi-scratchpad/build.gradle index 79069943fe..3cfec7a5de 100644 --- a/poi-scratchpad/build.gradle +++ b/poi-scratchpad/build.gradle @@ -34,7 +34,6 @@ sourceSets { dependencies { api project(':poi') api project(path:':poi', configuration: 'archives') - api "org.apache.logging.log4j:log4j-api:${log4jVersion}" api "org.apache.commons:commons-math3:${commonsMathVersion}" api "commons-codec:commons-codec:${commonsCodecVersion}" diff --git a/poi/build.gradle b/poi/build.gradle index 2b1076840e..f42e93fb81 100644 --- a/poi/build.gradle +++ b/poi/build.gradle @@ -41,7 +41,6 @@ dependencies { api "org.apache.commons:commons-math3:${commonsMathVersion}" api "commons-io:commons-io:${commonsIoVersion}" api 'com.zaxxer:SparseBitSet:1.3' - api "org.apache.logging.log4j:log4j-api:${log4jVersion}" testImplementation 'org.reflections:reflections:0.10.2' testImplementation 'org.apache.ant:ant:1.10.15'