Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure Maven to not use proxy server

Tags:

maven

I am trying to configure Maven to not use a proxy server. This turns out to be a lot of work. Somewhere Maven has read some proxy information which it keeps on using.

I tried the following already.

  1. in the terminal unset http_proxy and https_proxy
  2. I did not have a settings.xml. I added one and added a proxy config to it with active is false
  3. In settings.xml active = true and nonProxyHosts = *
  4. I remove proxy settings from /etc/environment

I don't want to install a local proxy server just to get this working, is there another way to tell Maven not to use a proxy server.

like image 208
onknows Avatar asked Dec 30 '14 12:12

onknows


1 Answers

The first step is to ask Maven to show you what configuration it sees/uses. Use the Help plugin for this: mvn help:effective-pom shows you the complete POM that Maven will use and help:effective-settings will do the same for the settings.xml.

Now you can see whether there are any proxy settings in those outputs, just to make sure the Maven universe is clean. My guess is that someone changes the global/default settings.xml from the conf folder of your Maven installation.

Afterwards, you need to check the proxy options which Java uses. Check your environment and the file $HOME/.mavenrc

like image 169
Aaron Digulla Avatar answered Nov 15 '22 03:11

Aaron Digulla