Working environment is in the local area network, want to access the external network is through the proxy to access the external network, recently in writing Maven project, need to rely on the download can not directly access external networks, need to configure the agent
1. First, in idea, configure the proxy address Settings->system settings, HTTP proxy in host name fill in the address of their local area network and the following port number
Tip: about how to view the proxy address of the LAN open the upper right corner of IE browser settings and then Internet settings
This step is well-configured.
2. Set the proxy address in the MAVEN configuration file
Add the following label nodes to the MAVEN configuration file settings.xml
<proxies> <!--Proxy | Specification for one proxy, to is used in connecting to the network. | <proxy> <id>optional</id> <active>true</active> <protocol>http</prot ocol> <username>proxyuser</username> <password>proxypass</password> - <Proxy> <ID>My-proxy</ID> <Active>True</Active> <Protocol>http</Protocol> <Host>172.xxx.xxx.20</Host> Agent's IP <Port>3xx8</Portports for > Agents </Proxy> </proxies>
The above two steps can be used to resolve the state of the external network that cannot be accessed directly.
Idea Configuring the HTTP proxy