KengoTODA / spotbugs-cli

An experimental CLI for SpotBugs based on picocli
GNU Affero General Public License v3.0
1 stars 0 forks source link

org.apache.logging.slf4j.SLF4JServiceProvider exists in CLASSPATH #49

Closed KengoTODA closed 3 years ago

KengoTODA commented 3 years ago
$ build/executable/spotbugs --aux /Users/kengo/Downloads/graalvm-ce-java11-21.1.0/Contents/Home/lib/jrt-fs.jar build/libs/spotbugs-cli-1.0.0-SNAPSHOT.jar
SLF4J: Class path contains multiple SLF4J providers.
SLF4J: Found provider [org.apache.logging.slf4j.SLF4JServiceProvider@12b10815]
SLF4J: Found provider [org.slf4j.simple.SimpleServiceProvider@478c5cbb]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual provider is of type [org.apache.logging.slf4j.SLF4JServiceProvider@12b10815]

runtimeClasspath of spotbugs-cli

runtimeClasspath - Runtime classpath of compilation 'main' (target  (jvm)).
+--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.0-RC2
|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0-RC2
|    |    +--- org.jetbrains:annotations:13.0
|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.0-RC2
|    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.0-RC2
|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0-RC2 (*)
+--- info.picocli:picocli:4.6.2
\--- org.slf4j:slf4j-simple:1.8.0-beta4

but we have no org.apache.logging.log4j:log4j-slf4j18-impl in the classpath. It is used only in the Eclipse plugin.

runtimeClasspath from SpotBugs

runtimeClasspath - Runtime classpath of source set 'main'.
+--- org.ow2.asm:asm:9.2
+--- org.ow2.asm:asm-analysis:9.2
|    \--- org.ow2.asm:asm-tree:9.2
|         \--- org.ow2.asm:asm:9.2
+--- org.ow2.asm:asm-commons:9.2
|    +--- org.ow2.asm:asm:9.2
|    +--- org.ow2.asm:asm-tree:9.2 (*)
|    \--- org.ow2.asm:asm-analysis:9.2 (*)
+--- org.ow2.asm:asm-tree:9.2 (*)
+--- org.ow2.asm:asm-util:9.2
|    +--- org.ow2.asm:asm:9.2
|    +--- org.ow2.asm:asm-tree:9.2 (*)
|    \--- org.ow2.asm:asm-analysis:9.2 (*)
+--- org.apache.bcel:bcel:6.5.0
+--- net.jcip:jcip-annotations:1.0
+--- org.dom4j:dom4j:2.1.3
+--- org.apache.commons:commons-lang3:3.12.0
+--- org.apache.commons:commons-text:1.9
|    \--- org.apache.commons:commons-lang3:3.11 -> 3.12.0
+--- org.slf4j:slf4j-api:1.8.0-beta4
+--- project :spotbugs-annotations
|    +--- com.google.code.findbugs:jsr305:3.0.2
|    \--- org.junit:junit-bom:5.8.1
+--- com.google.code.gson:gson:2.8.9
+--- org.junit:junit-bom:5.8.1
+--- jaxen:jaxen:1.2.0
\--- net.sf.saxon:Saxon-HE:10.6
KengoTODA commented 3 years ago

spotbugs core depends on it via logBinding configuration.

https://github.com/KengoTODA/spotbugs/blob/93d799a3ddf2ab7e9d2587cb3954825f8aa5468a/spotbugs/build.gradle#L88