diff options
author | Marius Volkhart <mariusvolkhart@apache.org> | 2021-02-21 20:57:25 +0000 |
---|---|---|
committer | Marius Volkhart <mariusvolkhart@apache.org> | 2021-02-21 20:57:25 +0000 |
commit | 259c9967efb354a0feff2a861ac8bd20582b6562 (patch) | |
tree | ba76a4f20503d97e77bdf18146d59e00a2369fb9 /build.gradle | |
parent | 6d10f26718f84591671d7cafdcc009345b9c777e (diff) | |
download | poi-259c9967efb354a0feff2a861ac8bd20582b6562.tar.gz poi-259c9967efb354a0feff2a861ac8bd20582b6562.zip |
[bug-63046] Use Log4j 2 for logging
This removes the POILogger and POILogFactory mechanism for logging. This mechanism was created at a time when the Java landscape looked very different than it does today.
Log4j 2 is an Apache Foundation project that is well maintained and is widely regarded as having good performance and capabilities. We use only the Log4j API artifact. This lets application developers choose how they want to capture logging events if at all. Integrations with Log4j 2 Core and Logback are available from the Log4j project.
Closes #224
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886770 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/build.gradle b/build.gradle index 7e07fa11eb..f6070366ea 100644 --- a/build.gradle +++ b/build.gradle @@ -116,9 +116,9 @@ subprojects { commonsMathVersion = '3.6.1' japicmpversion = '5.0.0' junitVersion = '5.7.0' + log4jVersion = '2.14.0' mockitoVersion = '3.6.0' hamcrestVersion = '2.2' - slf4jVersion = '1.7.30' xmlbeansVersion = '4.0.0' } @@ -140,6 +140,7 @@ subprojects { testCompile "org.junit.jupiter:junit-jupiter:${junitVersion}" testCompile "org.mockito:mockito-core:${mockitoVersion}" testCompile "org.hamcrest:hamcrest:${hamcrestVersion}" + testCompile "org.apache.logging.log4j:log4j-core:${log4jVersion}" } jar { @@ -232,18 +233,17 @@ project('main') { sourceSets.main.java.srcDirs = ['../../src/java'] sourceSets.main.resources.srcDirs = ['../../src/resources/main'] sourceSets.test.java.srcDirs = ['../../src/testcases'] + sourceSets.test.resources.srcDirs = ['../../src/resources/test'] dependencies { compile "commons-codec:commons-codec:${commonsCodecVersion}" - compile 'commons-logging:commons-logging:1.2' compile 'org.apache.commons:commons-collections4:4.4' compile "org.apache.commons:commons-math3:${commonsMathVersion}" - compile "org.slf4j:slf4j-api:${slf4jVersion}" + compile "org.apache.logging.log4j:log4j-api:${log4jVersion}" compile 'javax.activation:activation:1.1.1' compile 'com.zaxxer:SparseBitSet:1.2' testCompile 'org.reflections:reflections:0.9.12' - testRuntime "org.slf4j:slf4j-simple:${slf4jVersion}" } jar { @@ -275,6 +275,7 @@ project('ooxml') { sourceSets.main.java.srcDirs = ['../../src/ooxml/java'] sourceSets.main.resources.srcDirs = ['../../src/ooxml/resources', '../../src/resources/ooxml'] sourceSets.test.java.srcDirs = ['../../src/ooxml/testcases'] + sourceSets.test.resources.srcDirs = ['../../src/resources/test'] configurations { antdep @@ -309,6 +310,7 @@ project('ooxml') { compile "org.bouncycastle:bcpkix-jdk15on:${bouncyCastleVersion}" compile 'com.github.virtuald:curvesapi:1.06' compile 'com.zaxxer:SparseBitSet:1.2' + compile "org.apache.logging.log4j:log4j-api:${log4jVersion}" // compile only, don't add it to our dist as it blows up the size compile 'org.apache.xmlgraphics:batik-all:1.14' @@ -357,6 +359,7 @@ project('examples') { compile project(':scratchpad') compile "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}" + compile "org.apache.logging.log4j:log4j-core:${log4jVersion}" compile files("../../build/dist/maven/poi-ooxml-full/poi-ooxml-full-${version}.jar") compile "org.apache.commons:commons-compress:${commonsCompressVersion}" @@ -370,6 +373,7 @@ project('excelant') { sourceSets.main.java.srcDirs = ['../../src/excelant/java'] sourceSets.main.resources.srcDirs = ['../../src/excelant/resources'] sourceSets.test.java.srcDirs = ['../../src/excelant/testcases'] + sourceSets.test.resources.srcDirs = ['../../src/resources/test'] dependencies { compile 'org.apache.ant:ant:1.10.9' @@ -391,6 +395,7 @@ project('excelant') { project('integrationtest') { sourceSets.test.java.srcDirs = ['../../src/integrationtest'] + sourceSets.test.resources.srcDirs = ['../../src/resources/integrationtest'] dependencies { compile 'org.apache.ant:ant:1.10.9' @@ -432,11 +437,13 @@ project('scratchpad') { sourceSets.main.java.srcDirs = ['../../src/scratchpad/src'] sourceSets.main.resources.srcDirs = ['../../src/resources/scratchpad'] sourceSets.test.java.srcDirs = ['../../src/scratchpad/testcases'] + sourceSets.test.resources.srcDirs = ['../../src/resources/test'] dependencies { compile project(':main') compile "commons-codec:commons-codec:${commonsCodecVersion}" compile "org.apache.commons:commons-math3:${commonsMathVersion}" + compile "org.apache.logging.log4j:log4j-api:${log4jVersion}" // cyclic-dependency here: compile project(':ooxml') |