The above error came after updating the m2e to version 1.1. By removing m2e 1.1 and rolling back to m2e 1.0 everything worked fine. I tried to repeat the problem in Windows and Ubuntu and it gave me the exact same error. Numerous configurations of the slf4j-api and logback were tested but none seem to work.
The error appears in any maven project even without declaring slf4j dependency.
New Maven Project--> maven-archetype-quickstart
and
New Maven Project--> Simple project without archetype selection
result to
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
Tested with Eclipse Indigo and Eclipse Juno (32 and 64 bit both) on Mac, 32 bit on Ubuntu and 64 and 32 bit on Windows. Tested fresh installs of Juno Classic, Juno Modelling tools, Kepler Standard, Kepler Modelling Tools and produced the same error.
The error appears with clean, install, test, deploy, generate-sources, validate , compile , package, integration-test, verify and combinations of the goal clean with the rest goals. It appears also with parameters -e and -X. There was an attempt to delete the m2e repository and download it from scratch but again without success. It should me mentioned that it was tested in 3 different machines and virtual box all the above systems but it produced the same error.
Tried all different logback configurations (from 1.0.4 to 1.0.13) that resolve the slf4j-api and logback-core dependencies, but all produce the same error:
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version></version>
</dependency>
Tried all different (from 1.6.1 to 1.7.5 ) slf4j-simple configurations.
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version></version>
<scope>compile</scope>
</dependency>
Tried all different (from 1.6.1 to 1.7.5 ) log4j-over-slf4j configurations.
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version></version>
<scope>compile</scope>
</dependency>
Tried all different (from 1.6.1 to 1.7.5 ) slf4j-jdk14 configurations.
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version></version>
<scope>compile</scope>
</dependency>
Tried all different (from 1.6.1 to 1.7.5 ) slf4j-log4j12 configurations.
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version></version>
<scope>compile</scope>
</dependency>
Tried slf4j-nop 1.7.5 configuration.
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>1.7.5</version>
<scope>compile</scope>
</dependency>
Last but not least the logs are saved and printed despite the error.
Download Eclipse Juno, Indigo or Kepler 32 or 64 bit (All installations will cause the same error).
Install m2e - Maven Integration for Eclipse
OR
Update your m2e version to 1.1.0.20120530-0009, or 1.2.0.20120903-1050, or 1.3.0.20130129-0926, or 1.4.0.20130601-0317 )
Select File->New->Other->Maven Project->Click Next->Select
maven-archetype-quickstart from the catalog->Finish
OR
Select File->New->Other->Maven Project->Click Next->Select Create a simple project (skip archetype selection)-> Complete Artifact info-> Finish
The first line on the console will be
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
P.S. Existing projects will produce the same error after updating the m2e version to 1.1.0.20120530-0009, 1.2.0.20120903-1050, 1.3.0.20130129-0926, 1.4.0.20130601-0317
EDIT
m2e support site:
The above question was posted as a bug in m2e support site and the answer from Igor Fedorenko was that
There are no immediate plans to suppress this message.
For viewing the above bug please refer to m2e official support site
***Reported FIXED***
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
mvn --version
, or google for your MAVEN_HOME
, for me this helped me that is /usr/share/maven2
)The error-message should be gone.