Would you like to learn how to configure the Apache Maven server to use a Proxy to reach the Internet? In this tutorial, we are going to show you how to edit the settings.xml file to enable the use of a proxy server on Apache Maven.

• Ubuntu 18.04
• Ubuntu 19.04
• Ubuntu 19.10
• Apache Maven 3.6.2
• Openjdk version 11.0.4

Hardware List:

The following section presents the list of equipment used to create this Apache Maven tutorial.

Every piece of hardware listed above can be found at Amazon website.

Apache Maven – Related Tutorial:

On this page, we offer quick access to a list of tutorials related to Apache Maven.

Tutorial Apache Maven – Proxy Settings

Locate the Apache maven settings.xml file.

Copy to Clipboard

Edit the Apache maven settings.xml file.

Copy to Clipboard

Locate the proxies configuration area.

Copy to Clipboard

Add a Proxy section to HTTP and another Proxy section to HTTPS.

Copy to Clipboard

In our example, we are using the proxy server 192.168.0.20 on TCP port 3128.

In our example, we are using the proxy username proxyuser and the proxy password proxypass.

Keep in mind that you need to change the IP, username and password to reflect your network environment.

The Apache Maven installation was successfully configured to use a proxy for HTTP and HTTPS access