title: JARs that Maven have downloaded to my local repository is included in classpath but not found?
body: <p>I have a number of dependencies on my project that Maven resolves correctly. The problem is that it doesn't seem to find the spring-context jar-file that Maven itself have downloaded and nicely put in my local .m2 repository. My code doesn't compile, and this is the error message I get:</p>
  
  <pre><code>[INFO] -------------------------------------------------------------
  [ERROR] COMPILATION ERROR : 
  [INFO] -------------------------------------------------------------
  [ERROR] /Users/kilroy/workspace/blogping-dist/blogping/src/main/java/com/vrutberg/blogping/web/BlogPingService.java:[21,1] cannot find symbol
  symbol: class Component
  @Component
  [ERROR] /Users/kilroy/workspace/blogping-dist/blogping/src/main/java/com/vrutberg/blogping/web/BlogPingService.java:[22,1] cannot find symbol
  symbol: class Scope
  @Scope("request")
  </code></pre>
  
  <p>From what I can tell the jar file it needs is included in the classpath (from debugging Maven with the -X switch):</p>
  
  <pre><code>[DEBUG]  /Users/kilroy/.m2/repository/org/springframework/spring-context/3.1.1.RELEASE/spring-context-3.1.1.RELEASE.jar
  </code></pre>
  
  <p>This is the correct location of the jar file. I reference the above mentioned classes (Component.class and Scope.cass) through these annotations in my code:</p>
  
  <pre><code>@Component
  @Scope("request")
  @Path("/ping")
  public class BlogPingService {
  
      @InjectParam
      private BlogPingList blogPingList;
  
      @Context
  </code></pre>
  
  <p>The @Component and @Scope annotations reside in the spring-context jar, and if I unpack it and search for Component.class and Scope.class I find them as expected:</p>
  
  <pre><code>pioneer:test kilroy$ find . -name Scope.class
  ./org/springframework/context/annotation/Scope.class
  pioneer:test kilroy$ find . -name Component.class
  ./org/springframework/stereotype/Component.class
  </code></pre>
  
  <p>So I have no idea what the problem is. It seems that the jar file is included correctly in the classpath and it contains the classes that I require. What could be the problem?</p>
  
  <p>Link to my pom.xml: <a href="http://pastebin.com/nsLp5VeU" rel="nofollow">http://pastebin.com/nsLp5VeU</a></p>