zoukankan      html  css  js  c++  java
  • Maven的settings.xml中为HTTP和HTTPS配置代理服务器【转】

    我在代理服务器后面使用Maven 3.1.1。相同的代理处理两者HTTPHTTPS流量。

    我似乎无法告诉maven settings.xml使用这两种协议。在我看来,只能使用一个活动代理,因为首先使用了定义的活动代理,并忽略后续的“活动”代理定义。这是我的settings.xml

    <proxies>
        <proxy>
            <id>myhttpproxy</id>
            <active>true</active>
            <protocol>http</protocol>
            <host>192.168.1.2</host>
            <port>3128</port>
            <nonProxyHosts>localhost</nonProxyHosts>
        </proxy>
        <proxy>
            <id>myhttpsproxy</id>
            <active>true</active>
            <protocol>https</protocol>
            <host>192.168.1.2</host>
            <port>3128</port>
            <nonProxyHosts>localhost</nonProxyHosts>
        </proxy>
    </proxies>

    是否可以为maven HTTPHTTPSmaven 配置代理settings.xml?我知道我可以通过将Java系统属性传递给maven调用来解决这个问题,例如:

    -Dhttps.proxyHost=192.168.1.2 -Dhttps.proxyPort=3128

    转自

    如何在Maven的settings.xml中为HTTP和HTTPS配置代理服务器? - 问答 - 云+社区 - 腾讯云
    https://cloud.tencent.com/developer/ask/191609

  • 相关阅读:
    Asp.Net Core- 配置组件详解
    ASP.Net Core-依赖注入IoC
    ASP.Net Core-TagHelpers
    Selenium-等待
    Selenium-js
    Selenium-actions
    Selenium-基础操作
    Selenium-简介
    装饰者模式
    设计模式-策略者模式
  • 原文地址:https://www.cnblogs.com/paul8339/p/15508450.html
Copyright © 2011-2022 走看看