title: maven fails to find slf4j rollingfileappender
body: <p>I'm having a problem where maven is not finding the slf4j classes when running JUnit tests:</p>
  
  <pre><code>22:20:05,412 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
  22:20:05,412 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback-test.xml] at [file:/home/ram/src/2dd/java/dd2/target/test-classes/logback-test.xml]
  22:20:05,526 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.RollingFileAppender]
  22:20:05,527 |-ERROR in ch.qos.logback.core.joran.action.AppenderAction - Could not create an Appender of type [ch.qos.logback.core.RollingFileAppender]. ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type ch.qos.logback.core.RollingFileAppender
  </code></pre>
  
  <p>However, the slf4j jar files are being added to the classpath:</p>
  
  <pre><code>[DEBUG] test classpath classpath:
  [DEBUG]   /home/ram/src/2dd/java/dd2/target/test-classes
  [DEBUG]   /home/ram/src/2dd/java/dd2/target/classes
  [DEBUG]   /home/ram/.m2/repository/junit/junit/4.11/junit-4.11.jar
  [DEBUG]   /home/ram/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
  [DEBUG]   /home/ram/.m2/repository/com/fallabs/kyotocabinet-java/1.24/kyotocabinet-java-1.24.jar
  [DEBUG]   /home/ram/.m2/repository/ch/qos/logback/logback-classic/1.0.13/logback-classic-1.0.13.jar
  [DEBUG]   /home/ram/.m2/repository/ch/qos/logback/logback-core/1.0.13/logback-core-1.0.13.jar
  [DEBUG]   /home/ram/.m2/repository/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar
  [DEBUG] provider classpath classpath:
  [DEBUG]   /home/ram/.m2/repository/org/apache/maven/surefire/surefire-junit4/2.12.4/surefire-junit4-2.12.4.jar
  [DEBUG]   /home/ram/.m2/repository/org/apache/maven/surefire/surefire-api/2.12.4/surefire-api-2.12.4.jar
  </code></pre>
  
  <p>My logback-test.xml file closely follows the example at: <em><a href="http://logback.qos.ch/manual/appenders.html" rel="nofollow">http://logback.qos.ch/manual/appenders.html</a></em></p>
  
  <pre><code>&lt;appender name="FILE" class="ch.qos.logback.core.RollingFileAppender"&gt;  
    &lt;file&gt;gen-test.log&lt;/file&gt;
    &lt;rollingPolicy
        class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"&gt;
      &lt;fileNamePattern&gt;gen-test.%i.log&lt;/fileNamePattern&gt;
      &lt;minIndex&gt;1&lt;/minIndex&gt;
      &lt;maxIndex&gt;3&lt;/maxIndex&gt;
    &lt;/rollingPolicy&gt;
  
    &lt;triggeringPolicy
        class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"&gt;
      &lt;maxFileSize&gt;2MB&lt;/maxFileSize&gt;
    &lt;/triggeringPolicy&gt;
  
    &lt;encoder&gt;
      &lt;pattern&gt;%date %level [%thread] %logger{36} [%file:%line] - %msg%n
     &lt;/pattern&gt;
    &lt;/encoder&gt; 
  &lt;/appender&gt;
  
  &lt;root level="debug"&gt;  
    &lt;appender-ref ref="FILE" /&gt;  
  &lt;/root&gt;  
  </code></pre>
  
  <p>My pom.xml has these relevant parts:</p>
  
  <pre><code>&lt;dependency&gt;
    &lt;groupId&gt;junit&lt;/groupId&gt;
    &lt;artifactId&gt;junit&lt;/artifactId&gt;
    &lt;version&gt;4.11&lt;/version&gt;
    &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;  &lt;!-- pulls in slf4j --&gt;
    &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
    &lt;artifactId&gt;logback-classic&lt;/artifactId&gt;
    &lt;version&gt;1.0.13&lt;/version&gt;
  &lt;/dependency&gt;
  ....
    &lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
      &lt;version&gt;3.1&lt;/version&gt;
      &lt;configuration&gt;
        &lt;verbose&gt;true&lt;/verbose&gt;
        &lt;fork&gt;true&lt;/fork&gt;
        &lt;!-- &lt;executable&gt;${JAVA_HOME}/bin/javac&lt;/executable&gt; --&gt;
        &lt;compilerVersion&gt;1.7&lt;/compilerVersion&gt;
        &lt;source&gt;1.7&lt;/source&gt;
        &lt;target&gt;1.7&lt;/target&gt;
        &lt;compilerArgs&gt;
          &lt;!-- &lt;arg&gt;-Xmaxerrs=100&lt;/arg&gt; --&gt;
          &lt;arg&gt;-Xlint&lt;/arg&gt;
        &lt;/compilerArgs&gt;
      &lt;/configuration&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;forkCount&gt;0&lt;/forkCount&gt;
      &lt;!-- &lt;forkMode&gt;pertest&lt;/forkMode&gt; --&gt;
      &lt;argLine&gt;-Xms128m -Xmx1g&lt;/argLine&gt;
      &lt;argLine&gt;-Djava.library.path=.:/usr/local/lib&lt;/argLine&gt;
      &lt;testFailureIgnore&gt;false&lt;/testFailureIgnore&gt; 
      &lt;skip&gt;false&lt;/skip&gt; 
      &lt;!--
      &lt;useSystemClassLoader&gt;true&lt;/useSystemClassLoader&gt;
      &lt;useManifestOnlyJar&gt;false&lt;/useManifestOnlyJar&gt;
      --&gt;
    &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Appreciate any help, thanks.</p>