title: Difficulties with dependencies in maven
body: <p>i'm really new to creating projects in java with maven and so i've stumbled on quite a error for something really basic. I've created a maven project with the following pom.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
   &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.mycompany.kthmaven&lt;/groupId&gt;
      &lt;artifactId&gt;KTHMaven&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;maven.compiler.source&gt;1.7&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;1.7&lt;/maven.compiler.target&gt;
      &lt;/properties&gt;
      &lt;dependencies&gt;
        &lt;dependency&gt;
           &lt;groupId&gt;edu.princeton.cs.introcs&lt;/groupId&gt;
           &lt;artifactId&gt;algs4-package&lt;/artifactId&gt;
           &lt;version&gt;1.0&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
           &lt;groupId&gt;edu.princeton.cs.introcs&lt;/groupId&gt;
           &lt;artifactId&gt;stdlib-package&lt;/artifactId&gt;
           &lt;version&gt;1.0&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
           &lt;groupId&gt;junit&lt;/groupId&gt;
           &lt;artifactId&gt;junit&lt;/artifactId&gt;
           &lt;version&gt;4.10&lt;/version&gt;
           &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;
     &lt;/dependencies&gt;
     &lt;repositories&gt;
        &lt;repository&gt;
           &lt;id&gt;sics-release&lt;/id&gt;
           &lt;name&gt;SICS Release Repository&lt;/name&gt;
           &lt;url&gt;http://kompics.sics.se/maven/repository&lt;/url&gt;
        &lt;/repository&gt;
     &lt;/repositories&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Now when I try to compile the following code</p>
  
  <pre><code>package com.mycompany.kthmaven; 
  public class NewClass {
      public static void main(String[] args) {
       Stopwatch stopwatch = new Stopwatch();
       long counter = 0;
       for (int i=0; i&lt;1000000; i++) {
       counter += i;
       }
       StdOut.println("Körtiden var: " + stopwatch.elapsedTime());
      }
  
  }
  </code></pre>
  
  <p>I get a error telling me it doesnt recognize the symbols Stopwatch and StdOut which do exist in the dependencies I assigned for the project. Maven also succeeds in downloading the jars so im not sure where the problem is.</p>
  
  <p>Heres a picture how the project looks like in netbeans (sorry cant upload images yet)</p>
  
  <p><a href="http://i.gyazo.com/d9aa109c9bc34238f3548f7548dfb234.png" rel="nofollow">http://i.gyazo.com/d9aa109c9bc34238f3548f7548dfb234.png</a></p>