Maven passes <<userhome>>/.m2/settings.xml (if not the file, copy <<mavenhome>>/conf/settings.xml to < <userhome>>/.m2/directory) set the HTTP proxy
<?xml version= "1.0" encoding= "UTF-8"? ><settings xmlns= "http://maven.apache.org/SETTINGS/1.0.0" xmlns:x Si= "Http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation= "http://maven.apache.org/SETTINGS/1.0.0 http:/ /maven.apache.org/xsd/settings-1.0.0.xsd: <proxies> <proxy> <id>optional</id> <active>true</active> <protocol>http</protocol> <username>proxyuser</username& Gt <password>proxypass</password>
You can have multiple proxy elements under proxies, and if you declare multiple proxy elements, the first active proxy will take effect by default. Active is true to indicate that the agent is activated. If the agent does not require authentication, username and password elements are not required. The Nonproxyhost element is used to specify which host names do not require a proxy and can be used | Symbol to separate multiple host names, the configuration also supports wildcard characters, such as *.google.com, which means that all domain name visits ending with Google.com do not pass through the proxy.
Set HTTP Proxy