Background
This article demonstrates how configure Apache Maven to use proxy to connect to the network.
[wp_ad_camp_1]
Software Environment
- Windows 7 Professional SP1
- Apache Maven 3.1.1
- Java 1.7 (1.7.0_67 – Windows x86)
Modify conf/settings.xml
[wp_ad_camp_2]
- Download the Apache Maven from http://maven.apache.org/
- Extract the zip file to some directory
- Navigate to conf directory and open settings.xml
Modify the proxies tag
Add the <proxy></proxy> tags within <proxies></proxies>. Below is a sample set up for <proxy>.
1 2 3 4 5 6 7 8 9 10 | <proxy> <id>myproxy</id> <active>true</active> <protocol>http</protocol> <username>turreta</username> <password>this-is-a-very_l0ng_pAssword!</password> <host>globalproxy.acme.com</host> <port>8080</port> <nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts> </proxy> |
[wp_ad_camp_3]