Maven设置代理服务器
来源:互联网 发布:网络歌手作曲 编辑:程序博客网 时间:2024/05/29 18:39
如果你的公司正在建立一个防火墙,并使用HTTP代理服务器来阻止用户直接连接到互联网。如果您使用代理,Maven将无法下载任何依赖。
为了使它工作,你必须声明在 Maven 的配置文件中设置代理服务器:settings.xml.
1. Maven配置文件
找到文件 {M2_HOME}/conf/settings.xml, 并把你的代理服务器信息配置写入。注:{M2_HOME} => D:\software\yiibai.com\apache-maven
{M2_HOME}/conf/settings.xml
<!-- 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 | Specification for one proxy, to be used in connecting to the network. | <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> --> </proxies>
取消注释代理选项,填写您的代理服务器的详细信息。
<!-- 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>yiibai</username> <password>password</password> <host>proxy.yiibai.com</host> <port>8888</port> <nonProxyHosts>local.net|some.host.com</nonProxyHosts> </proxy> </proxies>
2. 保存文件
完成后,Apache Maven 应该是能够通过代理服务器立即连接到Internet。
注意:重新启动不是必需的。Maven 只是一个命令,当你调用它,它会再次读取该文件。
0 0
- maven中设置代理服务器
- maven中设置代理服务器
- Maven设置代理服务器
- maven中设置代理服务器
- maven学习笔记--设置代理服务器
- 设置代理服务器
- 设置代理服务器
- 代理服务器设置
- 设置代理服务器
- 宽带上网-----代理服务器设置
- java设置代理服务器
- delphi设置代理服务器
- linux svn 代理服务器设置
- Java中设置代理服务器
- squid代理服务器 基础设置
- Squid代理服务器设置
- maven2中设置代理服务器
- Android 设置代理服务器
- gregorian::date使用
- Hello Oninstack
- 如何为mycncart添加自定义链接
- Android 如何解决dialog弹出时无法捕捉Activity的back事件
- NSObject + NSCoding Category
- Maven设置代理服务器
- [Spring Boot 系列] 集成maven和Spring boot的profile功能
- 建站笔记
- 扩展GridView导出Excel功能
- java实现二叉树的建立以及前序中序后序遍历
- Java中三元运算符值得注意的地方
- View和XenDesktop,到底谁更简单 -- Part I
- MySQL执行计划解读
- 调试 Validform 的辛酸,添加ajax验证机制!