jvm-dependency-conflict-resolution icon indicating copy to clipboard operation
jvm-dependency-conflict-resolution copied to clipboard

Patch logback >= 1.3 to require slf4j >= 2.0, logback < 1.3 to require slf4j <= 1.7.x

Open tbroyer opened this issue 1 year ago • 1 comments

Slf4j 2 is a major breaking change (uses ServiceLoader rather than "static binder mechanism"), and Logback migrated to Slf4j 2 in version 1.3.

When working on tests for a PR for #106, I could have had slf4j 2 with logback 1.2, and these are actually incompatible (https://slf4j.org/faq.html#changesInVersion200) so it would be great if the plugin could prevent such situations.

The documentation for Logback says versions <= 1.2 “[have] been deprecated for several years and [are] no longer actively developed”, so maybe existing tests should just upgrade to slf4j 2 and logback 1.3 or 1.5 (depending on JDK requirements, maybe 1.5 and JDK 11 are OK for tests), or maybe they should be duplicated for slf4j 1.7 (with logback 1.2) and slf4j 2.0 (with logback 1.3 or 1.5).

tbroyer avatar Apr 16 '24 18:04 tbroyer

Indeed, full support for slf4j 2 was never added. I still need to take a look at your PR.

ljacomet avatar May 25 '24 09:05 ljacomet