title: Maven dependency hell - previously removed repository appears during my build
body: <p>Our project used to have a repository that now is deprecated <a href="https://issues.jboss.org/browse/JBBUILD-682" rel="nofollow">jboss - hibernate bug explained here</a>, we updated every single pom we had with the new repository, and it seemed to work just fine until today, when I decided to checkout the project and do a clean build into a new machine.</p>
  
  <p>Now, I've got maven complaining that it can't reach the old repository. I've grepped the whole filesystem checking for the culprit and couldn't find it. But still I've got this</p>
  
  <pre><code>Failed to read artifact descriptor for org.jboss.aop:jboss-aop:jar:2.0.0-SNAPSHOT: Could not transfer artifact org.jboss.aop:jboss-aop:pom:2.0.0-SNAPSHOT from/to jboss (http://repository.jboss.com/maven2): Access denied to: http://repository.jboss.com/maven2/org/jboss/aop/jboss-aop/2.0.0-SNAPSHOT/jboss-aop-2.0.0-SNAPSHOT.pom -&gt; [Help 1]
  </code></pre>
  
  <p>I have no idea what's going on, my theory (besides that this could be an x-file) is that other dependency somehow managed to include this repo? Am I right? How can I check this?</p>
  
  <p>I tried to build the dependency tree (mvn dependency:tree) to see who is the one that tries to include it, but since the whole project can't build I can't get the dep:tree ~grin~</p>
  
  <p>Can anybody explain me what exactly is wrong here? how can I debug it? "BTW -e option doesn't bring any other useful info, still I pasted it below for any eagle-eye expert out there :)"</p>
  
  <p>So far, I've started to copy the whole ~/.m2/repository from other machine to the new one, hopefully this will make the trick. But still, I was expecting maven to download and build the project from scratch as it's supposed to do</p>
  
  <p>Here is the stacktrace</p>
  
  <pre><code>Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.jboss.aop:jboss-aop:jar:2.0.0-SNAPSHOT
      at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:282)
      at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:172)
      at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:419)
      at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:533)
      at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:533)
      at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:533)
      at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:243)
      ... 25 more
  Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.jboss.aop:jboss-aop:pom:2.0.0-SNAPSHOT from/to jboss (http://repository.jboss.com/maven2): Access denied to: http://repository.jboss.com/maven2/org/jboss/aop/jboss-aop/2.0.0-SNAPSHOT/jboss-aop-2.0.0-SNAPSHOT.pom
          at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:541)
          at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:220)
          at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:197)
          at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267)
          ... 31 more
  Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact org.jboss.aop:jboss-aop:pom:2.0.0-SNAPSHOT from/to jboss (http://repository.jboss.com/maven2): Access denied to: http://repository.jboss.com/maven2/org/jboss/aop/jboss-aop/2.0.0-SNAPSHOT/jboss-aop-2.0.0-SNAPSHOT.pom
          at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
          at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
          at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.flush(WagonRepositoryConnector.java:695)
          at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.flush(WagonRepositoryConnector.java:689)
          at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.get(WagonRepositoryConnector.java:445)
          at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:460)
          ... 34 more
  Caused by: org.apache.maven.wagon.authorization.AuthorizationException: Access denied to: http://repository.jboss.com/maven2/org/jboss/aop/jboss-aop/2.0.0-SNAPSHOT/jboss-aop-2.0.0-SNAPSHOT.pom
          at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:119)
          at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
          at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
          at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
          at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:608)
          at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:64)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:680)
  </code></pre>
  
  <p>Thanks in advance</p>
  
  <p><strong>UPDATE 08/10/2011</strong></p>
  
  <p>Seems that the problem is related to maven3. Last update from apple pushed some java changes including maven3. After download and set up maven2 and perform a full "mvn clean compile build" problem disappeared.</p>
  
  <p>I'll update this thread when I've got more info on the issue</p>
  
  <p>Thanks to everybody that answered and gave ideas. Your help is very much appreciated.</p>