onknows
onknows

Reputation: 6681

How to configure Maven to not use proxy server

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.

Upvotes: 5

Views: 17426

Answers (1)

Aaron Digulla
Aaron Digulla

Reputation: 328536

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

Upvotes: 6

Related Questions