Eclipse Maven:SLF4J:类路径包含多个SLF4J绑定 [英] Eclipse Maven: SLF4J: Class path contains multiple SLF4J bindings
问题描述
尝试以Maven Build运行时出现此错误.有人可以帮我解决约束冲突,谢谢.
I got this error when trying to run as Maven Build. Could someone please help me resolve the binding conflicts, thanks.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Applications/Eclipse.app/Contents/Eclipse/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/Applications/Eclipse.app/Contents/Eclipse/configuration/org.eclipse.osgi/5/0/.cp/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.slf4j.impl.SimpleLoggerFactory]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Applications/Eclipse.app/Contents/Eclipse/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/Applications/Eclipse.app/Contents/Eclipse/configuration/org.eclipse.osgi/5/0/.cp/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.slf4j.impl.SimpleLoggerFactory]
推荐答案
这是Eclipse中的一个已知错误.一种解决方法是,单独安装Maven(不使用Eclipse嵌入式Maven二进制文件).
This is a known bug in Eclipse. A workaround is, that you install Maven separately (not using the Eclipse-embedded Maven binary).
然后,您可以在以下位置选择该外部Maven二进制文件: Window->首选项-> Maven->安装
Then you can chose that external Maven binary under:
Window->Preferences->Maven->Installations
它应该看起来像这样:
It should look like this:
我在这里使用Windows,但是在Linux中是相同的过程.从软件包管理器安装maven(例如sudo apt install maven),然后在Eclipse中将其激活.
I'm using Windows here but in Linux it's the same procedure. Install maven from your package manager (e.g. sudo apt install maven), then activate it in Eclipse.
P.S:在系统上安装Maven之后,命令 mvndependency:tree
也将起作用.
P.S: After you've installed Maven on your system, the command mvn dependency:tree
will also work.
这篇关于Eclipse Maven:SLF4J:类路径包含多个SLF4J绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!