From f303f2de3a177d38334e444eb78be7383c4d6f82 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Fri, 20 Oct 2023 16:02:00 +0200 Subject: [PATCH] Ban dependencies interfering with our tests --- log4j-cassandra/pom.xml | 10 ------ log4j-core-its/pom.xml | 18 ++++------- log4j-core-test/pom.xml | 17 ++++------ log4j-jakarta-web/pom.xml | 7 +++- log4j-osgi-test/pom.xml | 10 ------ log4j-parent/pom.xml | 67 +++++++++++++++++++++++++++++++++++++++ log4j-perf-test/pom.xml | 24 ++++++++++++-- log4j-spring-boot/pom.xml | 6 ++++ log4j-taglib/pom.xml | 7 +++- log4j-to-slf4j/pom.xml | 26 +++++++++++++++ log4j-web/pom.xml | 7 +++- 11 files changed, 151 insertions(+), 48 deletions(-) diff --git a/log4j-cassandra/pom.xml b/log4j-cassandra/pom.xml index 24016c467fb..3c0302e5474 100644 --- a/log4j-cassandra/pom.xml +++ b/log4j-cassandra/pom.xml @@ -86,16 +86,6 @@ org.apache.cassandra cassandra-all test - - - ch.qos.logback - logback-classic - - - ch.qos.logback - logback-core - - org.apache.cassandra diff --git a/log4j-core-its/pom.xml b/log4j-core-its/pom.xml index 963cd8ed1d2..e5949265129 100644 --- a/log4j-core-its/pom.xml +++ b/log4j-core-its/pom.xml @@ -153,17 +153,6 @@ log4j test - - ch.qos.logback - logback-classic - test - - - - ch.qos.logback - logback-core - test - org.slf4j @@ -179,7 +168,12 @@ org.springframework spring-test - test + + + org.springframework + spring-jcl + + diff --git a/log4j-core-test/pom.xml b/log4j-core-test/pom.xml index d73a6a68642..89fae5cdfdd 100644 --- a/log4j-core-test/pom.xml +++ b/log4j-core-test/pom.xml @@ -108,6 +108,12 @@ org.springframework spring-test + + + org.springframework + spring-jcl + + @@ -278,17 +284,6 @@ kafka-clients test - - ch.qos.logback - logback-classic - test - - - - ch.qos.logback - logback-core - test - org.apache.maven maven-core diff --git a/log4j-jakarta-web/pom.xml b/log4j-jakarta-web/pom.xml index 84c90d98778..5a14417e220 100644 --- a/log4j-jakarta-web/pom.xml +++ b/log4j-jakarta-web/pom.xml @@ -82,7 +82,12 @@ org.springframework spring-test - test + + + org.springframework + spring-jcl + + diff --git a/log4j-osgi-test/pom.xml b/log4j-osgi-test/pom.xml index f043135c7e8..940e1f22258 100644 --- a/log4j-osgi-test/pom.xml +++ b/log4j-osgi-test/pom.xml @@ -86,16 +86,6 @@ junit-vintage-engine test - - ch.qos.logback - logback-classic - test - - - ch.qos.logback - logback-core - test - org.apache.felix org.apache.felix.framework diff --git a/log4j-parent/pom.xml b/log4j-parent/pom.xml index e8ac4647e34..79c547fe74a 100644 --- a/log4j-parent/pom.xml +++ b/log4j-parent/pom.xml @@ -326,6 +326,24 @@ org.apache.cassandra cassandra-all ${cassandra.version} + + + org.slf4j + jcl-over-slf4j + + + org.slf4j + log4j-over-slf4j + + + ch.qos.logback + logback-classic + + + ch.qos.logback + logback-core + + @@ -338,6 +356,16 @@ org.apache.cassandra cassandra-thrift ${cassandra.version} + + + org.slf4j + jcl-over-slf4j + + + org.slf4j + log4j-over-slf4j + + @@ -1077,6 +1105,45 @@ + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + ban-logging-dependencies + + enforce + + + + + + + org.slf4j:jcl-over-slf4j + org.springframework:spring-jcl + + org.slf4j:log4j-over-slf4j + ch.qos.reload4j:reload4j + + org.slf4j:slf4j-log4j12 + org.slf4j:slf4j-reload4j + + org.ops4j.pax.logging:* + + ch.qos.logback:* + + + + + + + + diff --git a/log4j-perf-test/pom.xml b/log4j-perf-test/pom.xml index 200cbe069ef..2717fb5a90d 100644 --- a/log4j-perf-test/pom.xml +++ b/log4j-perf-test/pom.xml @@ -120,12 +120,10 @@ ch.qos.logback logback-classic - compile ch.qos.logback logback-core - compile org.eclipse.persistence @@ -144,6 +142,28 @@ + + + org.apache.maven.plugins + maven-enforcer-plugin + + + ban-logging-dependencies + + + + + ch.qos.logback:* + + + + + + + + org.apache.maven.plugins maven-shade-plugin diff --git a/log4j-spring-boot/pom.xml b/log4j-spring-boot/pom.xml index ca588230086..bc787a8badc 100644 --- a/log4j-spring-boot/pom.xml +++ b/log4j-spring-boot/pom.xml @@ -54,6 +54,12 @@ org.springframework spring-core + + + org.springframework + spring-jcl + + org.springframework diff --git a/log4j-taglib/pom.xml b/log4j-taglib/pom.xml index 509338bad30..27efe28819e 100644 --- a/log4j-taglib/pom.xml +++ b/log4j-taglib/pom.xml @@ -84,7 +84,12 @@ org.springframework spring-test - test + + + org.springframework + spring-jcl + + diff --git a/log4j-to-slf4j/pom.xml b/log4j-to-slf4j/pom.xml index 2ea30e826e5..cf5de792ce5 100644 --- a/log4j-to-slf4j/pom.xml +++ b/log4j-to-slf4j/pom.xml @@ -96,4 +96,30 @@ test + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + ban-logging-dependencies + + + + + ch.qos.logback:*:*:*:test + + + + + + + + + diff --git a/log4j-web/pom.xml b/log4j-web/pom.xml index 9a7f00c9066..331bb0462ff 100644 --- a/log4j-web/pom.xml +++ b/log4j-web/pom.xml @@ -86,7 +86,12 @@ org.springframework spring-test - test + + + org.springframework + spring-jcl + +