Maven Set HTTP Proxy

Source: Internet
Author: User

Background: Sometimes the company is in security considerations, need to access the Internet through proxy, this situation needs to set up HTPP agent for Maven

The setup steps are as follows:

1 First confirm that you cannot access the public central warehouse of the extranet (can be checked by pinging repo1.maven.org)

2 Ensure that the proxy server is unblocked (for example, the proxy server IP is: 218.23.234.86, you can telnet 218.23.234.86 detect that the address port is unblocked)

3 after checking the above two items, edit the ~/.m2/settings.xml file, add the following configuration

Locate the <proxies> node. Remove the corresponding comment and set the proxy information as follows:

1 <proxy> 2       <id>optional</id> 3       <active>true</active> 4       <protocol> Http</protocol> 5       <username>proxyuser</username> 6       <password>proxypass</ Password> 7       

Node Element Description:

ID: The name of the agent (whatever, XYZ is OK)

Active: Indicates whether the agent is active

Protocol: Agent Agreement, this does not change

Username: User name when the agent needs authentication (if the agent does not require user authentication, username and password two nodes can be commented out)

Password: password when the agent needs authentication

Host: IP address of the proxy

Port: Port number of the agent

Nonproxyhost: Specifies a host that does not need to use a proxy, not set. If there are multiple, use | Separated

Maven Set HTTP Proxy

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.