title: Eclipse cannot import package which is defined as dependency in maven
body: <p>I have checked out a maven project into eclipse using subclipse. </p>
  
  <p>I try to use the spring framework in my project, and have defined it as a required dependency: </p>
  
  <pre><code>  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-expression&lt;/artifactId&gt;
      &lt;version&gt;3.0.5.RELEASE&lt;/version&gt;
    &lt;/dependency&gt;
  </code></pre>
  
  <p>I have added the maven repo by adding the M2_REPO to my CLASS_PATH. I did that by executing this command on the cmd prompt:</p>
  
  <pre><code>mvn -Declipse.workspace="your Eclipse Workspace" eclipse:configure-workspace
  </code></pre>
  
  <p>I verified in Eclipse preferences that the M2_REPO variable is in my Classpath variable, and that the path refers to the repository directory of Maven. </p>
  
  <p>However, a import statement like this:</p>
  
  <pre><code>import org.springframework.context.ApplicationContext;
  import org.springframework.context.support.ClassPathXmlApplicationContext; 
  </code></pre>
  
  <p>does not work.</p>
  
  <p>What can be the problem here? </p>
  
  <p>EDIT:</p>
  
  <p>Since this was a module under the root, i figured that i did not need to define the dependency on Spring once more in this module. However, including (copy paste the list from the root :s) solved the issue. But this can't be right since the POM.xml in the root already requieres that this module is included.</p>