[英]Proxy configuration in Eclipse Settings.xml
"Failure to transfer org.apache.maven.plugins:maven-failsafe-plugin:pom:2.16 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will
not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-failsafe-
plugin:pom:2.16 from/to central (http://repo.maven.apache.org/maven2): proxy.example.com"
I am getting the above error in pom tag. 我在pom标签中遇到上述错误。 I searched and found out this is due to proxy settings issue.
我搜索并发现这是由于代理设置问题。 But whatismyip.com shows "no proxy detected".
但是whatismyip.com显示“没有检测到代理”。
Question 1: Still could I be behind proxy? 问题1:我还能支持代理吗? If yes how to get the information about proxy.
如果是,如何获取有关代理的信息。
I learned that users>home>.m2>settings.xml needs to be updated with proxies. 我了解到用户> home> .m2> settings.xml需要使用代理进行更新。 For ex:
例如:
<proxies>
<proxy>
<id>example-proxy</id>
<active>true</active>
<protocol>http</protocol>
<username>tomcat</username>
<password>tomcat</password>
<host>proxy.example.com</host>
<port>8008</port>
<nonProxyHosts>www.google.com|*.example.com</nonProxyHosts>
</proxy>
</proxies>
Question 2: In this what do I substitute for my case in tag or where can I find information that is specific to myself. 问题2:在这里我可以用标签代替我的案例,或者在哪里可以找到特定于我自己的信息。
Question 3: Is there any correlation between users>home>.m2>settings.xml and eclipse window>preferences>general>network Connections>Active Provider(Manual)>http. 问题3:用户>主页> .m2> settings.xml 与 eclipse窗口>首选项>常规>网络连接>活动提供程序(手动)> http之间是否存在任何关联。 Do I need to update the same information in both places.
我是否需要在两个地方更新相同的信息。
Question 1: Still could I be behind proxy?
问题1:我还能支持代理吗? If yes how to get the information about proxy.
如果是,如何获取有关代理的信息。
Assuming you are using Windows : 假设您使用的是Windows :
inetcpl.cpl
, OK. inetcpl.cpl
,OK。 Connections
tab and press Lan settings
button. Connections
选项卡,然后按Lan settings
按钮。 Question 2: In this what do I substitute for my case in tag or where can I find information that is specific to myself.
问题2:在这里我可以用标签代替我的案例,或者在哪里可以找到特定于我自己的信息。
Substitute the <host>
and <port>
in your settings.xml
with Step 3 data. 使用Step 3数据替换
settings.xml
的<host>
和<port>
。
Question 3: Is there any correlation between users>home>.m2>settings.xml and eclipse window>preferences>general>network Connections>Active Provider(Manual)>http.
问题3:用户>主页> .m2> settings.xml与eclipse窗口>首选项>常规>网络连接>活动提供程序(手动)> http之间是否存在任何关联。 Do I need to update the same information in both places.
我是否需要在两个地方更新相同的信息。
No. They are different. 不,他们是不同的。 What mostly works in Eclipse is the Native network connection mode:
Window > Preferences > General > Network Connections > Active Provider > Native
. Eclipse中最常用的是Native网络连接模式:
Window > Preferences > General > Network Connections > Active Provider > Native
。 This makes Eclipse to use your native browser's settings (IE in case of Windows). 这使Eclipse可以使用您的本机浏览器设置(在Windows的情况下为IE)。
There are various sites to check if you are behind a proxy or not. 有各种网站可以检查您是否在代理服务器后面。 However, if you are behind then it must be configured in your browser;
但是,如果您落伍,则必须在浏览器中进行配置; check there to see all the information about it.
检查那里以查看有关它的所有信息。
There is a difference about the settings.xml
file of Maven and network connections of Eclipse. 有关Maven的
settings.xml
文件和Eclipse的网络连接的不同之处。
settings.xml
is a Maven-specific file. settings.xml
是Maven特定的文件。 Whenever Maven (and Eclipse through the m2e plugin) will be searching for a dependency, it will use the proxy information located in this file. Also, the error message you have ( Failure to transfer ... from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
), this is a very well known issue and it is solved by launching Maven with the -U flag . 此外,您所拥有的错误消息(
Failure to transfer ... from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
),这是一个非常著名的问题,它是通过启动Maven的解决与-U标志 。 This flag forces Maven to update any dependencies. 此标志强制Maven更新任何依赖项。 See this question for a way to do that in Eclipse.
有关在Eclipse中执行此操作的方法, 请参阅此问题 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.