Issue
Got a problem getting slf4j working for me with m2e. This is not the first time to state this problem. However, others have a more specific case and still no answer.
I installed Eclipse-jee fresh. For test I created a simplest maven project from maven-archetype-quickstart. It simply prints out Hello World!
Although applying m2e it compiles and runs fine, I get the messages in red
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/rschumacher/install/eclipse-jee/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:/C:/Users/rschumacher/install/eclipse-jee/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]
This happens with any maven project when performing run as/Maven test.
It doesn't help to look at the dependency:tree of the pom.xml, as the conflicting bindings are with m2e and osgi (as far as I can interprete the messages).
As result, slf4j ignores the configuration and is no longer usable from within Eclipse with m2e installed.
If I start mvn test from a commandline, no such messages appear. slf4j logging is working as it should.
Do you got any idea or workaround in order to have slf4j working again with m2e?
Solution
You should go to Window -> preference -> Maven -> Installations
Then instead of using EMBEDDED m2e, add an external one, which you has installed manually, then choose it and apply.
This how I resolve this problem. So according to same mechanism, you may resolve this problem also by delete maven in system path.
Answered By - Nick Cao