可以从代理后面访问maven仓库,需要帮助 [英] Can access maven repository from behind proxy, need help

查看:31
本文介绍了可以从代理后面访问maven仓库,需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从代理后面访问 Maven 存储库.我正确配置了 settings.xml(我猜是这样...)

 <代理><代理><active>true</active><protocol>http</protocol><用户名>用户名</用户名><密码>密码</密码><host>12.34.56.78</host><端口>8080</端口></代理></代理>

但我仍然收到一条错误消息,例如...如果我不配置用户名/密码,则会收到正确的错误消息,即 HTTP 响应代码 407 - 表示需要身份验证.但是如果我配置了正确/不正确的代理身份验证,它总是会在错误消息下方打印....

<前>下载:http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom[警告] 无法从存储库中心 (http://repo1.maven.org/maven2) 获取资源 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2': 错误 transferring 文件:服务器重定向次数过多 (20)下载:http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom[警告] 无法从存储库中心 (http://repo1.maven.org/maven2) 获取资源 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2': 错误 transferring 文件:服务器重定向次数过多 (20)[信息] ------------------------------------------------------------------------[错误] 构建错误

解决方案

是否是 NTLM 代理?如果是,请尝试为 username 提供 domainnameusername(如 这个线程).

DOMAINNAMEUSERNAME

I am trying to access maven repository from behind proxy. I configured settings.xml correctly (i guess so...)

  <proxies>
    <proxy>
      <active>true</active>
      <protocol>http</protocol>
      <username>username</username>
      <password>password</password>  
      <host>12.34.56.78</host>
      <port>8080</port>
    </proxy>
  </proxies>

But still I am getting an error message like... if i don't configure userid/password gets correct error message which is HTTP response code 407 - saying authentication required. But If I configure correct/incorrect proxy authentication it always prints below error message....

Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' from repository central (http://repo1.maven.org/maven2): Error trans
ferring file: Server redirected too many  times (20)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' from repository central (http://repo1.maven.org/maven2): Error trans
ferring file: Server redirected too many  times (20)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR

解决方案

Is it a NTLM proxy? If yes, try to supply domainnameusername for the username (as suggested in this thread).

<username>DOMAINNAMEUSERNAME</username>

这篇关于可以从代理后面访问maven仓库,需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆