Maven in 5 minutes dose not work - firewall issue

When I start to learn maven following the Maven in 5 minutes in the maven official site:http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
I got an error message lik fail to found some artifacts.

It is caused by the net is wrapped by firewall. To resolve this issue need customize the proxy settings for maven.

Steps
1) Locate the maven settings.xml.
You have 2 choice: one for global scope, under <M2_HOME>/conf.another one for current user: under <UserName>/.m2 folder.

Uncomment the <proxy></proxy> block:
<!--
<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>
-->
2)Find the real value of the proxy. It can be found in your browser.
E.g. In IE->Tools->Options->Link->Lan Configuration->
There is a link in the address inputbox: mine is "http://wpad/wpad.dat"

3) Then can download a wpad.dat file from the address. Open the file, search keyword like "proxies = "PROXY cn-proxy.cn.xxx.com:80".

4) Modify the proxy block with the real value.

5) Run the maven command again.

Reference:
http://www.java-tutorial.ch/maven/how-to-configure-maven-behind-an-auto-configured-proxy
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值