Maven proxy settings and maven proxy settings
Set % MAVEN_HOME %/conf/setting. xml in the maven installation directory.
<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 <Port> 80 </port>
<NonProxyHosts> local.net | some.host.com </nonProxyHosts>
</Proxy>
-->
</Proxies>
Proxies can have multiple proxy elements. If multiple Proxy elements are declared, the first activated proxy will take effect by default (written earlier)
If the value of <active> is true, the proxy is activated.
<Protocol> indicates the proxy protocol used.
<Host> the correct host name
<Port> port
When authentication is required for contemporary management services, that is, the <username> <password> <nonProxyHost> elements must be used for user name and password verification.
You can use "|" to separate multiple host names.
<NonProxyHosts> indicates that domain names that do not require proxy can use the wildcard "* .google.com" to indicate that all domain names ending with google.com cannot be accessed through proxy.
The above content is excerpted from maven practice