【问题标题】:How can do use maven through a proxy如何通过代理使用 maven
【发布时间】:2016-11-17 23:32:22
【问题描述】:

我想通过代理使用 maven 我读了很多答案,说要在 .m2 文件夹的 settings.xml 文件中写入一些配置,但它不起作用这是我的配置: 我的域名是:cgi.net.intra我的计算机是 LDAP 的成员

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                  http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <proxies>
    <proxy>
      <active>true</active>
      <protocol>http</protocol>
      <host>ncproxy3</host>
      <port>8080</port>
      <username>gh40615</username>
      <password>mypasseword</password>
      <nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
    </proxy>
  </proxies>
</settings>

有人可以帮助我吗?谢天谢地

【问题讨论】:

    标签: spring maven spring-mvc spring-ldap


    【解决方案1】:
    1. 检查您的代理确实使用 http,而不是 https
    2. 检查您的代理确实使用端口 8080
    3. 将 FQH 用于 -- ncproxy3.cgi.net.intra
    4. 确保您的 settings.xml 位于 ${user.home}/.m2/ 中

    祝你好运。

    【讨论】:

    • 我会试试的,谢谢
    猜你喜欢
    • 1970-01-01
    • 2016-09-16
    • 2017-01-18
    • 2011-07-09
    • 2017-05-21
    • 1970-01-01
    • 2013-04-02
    • 2010-11-05
    相关资源
    最近更新 更多