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
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