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
Tutorial Apache Maven - Proxy Settings
Locate the Apache maven settings.xml file.
Edit the Apache maven settings.xml file.
Locate the proxies configuration area.
Add a Proxy section to HTTP and another Proxy section to HTTPS.
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