title: Maven artifacts could not be resolved
body: <p>I added the spring and jboss repositories to my pom.xml like below:</p>
  
  <pre><code>&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;name&gt;MyProject&lt;/name&gt;
      &lt;url&gt;http://www.myproject.com&lt;/url&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.myproject&lt;/groupId&gt;
      &lt;artifactId&gt;myproject&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;   
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
              &lt;artifactId&gt;jsf-api&lt;/artifactId&gt;
              &lt;version&gt;2.1.3-b02&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
              &lt;artifactId&gt;jsf-impl&lt;/artifactId&gt;
              &lt;version&gt;2.1.3_01&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;jstl&lt;/artifactId&gt;
              &lt;version&gt;1.0.2&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
              &lt;version&gt;3.0-alpha-1&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;taglibs&lt;/groupId&gt;
              &lt;artifactId&gt;standard&lt;/artifactId&gt;
              &lt;version&gt;1.1.2&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- SPRING DEPENDENCIES --&gt;
          &lt;dependency&gt;  
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;  
              &lt;artifactId&gt;spring&lt;/artifactId&gt;  
              &lt;version&gt;3.0.6.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- HIBERNATE DEPENDENCIES --&gt;
          &lt;dependency&gt;  
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;  
              &lt;artifactId&gt;hibernate&lt;/artifactId&gt;  
              &lt;version&gt;3.5.4-Final&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- PRIMEFACES --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.primefaces&lt;/groupId&gt;
              &lt;artifactId&gt;primefaces&lt;/artifactId&gt;
              &lt;version&gt;3.0.M4&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.primefaces.themes&lt;/groupId&gt;
              &lt;artifactId&gt;aristo&lt;/artifactId&gt;
              &lt;version&gt;1.0.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- OTHER DEPENDENCIES --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jsoup&lt;/groupId&gt;
              &lt;artifactId&gt;jsoup&lt;/artifactId&gt;
              &lt;version&gt;1.5.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-codec&lt;/groupId&gt;
              &lt;artifactId&gt;commons-codec&lt;/artifactId&gt;
              &lt;version&gt;1.5&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;mysql&lt;/groupId&gt;
              &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
              &lt;version&gt;5.1.18&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.authorize&lt;/groupId&gt;
              &lt;artifactId&gt;java-anet-sdk&lt;/artifactId&gt;
              &lt;version&gt;1.4.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.amazonaws&lt;/groupId&gt;
              &lt;artifactId&gt;aws-java-sdk&lt;/artifactId&gt;
              &lt;version&gt;1.2.12&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.ocpsoft&lt;/groupId&gt;
              &lt;artifactId&gt;prettyfaces-jsf2&lt;/artifactId&gt;
              &lt;version&gt;3.3.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax&lt;/groupId&gt;
              &lt;artifactId&gt;javaee-web-api&lt;/artifactId&gt;
              &lt;version&gt;6.0&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&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.8.1&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;properties&gt;
          &lt;endorsed.dir&gt;${project.build.directory}/endorsed&lt;/endorsed.dir&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;netbeans.hint.j2eeVersion&gt;1.6&lt;/netbeans.hint.j2eeVersion&gt;
          &lt;netbeans.hint.deploy.server&gt;gfv3ee6&lt;/netbeans.hint.deploy.server&gt;
      &lt;/properties&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;jsf20&lt;/id&gt;
              &lt;name&gt;Repository for library Library[jsf20]&lt;/name&gt;
              &lt;url&gt;http://download.java.net/maven/2/&lt;/url&gt;
              &lt;layout&gt;default&lt;/layout&gt;
          &lt;/repository&gt;
          &lt;repository&gt;  
              &lt;id&gt;prime-repo&lt;/id&gt;  
              &lt;name&gt;PrimeFaces Maven Repository&lt;/name&gt;  
              &lt;url&gt;http://repository.primefaces.org&lt;/url&gt;  
              &lt;layout&gt;default&lt;/layout&gt; 
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;jboss-public-repository-group&lt;/id&gt;
              &lt;name&gt;JBoss Public Maven Repository Group&lt;/name&gt;
              &lt;url&gt;https://repository.jboss.org/nexus/content/repositories/releases/&lt;/url&gt;
              &lt;layout&gt;default&lt;/layout&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;spring-release&lt;/id&gt;
              &lt;name&gt;Spring Release Repository&lt;/name&gt;
              &lt;url&gt;http://maven.springframework.org/release&lt;/url&gt;
              &lt;layout&gt;default&lt;/layout&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3.2&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.6&lt;/source&gt;
                      &lt;target&gt;1.6&lt;/target&gt;
                      &lt;compilerArguments&gt;
                          &lt;endorseddirs&gt;${endorsed.dir}&lt;/endorseddirs&gt;
                      &lt;/compilerArguments&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.1&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;validate&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;copy&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;outputDirectory&gt;${endorsed.dir}&lt;/outputDirectory&gt;
                              &lt;silent&gt;true&lt;/silent&gt;
                              &lt;artifactItems&gt;
                                  &lt;artifactItem&gt;
                                      &lt;groupId&gt;javax&lt;/groupId&gt;
                                      &lt;artifactId&gt;javaee-endorsed-api&lt;/artifactId&gt;
                                      &lt;version&gt;6.0&lt;/version&gt;
                                      &lt;type&gt;jar&lt;/type&gt;
                                  &lt;/artifactItem&gt;
                              &lt;/artifactItems&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
          &lt;finalName&gt;${project.artifactId}&lt;/finalName&gt;
      &lt;/build&gt;
      &lt;!--pluginRepositories&gt;
          &lt;pluginRepository&gt;
              &lt;id&gt;caucho&lt;/id&gt;
              &lt;name&gt;Caucho&lt;/name&gt;
              &lt;url&gt;http://caucho.com/m2&lt;/url&gt;
          &lt;/pluginRepository&gt;
      &lt;/pluginRepositories--&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>But when I build, I get an error:</p>
  
  <pre><code>The following artifacts could not be resolved: org.springframework:spring:jar:3.0.6.RELEASE, org.hibernate:hibernate:jar:3.5.4-Final: Could not find artifact org.springframework:spring:jar:3.0.6.RELEASE in jsf20 (http://download.java.net/maven/2/) -&gt; [Help 1]
  </code></pre>
  
  <p>It's like maven only looks at the first repository and not the ones defined for spring and hibernate.</p>
  
  <p><strong>Update:</strong> Ran with -X and -e options at command line but not very useful from what I can tell: <a href="http://pastebin.com/c7nPzBc2" rel="nofollow">http://pastebin.com/c7nPzBc2</a></p>