zoukankan      html  css  js  c++  java
  • 笔记:Maven 设置代理配置

    如果公司基于安全因素考虑,要求使用通过安全认证的代理服务器访问因特网,这种情况夏,需要为 Maven 配置HTTP代理,才能让他正常访问外部仓库,配置代理服务器需要在~/.ms2/settings.xml 文件中,添加代理配置:

       

    <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

    | This is a list of proxies which can be used on this machine to connect to the network.

    | Unless otherwise specified (by system property or command-line switch), the first proxy

    | specification in this list marked as active will be used.

    |-->

        <proxies>

            <proxy>

                <!-- 代理名称 -->

                <id>optional</id>

                <!-- 代理激活状态 -->

                <active>true</active>

                <!-- 代理协议 -->

                <protocol>http</protocol>

                <!-- 认证用户名称 -->

                <username>proxyuser</username>

                <!-- 认证用户密码 -->

                <password>proxypass</password>

                <!-- 代理服务器地址 -->

                <host>proxy.host.net</host>

                <!-- 代理服务器端口 -->

                <port>80</port>

                <!-- 指定域名不需要通过代理 -->

                <nonProxyHosts>local.net|some.host.com</nonProxyHosts>

            </proxy>

     </settings>

       

  • 相关阅读:
    交换机主要参数详解
    Linksys E 刷Tomato shibby
    802.11n 连接的建议设置是什么?
    Wi-Fi 协议和数率?
    windows xp 不支持Wap2加密方式
    电脑稳定性检测软件
    看懂影片标题,各种电影视频格式标题的含义
    【生活】生活点滴记录
    【自动化测试】关于UI自动化的疑问(记录ing)
    【学习】代码的编码规范
  • 原文地址:https://www.cnblogs.com/li3807/p/6416180.html
Copyright © 2011-2022 走看看