views:

898

answers:

4

Our proxy went down and I tried to update dependencies with maven while it was off. Since then I can't download anything with maven. I get this error for everything. I tried -U option, deleting my local repository and tried different maven version (2.0.9, 2.2.1) but it doesn't work. Any idea how to solve this?

Earlier it also said 'repository will be blacklisted' to all of them.

Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.1/maven-compiler-plugin-2.1.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-compiler-plugin:pom:2.1' from repository central (http://repo1.maven.org/maven2): Error transferring file: Server redirected too many times (20)

  org.apache.maven.plugins:maven-compiler-plugin:pom:2.1

from the specified remote repositories:
  jboss-snapshot (http://snapshots.jboss.org/maven2),
  central (http://repo1.maven.org/maven2),
  JBoss Repo (http://repository.jboss.com/maven2),
  spring-maven-snapshot (http://maven.springframework.org/snapshot),
  com.springsource.repository.bundles.external (http://repository.springsource.com/maven/bundles/external),
  com.springsource.repository.bundles.snapshot (http://repository.springsource.com/maven/bundles/snapshot),
  jboss (http://repository.jboss.com/maven2),
  com.springsource.repository.bundles.release (http://repository.springsource.com/maven/bundles/release),
  jboss-snapshot-plugins (http://snapshots.jboss.org/maven2),
  com.springsource.repository.bundles.milestone (http://repository.springsource.com/maven/bundles/milestone),
  jboss-plugins (http://repository.jboss.com/maven2)


        at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:228)
        at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)
        at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558)
        ... 25 more
Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository
        at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:404)
        at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216)
        ... 27 more
A: 

I don't know how this solved it but I changed my password (domain/proxy) and now it works.

tewe
A: 

I got the same error with Windows ISA proxy. I had to put my Windows domain name and username in ~/.m2/settings.xml like this:

<username>DOMAIN\USERNAME</username>
Eric
A: 

Thank you for that; using ourdomain.com\username fixes a problem for me, too.

Jeff Schwab
A: 

Something that happened to me was that when I installed Maven, it added proxy information in ~/.m2/settings.xml. I don't have a proxy, so I'm not sure where it came from, but that prevented me from being able to download anything. After removing the proxy info, downloads were successful.

Feanor