Intellij Community can't use http proxy for Maven

  1. Navigate to Maven > Importing1. inside the IntelliJ IDEA Settings (which is found under File > Settings).

  2. The second last option in Maven > Importing is a field named "VM options for importer". Append the following to whatever already exists there:

    -DproxySet=true -DproxyHost=myproxy.com -DproxyPort=3128

    Here, replace myproxy.com with your proxy server, (e.g. http://myproxyserver.com). Replace 3128 with your proxy port (e.g. 8080).

  3. Do the same under Maven > Runner1

  4. Apply and close the settings window.

It should work now.


1 This may be nested under Build, Execution, Deployment > Build Tools >, depending on the version of IntelliJ you're using.


I had the same problem running maven inside IntelliJ whilst behind an NTLM proxy. The working solution was as follows:

  1. Download and install CNTLM. Excellent post here on how to do this https://stackoverflow.com/a/23962313/3298801
  2. Set and test your local proxy settings in IntelliJ via Settings >> System Settings >> HTTP Proxy.
  3. In Intellij set the maven runner. Within Settings >> Maven >> runner set VM options to:
    -DproxySet=true -DproxyHost=localhost -DproxyPort=3132
  4. Restart Intellij
  5. Note within ~/.m2/settings.xml I also added my proxy config as:
<proxies>
        <proxy>
            <active>true</active>
            <protocol>https</protocol>
            <host>localhost</host>
            <port>3132</port> 
        </proxy>
</proxies>

A little update for memo. I don't have a standalone maven installed, so finally I fixed this by modifying the maven plugin settings. settings.xml is located at :

IntelliJ IDEA Community Edition 2017.3.4\plugins\maven\lib\maven3\conf\settings.xml

You can find proxy settings and change it as mentioned above.