我试图在NetBeans 7.4中设置Maven代理,因为我在代理之后。我在工具>选项>常规>代理设置中设置NetBeans中的代理,并且工作正常。但是当我尝试构建我的项目时,我仍然遇到错误。如何设置Maven代理
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.maven.apache.org -> [Help 1]
我的maven的settings.xml文件一派错误信息,然后设置了相同的代理服务器,但再次出现错误。
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/to central (http://repo.maven.apache.org/maven2): Not authorized by proxy , ReasonPhrase:Proxy Authentication Required. -> [Help 1]
有没有人知道什么是错的?
添加代理服务器设置:
<proxies>
<!-- proxy
| Specification for one proxy, to be used in connecting to the network.
|-->
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<host>proxyhost</host>
<port>8080</port>
<nonProxyHosts>localhost|*.google.com.*</nonProxyHosts>
</proxy>
</proxies>
请发布你的maven本地仓库settings.xml –
添加代理设置 – thinwa