title: Class path contains multiple SLF4J bindings, log back-classic and log4j
body: <p>getting below error when i try to run unit test in my java project:</p>
  
  <pre><code>SLF4J: Class path contains multiple SLF4J bindings. 
  SLF4J: Found binding in [jar:file:/Users/me/.m2/repository/org/slf4j/slf4j-log4j12/1.5.8/slf4j-log4j12-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class] 
  SLF4J: Found binding in [jar:file:/Users/me/.m2/repository/ch/qos/logback/logback-classic/1.0.6/logback-classic-1.0.6.jar!/org/slf4j/impl/StaticLoggerBinder.class] 
  SLF4J: See slf4j.org/… for an explanation.
  </code></pre>
  
  <p>My pom.xml does have these dependencies:</p>
  
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
              &lt;version&gt;${org.slf4j-version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j-over-slf4j&lt;/artifactId&gt;
              &lt;version&gt;${org.slf4j-version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;jcl-over-slf4j&lt;/artifactId&gt;
              &lt;version&gt;${org.slf4j-version}&lt;/version&gt; 
          &lt;/dependency&gt;
  </code></pre>
  
  <p>My mvn dependency tree:</p>
  
  <pre><code>[INFO] +- junit:junit:jar:4.8.1:test
  [INFO] +- storm:storm:jar:0.9.0.1:provided
  [INFO] |  +- storm:storm-console-logging:jar:0.9.0.1:provided
  [INFO] |  +- storm:storm-core:jar:0.9.0.1:provided
  [INFO] |  |  +- org.clojure:clojure:jar:1.4.0:provided
  [INFO] |  |  +- commons-io:commons-io:jar:1.4:provided
  [INFO] |  |  +- org.apache.commons:commons-exec:jar:1.1:provided
  [INFO] |  |  +- storm:libthrift7:jar:0.7.0-2:provided
  [INFO] |  |  |  +- commons-lang:commons-lang:jar:2.5:provided
  [INFO] |  |  |  \- javax.servlet:servlet-api:jar:2.5:provided
  [INFO] |  |  +- clj-time:clj-time:jar:0.4.1:provided
  [INFO] |  |  |  \- joda-time:joda-time:jar:2.0:provided
  [INFO] |  |  +- com.netflix.curator:curator-framework:jar:1.0.1:provided
  [INFO] |  |  |  +- com.netflix.curator:curator-client:jar:1.0.1:provided
  [INFO] |  |  |  \- org.apache.zookeeper:zookeeper:jar:3.3.3:provided
  [INFO] |  |  |     \- jline:jline:jar:0.9.94:provided
  [INFO] |  |  +- backtype:jzmq:jar:2.1.0:provided
  [INFO] |  |  +- com.googlecode.json-simple:json-simple:jar:1.1:provided
  [INFO] |  |  +- compojure:compojure:jar:1.1.3:provided
  [INFO] |  |  |  +- org.clojure:core.incubator:jar:0.1.0:provided
  [INFO] |  |  |  +- org.clojure:tools.macro:jar:0.1.0:provided
  [INFO] |  |  |  +- clout:clout:jar:1.0.1:provided
  [INFO] |  |  |  \- ring:ring-core:jar:1.1.5:provided
  [INFO] |  |  |     \- commons-fileupload:commons-fileupload:jar:1.2.1:provided
  [INFO] |  |  +- hiccup:hiccup:jar:0.3.6:provided
  [INFO] |  |  +- ring:ring-devel:jar:0.3.11:provided
  [INFO] |  |  |  \- clj-stacktrace:clj-stacktrace:jar:0.2.2:provided
  [INFO] |  |  +- ring:ring-jetty-adapter:jar:0.3.11:provided
  [INFO] |  |  |  +- ring:ring-servlet:jar:0.3.11:provided
  [INFO] |  |  |  +- org.mortbay.jetty:jetty:jar:6.1.26:provided
  [INFO] |  |  |  |  \- org.mortbay.jetty:servlet-api:jar:2.5-20081211:provided
  [INFO] |  |  |  \- org.mortbay.jetty:jetty-util:jar:6.1.26:provided
  [INFO] |  |  +- org.clojure:tools.logging:jar:0.2.3:provided
  [INFO] |  |  +- org.clojure:math.numeric-tower:jar:0.0.1:provided
  [INFO] |  |  +- storm:carbonite:jar:1.5.0:provided
  [INFO] |  |  |  \- com.esotericsoftware.kryo:kryo:jar:2.17:provided
  [INFO] |  |  |     +- com.esotericsoftware.reflectasm:reflectasm:jar:shaded:1.07:provided
  [INFO] |  |  |     |  \- org.ow2.asm:asm:jar:4.0:provided
  [INFO] |  |  |     +- com.esotericsoftware.minlog:minlog:jar:1.2:provided
  [INFO] |  |  |     \- org.objenesis:objenesis:jar:1.2:provided
  [INFO] |  |  +- org.yaml:snakeyaml:jar:1.11:provided
  [INFO] |  |  +- org.apache.httpcomponents:httpclient:jar:4.1.1:provided
  [INFO] |  |  |  \- org.apache.httpcomponents:httpcore:jar:4.1:provided
  [INFO] |  |  +- storm:tools.cli:jar:0.2.2:provided
  [INFO] |  |  +- com.googlecode.disruptor:disruptor:jar:2.10.1:provided
  [INFO] |  |  +- storm:jgrapht:jar:0.8.3:provided
  [INFO] |  |  +- com.google.guava:guava:jar:13.0:provided
  [INFO] |  |  \- ch.qos.logback:logback-classic:jar:1.0.6:provided
  [INFO] |  |     \- ch.qos.logback:logback-core:jar:1.0.6:provided
  [INFO] |  \- storm:storm-netty:jar:0.9.0.1:provided
  [INFO] |     \- io.netty:netty:jar:3.6.3.Final:provided
  [INFO] +- com.rabbitmq:amqp-client:jar:3.2.2:compile
  [INFO] +- org.mongodb:mongo-java-driver:jar:2.11.3:compile
  [INFO] +- org.springframework.data:spring-data-mongodb:jar:1.3.3.RELEASE:compile
  [INFO] |  +- org.springframework:spring-tx:jar:3.1.4.RELEASE:compile
  [INFO] |  |  \- aopalliance:aopalliance:jar:1.0:compile
  [INFO] |  +- org.springframework:spring-beans:jar:3.1.4.RELEASE:compile
  [INFO] |  +- org.springframework:spring-expression:jar:3.1.4.RELEASE:compile
  [INFO] |  \- org.springframework.data:spring-data-commons:jar:1.6.3.RELEASE:compile
  [INFO] +- org.springframework:spring-core:jar:3.2.3.RELEASE:compile
  [INFO] +- org.springframework:spring-context:jar:3.2.3.RELEASE:compile
  [INFO] |  \- org.springframework:spring-aop:jar:3.2.3.RELEASE:compile
  [INFO] +- org.slf4j:slf4j-api:jar:1.7.6:compile
  [INFO] +- org.slf4j:log4j-over-slf4j:jar:1.7.6:compile
  [INFO] +- org.slf4j:jcl-over-slf4j:jar:1.7.6:compile
  [INFO] +- org.mockito:mockito-all:jar:1.9.0:test
  [INFO] +- org.easytesting:fest-assert-core:jar:2.0M8:test
  [INFO] |  \- org.easytesting:fest-util:jar:1.2.3:test
  [INFO] +- com.google.code.gson:gson:jar:2.2.4:compile
  [INFO] \- commons-codec:commons-codec:jar:1.8:compile
  </code></pre>
  
  <p>Edit 1:
  After removing log4j dependency tree</p>
  
  <pre><code> +- junit:junit:jar:4.8.1:test
  [INFO] +- storm:storm:jar:0.9.0.1:provided
  [INFO] |  +- storm:storm-console-logging:jar:0.9.0.1:provided
  [INFO] |  +- storm:storm-core:jar:0.9.0.1:provided
  [INFO] |  |  +- org.clojure:clojure:jar:1.4.0:provided
  [INFO] |  |  +- commons-io:commons-io:jar:1.4:provided
  [INFO] |  |  +- org.apache.commons:commons-exec:jar:1.1:provided
  [INFO] |  |  +- storm:libthrift7:jar:0.7.0-2:provided
  [INFO] |  |  |  +- commons-lang:commons-lang:jar:2.5:provided
  [INFO] |  |  |  \- javax.servlet:servlet-api:jar:2.5:provided
  [INFO] |  |  +- clj-time:clj-time:jar:0.4.1:provided
  [INFO] |  |  |  \- joda-time:joda-time:jar:2.0:provided
  [INFO] |  |  +- com.netflix.curator:curator-framework:jar:1.0.1:provided
  [INFO] |  |  |  +- com.netflix.curator:curator-client:jar:1.0.1:provided
  [INFO] |  |  |  \- org.apache.zookeeper:zookeeper:jar:3.3.3:provided
  [INFO] |  |  |     \- jline:jline:jar:0.9.94:provided
  [INFO] |  |  +- backtype:jzmq:jar:2.1.0:provided
  [INFO] |  |  +- com.googlecode.json-simple:json-simple:jar:1.1:provided
  [INFO] |  |  +- compojure:compojure:jar:1.1.3:provided
  [INFO] |  |  |  +- org.clojure:core.incubator:jar:0.1.0:provided
  [INFO] |  |  |  +- org.clojure:tools.macro:jar:0.1.0:provided
  [INFO] |  |  |  +- clout:clout:jar:1.0.1:provided
  [INFO] |  |  |  \- ring:ring-core:jar:1.1.5:provided
  [INFO] |  |  |     \- commons-fileupload:commons-fileupload:jar:1.2.1:provided
  [INFO] |  |  +- hiccup:hiccup:jar:0.3.6:provided
  [INFO] |  |  +- ring:ring-devel:jar:0.3.11:provided
  [INFO] |  |  |  \- clj-stacktrace:clj-stacktrace:jar:0.2.2:provided
  [INFO] |  |  +- ring:ring-jetty-adapter:jar:0.3.11:provided
  [INFO] |  |  |  +- ring:ring-servlet:jar:0.3.11:provided
  [INFO] |  |  |  +- org.mortbay.jetty:jetty:jar:6.1.26:provided
  [INFO] |  |  |  |  \- org.mortbay.jetty:servlet-api:jar:2.5-20081211:provided
  [INFO] |  |  |  \- org.mortbay.jetty:jetty-util:jar:6.1.26:provided
  [INFO] |  |  +- org.clojure:tools.logging:jar:0.2.3:provided
  [INFO] |  |  +- org.clojure:math.numeric-tower:jar:0.0.1:provided
  [INFO] |  |  +- storm:carbonite:jar:1.5.0:provided
  [INFO] |  |  |  \- com.esotericsoftware.kryo:kryo:jar:2.17:provided
  [INFO] |  |  |     +- com.esotericsoftware.reflectasm:reflectasm:jar:shaded:1.07:provided
  [INFO] |  |  |     |  \- org.ow2.asm:asm:jar:4.0:provided
  [INFO] |  |  |     +- com.esotericsoftware.minlog:minlog:jar:1.2:provided
  [INFO] |  |  |     \- org.objenesis:objenesis:jar:1.2:provided
  [INFO] |  |  +- org.yaml:snakeyaml:jar:1.11:provided
  [INFO] |  |  +- org.apache.httpcomponents:httpclient:jar:4.1.1:provided
  [INFO] |  |  |  \- org.apache.httpcomponents:httpcore:jar:4.1:provided
  [INFO] |  |  +- storm:tools.cli:jar:0.2.2:provided
  [INFO] |  |  +- com.googlecode.disruptor:disruptor:jar:2.10.1:provided
  [INFO] |  |  +- storm:jgrapht:jar:0.8.3:provided
  [INFO] |  |  +- com.google.guava:guava:jar:13.0:provided
  [INFO] |  |  +- ch.qos.logback:logback-classic:jar:1.0.6:provided
  [INFO] |  |  |  \- ch.qos.logback:logback-core:jar:1.0.6:provided
  [INFO] |  |  \- org.slf4j:log4j-over-slf4j:jar:1.6.6:provided
  [INFO] |  \- storm:storm-netty:jar:0.9.0.1:provided
  [INFO] |     \- io.netty:netty:jar:3.6.3.Final:provided
  [INFO] +- com.rabbitmq:amqp-client:jar:3.2.2:compile
  [INFO] +- org.mongodb:mongo-java-driver:jar:2.11.3:compile
  [INFO] +- org.springframework.data:spring-data-mongodb:jar:1.3.3.RELEASE:compile
  [INFO] |  +- org.springframework:spring-tx:jar:3.1.4.RELEASE:compile
  [INFO] |  |  \- aopalliance:aopalliance:jar:1.0:compile
  [INFO] |  +- org.springframework:spring-beans:jar:3.1.4.RELEASE:compile
  [INFO] |  +- org.springframework:spring-expression:jar:3.1.4.RELEASE:compile
  [INFO] |  +- org.springframework.data:spring-data-commons:jar:1.6.3.RELEASE:compile
  [INFO] |  +- org.slf4j:slf4j-api:jar:1.7.1:compile
  [INFO] |  \- org.slf4j:jcl-over-slf4j:jar:1.7.1:runtime
  [INFO] +- org.springframework:spring-core:jar:3.2.3.RELEASE:compile
  [INFO] +- org.springframework:spring-context:jar:3.2.3.RELEASE:compile
  [INFO] |  \- org.springframework:spring-aop:jar:3.2.3.RELEASE:compile
  [INFO] +- org.mockito:mockito-all:jar:1.9.0:test
  [INFO] +- org.easytesting:fest-assert-core:jar:2.0M8:test
  [INFO] |  \- org.easytesting:fest-util:jar:1.2.3:test
  [INFO] +- com.google.code.gson:gson:jar:2.2.4:compile
  [INFO] \- commons-codec:commons-codec:jar:1.8:compile
  </code></pre>
  
  <p>And pom.xml</p>
  
  <pre><code>  &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;spring.version&gt;3.2.3.RELEASE&lt;/spring.version&gt;
      &lt;/properties&gt;
  
    &lt;repositories&gt; 
        &lt;repository&gt; 
          &lt;id&gt;clojars.org&lt;/id&gt; 
          &lt;url&gt;http://clojars.org/repo&lt;/url&gt; 
        &lt;/repository&gt; 
      &lt;/repositories&gt; 
  
    &lt;dependencies&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.8.1&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Storm library --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;storm&lt;/groupId&gt;
              &lt;artifactId&gt;storm&lt;/artifactId&gt;
              &lt;version&gt;0.9.0.1&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
  
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;commons-logging&lt;/groupId&gt;
                      &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
  
          &lt;!-- RabbitMQ Driver --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.rabbitmq&lt;/groupId&gt;
              &lt;artifactId&gt;amqp-client&lt;/artifactId&gt;
              &lt;version&gt;3.2.2&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- mongodb java driver --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mongodb&lt;/groupId&gt;
              &lt;artifactId&gt;mongo-java-driver&lt;/artifactId&gt;
              &lt;version&gt;2.11.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Spring data mongodb --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
              &lt;artifactId&gt;spring-data-mongodb&lt;/artifactId&gt;
              &lt;version&gt;1.3.3.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Spring framework --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
                      &lt;groupId&gt;commons-logging&lt;/groupId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Log4j --&gt;
          &lt;!-- Unit Testing Tools --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mockito&lt;/groupId&gt;
              &lt;artifactId&gt;mockito-all&lt;/artifactId&gt;
              &lt;version&gt;1.9.0&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.easytesting&lt;/groupId&gt;
              &lt;artifactId&gt;fest-assert-core&lt;/artifactId&gt;
              &lt;version&gt;2.0M8&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- dependency&gt; &lt;groupId&gt;org.testng&lt;/groupId&gt; &lt;artifactId&gt;testng&lt;/artifactId&gt; 
              &lt;version&gt;6.8&lt;/version&gt; &lt;scope&gt;test&lt;/scope&gt; &lt;/dependency&gt; --&gt;
  
          &lt;!-- Google JSON serialization --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
              &lt;artifactId&gt;gson&lt;/artifactId&gt;
              &lt;version&gt;2.2.4&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Encoder --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-codec&lt;/groupId&gt;
              &lt;artifactId&gt;commons-codec&lt;/artifactId&gt;
              &lt;version&gt;1.8&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
          &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;local&lt;/id&gt;
              &lt;activation&gt;
                  &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
              &lt;/activation&gt;
              &lt;properties&gt;
                  &lt;build.profile.id&gt;local&lt;/build.profile.id&gt;
              &lt;/properties&gt;
          &lt;/profile&gt;
          &lt;profile&gt;
              &lt;id&gt;dev&lt;/id&gt;
              &lt;properties&gt;
                  &lt;build.profile.id&gt;dev&lt;/build.profile.id&gt;
              &lt;/properties&gt;
          &lt;/profile&gt;
          &lt;profile&gt;
              &lt;id&gt;stage&lt;/id&gt;
              &lt;properties&gt;
                  &lt;build.profile.id&gt;stage&lt;/build.profile.id&gt;
              &lt;/properties&gt;
          &lt;/profile&gt;
          &lt;profile&gt;
              &lt;id&gt;prod&lt;/id&gt;
              &lt;properties&gt;
                  &lt;build.profile.id&gt;prod&lt;/build.profile.id&gt;
              &lt;/properties&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.1&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;clean&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;run&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;tasks&gt;
                                  &lt;delete file="src/main/resources/application.properties" /&gt;
                                  &lt;copy file="profiles/application.${build.profile.id}.properties"
                                      tofile="src/main/resources/application.properties" /&gt;
                              &lt;/tasks&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.6&lt;/source&gt;
                      &lt;target&gt;1.6&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.9&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;downloadSources&gt;true&lt;/downloadSources&gt;
                      &lt;downloadJavadocs&gt;true&lt;/downloadJavadocs&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;descriptorRefs&gt;
                          &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
                      &lt;/descriptorRefs&gt;
                      &lt;archive&gt;
                          &lt;manifest&gt;
                              &lt;mainClass&gt;com.madisonlogic.conscriptor.topology.ConscriptorTopology&lt;/mainClass&gt;
                          &lt;/manifest&gt;
                      &lt;/archive&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;make-assembly&lt;/id&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;single&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.16&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;includes&gt;
                          &lt;include&gt;**/*Test.java&lt;/include&gt;
                      &lt;/includes&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;!-- Used to Correct slf4j errors with log4j --&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-enforcer-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.1.1&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;enforce-banned-dependencies&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;enforce&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;rules&gt;
                                  &lt;bannedDependencies&gt;
                                      &lt;searchTransitive&gt;true&lt;/searchTransitive&gt;
                                      &lt;excludes&gt;
                                          &lt;exclude&gt;commons-logging&lt;/exclude&gt;
                                          &lt;exclude&gt;org.slf4j:1.5*&lt;/exclude&gt;
                                          &lt;exclude&gt;org.slf4j:1.6*&lt;/exclude&gt;
                                          &lt;exclude&gt;org.springframework:2.*&lt;/exclude&gt;
                                          &lt;exclude&gt;org.springframework:3.0.*&lt;/exclude&gt;
                                      &lt;/excludes&gt;
                                  &lt;/bannedDependencies&gt;
                              &lt;/rules&gt;
                              &lt;fail&gt;true&lt;/fail&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Edit 2 Updated pom.xml</p>
  
  <pre><code>&lt;!-- Log4j --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
              &lt;version&gt;${org.slf4j-version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j-over-slf4j&lt;/artifactId&gt;
              &lt;version&gt;${org.slf4j-version}&lt;/version&gt;
              &lt;exclusions&gt;
                &lt;exclusion&gt;
                    &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                    &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
                    &lt;version&gt;1.5.8&lt;/version&gt;
                &lt;/exclusion&gt;
            &lt;/exclusions&gt;
          &lt;/dependency&gt;
  </code></pre>