Intellij Community can't use http proxy for Maven
Navigate to
Maven > Importing
1. inside the IntelliJ IDEA Settings (which is found underFile > Settings
).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). Replace3128
with your proxy port (e.g. 8080).Do the same under
Maven > Runner
1Apply 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:
- Download and install CNTLM. Excellent post here on how to do this https://stackoverflow.com/a/23962313/3298801
- Set and test your local proxy settings in IntelliJ via Settings >> System Settings >> HTTP Proxy.
- In Intellij set the maven runner. Within Settings >> Maven >> runner set VM options to:
-DproxySet=true -DproxyHost=localhost -DproxyPort=3132
- Restart Intellij
- 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.