Intellij社区不能为Maven使用http代理 [英] Intellij Community can't use http proxy for Maven

查看:439
本文介绍了Intellij社区不能为Maven使用http代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Linux机器上安装了Intellij IDEA社区,需要使用经过身份验证的代理才能访问Internet。我在盒子上有一个系统范围的代理,我在〜/ .m2 / settings.xml中配置了代理。当我从命令行运行时,Maven正确使用代理。

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.

我在Intellij中配置了相同的代理,它正确地为我提供了插件列表。但是当我尝试使用Intellij与Maven存储库同步时,我会继续这样做:

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.

我去了Settings-> Maven并将代理信息作为属性输入并且不起作用。我可以通过查看Intellij正在阅读我的〜。/ m2 / settings.xml的那些设置来查看,因为它知道我的本地仓库在哪里(它位于非标准位置)。

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?

推荐答案

我在〜/中注释掉了代理配置。 m2 / settings.xml文件,单独使用Intellij Proxy信息,然后在Setting-> Maven中提供属性。不知道为什么这样做(也不是为什么settings.xml不能正常工作)但它现在正在工作。

I commented out the proxy config in my ~/.m2/settings.xml file, let the Intellij Proxy info alone, and then supplied the properties in Setting->Maven. Not sure why that worked (nor why the settings.xml wasn't working right) but it's working now.

这篇关于Intellij社区不能为Maven使用http代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆