Primarily. Regarding the dependencies.
To add SLF4J, you must put ONE and only ONE of these dependencies in your pom.xml. It depends on which implementation you prefer to use. Each dependency that you add to pom.xml is automatically added to the classpath. If one of the following dependencies is provided by another dependency, you can omit it. Remember that you should include only one, even if the dependency is provided by another dependency. Please note that I did not specify the version from the dependencies. Use the latest available version.
<dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version></version> </dependency>
<dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version></version> <scope>compile</scope> </dependency>
<dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version></version> <scope>compile</scope> </dependency>
<dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-jdk14</artifactId> <version></version> <scope>compile</scope> </dependency>
Now about the annoying error you get when creating your maven project. If after having only one of the above dependencies, you still get SLF4J: the class "org.slf4j.impl.StaticLoggerBinder" could not be loaded. then you encounter an error with m2e.
Eclipse Juno and Indigo, when using the nested version of maven (m2e), do not suppress the SLF4J message: Failed to load class "org.slf4j.impl.StaticLoggerBinder". This behavior is present in version m2e 1.1.0.20120530-0009 onwards.
Although this is indicated as an error, your logs will be saved normally. The highlighted error will still be present until this error is fixed. See the m2e support site for more details .
The current available solution is to use an external version of maven, not a bundled version of Eclipse. You can find about this solution and more about this error in the question below, which, I think, describes the same problem that you are facing.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". error