Ich habe eine neue Abhängigkeit (browsermob-proxy) zu meiner pom.xml
hinzugefügt und anscheinend enthält sie eine slf4j-Bindung. Als Ergebnis, wenn ich meinen Code ausführen druckt er folgende Warnmeldungen aus:Abhängigkeit von pom.xml, die mehrere SLF4J-Bindungen verursacht
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/PATH/.m2/repository/net/lightbody/bmp/browsermob-proxy/2.1.4/browsermob-proxy-2.1.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/PATH/.m2/repository/org/slf4j/slf4j-jcl/1.7.6/slf4j-jcl-1.7.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
ich alle Abhängigkeiten auszuschließen versucht, was mit slf4j
oder Protokollierung von der neuen Abhängigkeit (browsermob-Proxy) zu tun hatten, wie dies:
<dependency>
<groupId>net.lightbody.bmp</groupId>
<artifactId>browsermob-proxy</artifactId>
<version>2.1.4</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</exclusion>
</exclusions>
</dependency>
Um all diese Abhängigkeiten zu entdecken ich innerhalb der browsermob-Proxy pom.xml
nur an.
Allerdings tat das alles nicht und ich bekomme immer noch genau dieselben Warnungen. Fehle ich etwas?
Verwendung 'mvn Abhängigkeit: tree' genau zu sehen, was von dem, was in gezogen wird. –
@ ThorbjørnRavnAndersen Danke für deinen Kommentar. Ich habe es schon gemacht, aber es sieht nicht so aus, als würde Browsermob-Proxy irgendwelche Abhängigkeiten importieren. Etwas, das ich wahrscheinlich hinzugefügt hätte, ist, dass dieses ganze Projekt ein Elternprojekt desjenigen ist, das ich gerade ausführe. Ich habe jedoch die Abhängigkeitsbäume von beiden betrachtet und keine Fehler oder slf4j oder mehrfach importierte Pakete gefunden. –
Nach genauerem Hinsehen sieht es so aus, als ob es sich um eine Kopie und nicht um eine Abhängigkeit handelt. Gibt es eine andere Version des Artefakts, die du ausprobieren kannst? –