Maven error: unable to get resource / server redirected too many times

Our proxy went down, and I tried updating dependencies with Maven while it was shutting down. Since then I can not download anything from Maven. I get this error for everything. I tried the -U option by deleting my local repository and tried a different version of Maven (2.0.9, 2.2.1), but it does not work. Any idea how to solve this?

He also said earlier that "the repository will be blacklisted" to everyone.

  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∗58) ... 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
+4
source share
5 answers

I do not know how this solved, but I changed my password (domain / proxy) and now it works.

+5
source

I got the same error with Windows ISA proxy. I needed to specify the name and name of the Windows domain in the ~ / .m2 / settings.xml file as follows:

<username>DOMAIN\USERNAME</username> 
+6
source

I had the same problem.

The problem is the "domain" in the settings.xml file

 <proxy> ... <username>DOMAIN\user</username> ... </proxy> 

DOMAIN is optional if you run maven on Microsoft Systems, but it is mandatory if you run maven on UNIX systems with domain authentication and a reassigned user (the user house is in / home / DOMAIN / user), I found this trick in an empirical way.

+4
source

Something that happened to me was that when I installed Maven, it added proxy information to ~ / .m2 / settings.xml. I do not have a proxy server, so I'm not sure where it came from, but that prevented me from downloading anything. After deleting the proxy server information, the download was successful.

+1
source

If you need a proxy section but want to connect to the repository on the intranet, you can add an exception list: <nonProxyHosts>localhost|repoHost<nonProxyHosts>

0
source

Source: https://habr.com/ru/post/1304854/


All Articles