title: How do you import a Maven dependency from Sonatype.org?
body: <p>I'm trying to import <a href="http://pivotal.github.com/robolectric/" rel="noreferrer">Robolectric</a> into my Maven project, with:</p>
  
  <pre><code>        &lt;dependency&gt;
              &lt;groupId&gt;com.pivotallabs&lt;/groupId&gt;
              &lt;artifactId&gt;robolectric&lt;/artifactId&gt;
              &lt;version&gt;1.2-SNAPSHOT&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>The artifact is listed here:</p>
  
  <p><a href="https://oss.sonatype.org/index.html#nexus-search;quick~robolectric" rel="noreferrer">https://oss.sonatype.org/index.html#nexus-search;quick~robolectric</a></p>
  
  <p>I tried including:</p>
  
  <pre><code>&lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;oss-sonatype&lt;/id&gt;
          &lt;name&gt;oss-sonatype&lt;/name&gt;
          &lt;url&gt;https://oss.sonatype.org/content/repositories/snapshots/&lt;/url&gt;
          &lt;snapshots&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
          &lt;/snapshots&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  </code></pre>
  
  <p>as suggested from <a href="http://mytechaddiction.blogspot.com/2012/07/intellij-robolectric-and-android.html?showComment=1355892044761" rel="noreferrer">this post</a>, but it doesn't resolve robolectric.</p>