SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". error
I can also confirm this error.
Workaround: is to use external maven inside m2eclipse, instead of it's embedded maven.
That is done in three steps:
1 Install maven on local machine (the test-machine was Ubuntu 10.10)
mvn --version
Apache Maven 2.2.1 (rdebian-4) Java version: 1.6.0_20 Java home: /usr/lib/jvm/java-6-openjdk/jre Default locale: de_DE, platform encoding: UTF-8 OS name: "linux" version: "2.6.35-32-generic" arch: "amd64" Family: "unix"
2 Run maven externally link how to run maven from console
> cd path-to-pom.xml > mvn test
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Simple
[INFO] task-segment: [test]
[INFO] ------------------------------------------------------------------------
[...]
[INFO] Surefire report directory: [...]/workspace/Simple/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running net.tverrbjelke.experiment.MainAppTest
Hello World
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.042 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[...]
3 inside m2eclipse: switch from embedded maven to local maven
- find out where local maven home installation dir is (
mvn --version
, or google for yourMAVEN_HOME
, for me this helped me that is/usr/share/maven2
) - in eclipse Menu->Window->Preferences->Maven->Installation-> enter that string. Then you should have switched to your new external maven.
- then run your Project as e.g. "maven test".
The error-message should be gone.
There is a documentation in SLf4J site to resolve this. I followed that and added slf4j-simple-1.6.1.jar to my aplication along with slf4j-api-1.6.1.jar which i already had.This solved my problem
slf4j