Maven error: Unable to get resource / Server redirected too many times

允我心安 提交于 2019-12-05 17:52:53

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>

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

I had same problem.

The problem is 'domain' in file settings.xml

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

DOMAIN is optional if you launch maven in Microsoft Systems but it is mandatory if you launch maven in UNIX systems with domain authentication and remapped user (user home is in /home/DOMAIN/user), I found this trick in empiric way.

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.

user619578

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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!