maven Connection refused: connect

时间:2023-03-09 08:16:09
maven Connection refused: connect

现象:

本地可以访问错误提示中的地址。但使用maven无法下载jar包。

环境:

浏览器上网需要使用代理

解决方法:

设置成正常代理可以。具体方法可以下载一个代理工具。只要IE配置成能直接访问http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 表示能正常下载了。
配置
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>127.0.0.1</host>
<port>8282</port>
<nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
</proxy>
关键的
<host>127.0.0.1</host>
<port>8282</port>
只要与你的ie代理客户端 配置一致就可以。