title: slf4j/logback/jcl-over-slf4j - still routing to logback even if jcl-over-slf4j is not in dependencies?
body: <p>While experimenting with logging dependencies, I had the following situation:</p>
  
  <pre><code>&lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;version99&lt;/id&gt;
          &lt;url&gt;http://version99.qos.ch/&lt;/url&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  
  &lt;dependencyManagement&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-logging&lt;/groupId&gt;
              &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
              &lt;version&gt;99-empty&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/dependencyManagement&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-logging&lt;/groupId&gt;
          &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
          &lt;version&gt;1.7.25&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!--&lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;jcl-over-slf4j&lt;/artifactId&gt;
          &lt;version&gt;1.7.25&lt;/version&gt;
      &lt;/dependency&gt;--&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
          &lt;artifactId&gt;logback-core&lt;/artifactId&gt;
          &lt;version&gt;1.2.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
          &lt;artifactId&gt;logback-classic&lt;/artifactId&gt;
          &lt;version&gt;1.2.3&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>It is important to note that the dependency to <code>jcl-over-slf4j</code> is commented out. To my surprise, the logs from Spring were still processed by Logback. How is this possible? There is no bridge active between jcl and slf4j, so how can we end up in Logback?</p>
  
  <p>I verified that:</p>
  
  <ul>
  <li>Only <code>commons-logging-99-empty.jar</code> is in classpath.</li>
  <li>No <code>jcl-over-slf4j</code> is mentioned in <code>mvn dependency:tree -Dverbose -Dincludes=org.slf4j</code></li>
  </ul>
  
  <p>I am really confused. I expected <code>NoClassDefFoundError</code>'s on classes from <code>commons-logging</code>.</p>
  
  <p>Please note that I have no intentions to leave that dependency to <code>jcl-over-slf4j</code> in comments. I just want to understand what is going on. I thought I finally understood these logging dependencies, but apparently, in practice, it is behaving totally different that I expected.</p>