How to solve the SLF4J fault in maven?

6

Problem with Maven install:

When I run in eclipse Run As > Maven install I always get this message:

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.
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building ProjetoTeste 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 

Why does SLF4J: Failed occur and how do I solve it?

Note: I use Maven for Eclipse and Java.

    
asked by anonymous 18.02.2014 / 19:59

2 answers

5

When you talked about Eclipse, I soon thought it was a bug of the m2e plugin Maven to Eclipse ), which is the plugin of Eclipse for integration with Maven without command line. Said and done!

This is not a problem with your project!

I tested with my Eclipse and initially could not reproduce the problem. Then I found this topic in SOEN and issue seems to be with the built-in installation of Maven that already comes with the plugin. When you switch to an external installation the problem disappears.

I removed my external Maven installation to play the messages. In the image below, captured a few moments ago, I show the error below and the configuration to add an external installation above:

Afteraddinganotherinstallation,theproblemnolongeroccurs.

Result:

    
18.02.2014 / 20:23
0

I had problems with examples. Tomcat did not work in version 1.5.9.RELEASE:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.9.RELEASE</version>
    <relativePath/> 
</parent>

Error
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See link for further details.

Solution was to change the version to 1.5.0.RELEASE and it worked perfect.

Tomcat started on port (s): 8080 (http)
Started Demo01Application in 4.829 seconds (JVM running for 5.402)
Initializing Spring FrameworkServlet 'dispatcherServlet'
FrameworkServlet 'dispatcherServlet': initialization started
FrameworkServlet 'dispatcherServlet': initialization completed in 28 ms

    
05.01.2018 / 16:25