title: Fail to import org.slf4j.Logger- how to add the jar to classpath?
body: <p>I am learning to use Maven and Log4J. In the POM file I've added the below dependencies:</p>
  
  <pre><code>  &lt;dependencies&gt;
       &lt;dependency&gt;
         &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
         &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
         &lt;version&gt;1.7.12&lt;/version&gt;
       &lt;/dependency&gt;
       &lt;dependency&gt;
         &lt;groupId&gt;log4j&lt;/groupId&gt;
         &lt;artifactId&gt;log4j&lt;/artifactId&gt;
         &lt;version&gt;1.2.17&lt;/version&gt;
       &lt;/dependency&gt;   
    &lt;/dependencies&gt;
  </code></pre>
  
  <p>When I tried to import <code>import org.slf4j.Logger</code> in my main class, Eclipse says "The import org.slf4j cannot be resolved". I searched a while for an solution, and it seems that I need to download the distribution file here <a href="http://www.slf4j.org/download.html" rel="nofollow">http://www.slf4j.org/download.html</a> and "add the jar to the classpath"? I am confused: wouldn't Maven download that automatically? How can I "add the jar to the classpath"? I am a real beginner here. Many thanks for your help!</p>