我試圖在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