This is an automated email from the ASF dual-hosted git repository.
raboof pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-connectors.git
The following commit(s) were added to refs/heads/main by this push:
new 18d9e5e96 Solr: run tests with slf4j v2, drop legacy slf4j/logback
pins (#1881)
18d9e5e96 is described below
commit 18d9e5e962b1bc92d63e7759515899643eb04812
Author: PJ Fanning <[email protected]>
AuthorDate: Tue Sep 1 07:46:04 2026 +0100
Solr: run tests with slf4j v2, drop legacy slf4j/logback pins (#1881)
Motivation:
The Solr module was the last one pinned to slf4j 1.7 / logback 1.2 via
dependencyOverrides, dating from the solr-solrj 8.x days when the Solr
client libs did not work with slf4j v2. Since the upgrade to solrj 9.x
(#1813) that pin is obsolete: the Solr 9 ecosystem is slf4j-2-native.
Modification:
Remove the slf4j/logback legacy dependencyOverrides and the
log4j-over-slf4j bridge (nothing on the classpath uses the log4j 1.x
API any more). Additionally exclude log4j-slf4j2-impl from
solr-test-framework: under the v1 pin it was inert, but with slf4j v2
it competes with logback for provider selection, and the tests rely on
the testkit's logback-based log capturing. Delete the now-unused
Slf4jLegacyVersion and LogbackLegacyVersion vals.
Result:
Solr tests run on slf4j-api 2.0.18 / logback-classic 1.6.3 with logback
as the only slf4j provider, matching every other connector. No trace of
slf4j v1 remains in the build.
Tests:
- sbt solr/test (21/21 pass, before and after the change)
- verified via solr/Test/fullClasspath that slf4j-api 2.0.18 and
logback-classic 1.6.3 are resolved and logback is the sole provider
References:
Fixes #611
---
project/Dependencies.scala | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index b52f46d59..0ebb5c66e 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -45,11 +45,8 @@ object Dependencies {
val scalaCheckVersion = "1.19.0"
val HadoopVersion = "3.4.3"
- // Legacy versions support Slf4J v1 for compatibility with older libs
val Slf4jVersion = "2.0.18"
- val Slf4jLegacyVersion = "1.7.36"
val LogbackVersion = "1.6.3"
- val LogbackLegacyVersion = "1.2.13"
/**
* Calculates the scalatest version in a format that is used for
`org.scalatestplus` scalacheck artifacts
@@ -509,12 +506,11 @@ object Dependencies {
val Solr = Seq(
libraryDependencies ++= Seq(
"org.apache.solr" % "solr-solrj" % SolrjVersion,
- ("org.apache.solr" % "solr-test-framework" % SolrjVersion %
Test).exclude("org.apache.logging.log4j",
- "log4j-slf4j-impl"),
- "org.slf4j" % "log4j-over-slf4j" % Slf4jLegacyVersion % Test),
- dependencyOverrides ++= Seq(
- "org.slf4j" % "slf4j-api" % Slf4jLegacyVersion,
- "ch.qos.logback" % "logback-classic" % LogbackLegacyVersion))
+ ("org.apache.solr" % "solr-test-framework" % SolrjVersion % Test)
+ // exclude the slf4j providers backed by log4j2 so that logback
+ // (used by pekko-connectors-testkit's log capturing) stays the only
provider
+ .exclude("org.apache.logging.log4j", "log4j-slf4j-impl")
+ .exclude("org.apache.logging.log4j", "log4j-slf4j2-impl")))
val Sqs = Seq(
libraryDependencies ++= Seq(
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]