I have Intellij IDEA Community installed on a Linux box that needs to use an authenticated proxy to get to the Internet. I have a system-wide proxy on the box that works, and I have the proxy configured in ~/.m2/settings.xml. Maven correctly uses the proxy when I run try it from the command-line.
I have the same proxy configured within Intellij and it gives me the plugins listing correctly. But when I try to sync with the Maven repository withing Intellij I keep getting this:
[WARNING] Unable to get resource 'org.codehaus.mojo:hibernate3-maven-plugin:pom:2.2' from repository restlet (http://maven.restlet.org): Authorization failed: Not authorized by proxy.
I went to Settings->Maven and put in the proxy info as properties and that didn't work. I can see by looking at those settings that Intellij is reading my ~./m2/settings.xml fine because it knows where my local repo is (it's in a non-standard place).
Anyone know how I can get this working?
Maven IntelliJ IDEA supports a fully-functional integration with Maven that helps you automate your building process. You can easily create a new Maven project, open and sync an existing one, add a Maven support to any existing IntelliJ IDEA project, configure and manage a multi-module project.
Configure proxy settings directly from IntelliJ IDEA. Do the following: Open the Version Control | Subversion | Network page of the IDE settings Ctrl+Alt+S . Click the Edit Network Options button and specify the proxy settings in the Edit Subversion Options Related to Network Layers dialog that opens.
I had the same problem running maven inside IntelliJ whilst behind an NTLM proxy. The working solution was as follows:
-DproxySet=true -DproxyHost=localhost -DproxyPort=3132
<proxies> <proxy> <active>true</active> <protocol>https</protocol> <host>localhost</host> <port>3132</port> </proxy> </proxies>
Navigate to Maven > Importing
1. inside the IntelliJ IDEA Settings (which is found under File > 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). Replace 3128
with your proxy port (e.g. 8080).
Do the same under Maven > Runner
1
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With