Apache Maven错误:无法将工件org.apache.maven.plugins:maven-clean-plugin:pom:2.5传输到中央 [英] Apache Maven Error : Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom: 2.5 to central
问题描述
我是新来的.我正在做Apache Maven.我正在代理服务器后面.每次,我都尝试构建Maven项目.它给了我这个错误.我还更改了settings.xml文件中的代理设置.但这是行不通的.它一直给我同样的问题.构建失败.我已经在网上搜索了答案.但是我找不到它.我正在尝试将CAS集成到我的Web应用程序和站点中.如果有人对此有任何建议,请帮助我.-pom.xml文件:-
I am new at this. I am working on apache maven. I am working behind a proxy server. Every time, I try to build maven project. It gives me this error. I also changed proxy settings in settings.xml file. But It is not working. It keeps giving me same problem. Build Failure. I have searched for answer on net. But I could not find it. I am trying to integrate a CAS into my web applications and sites. If anybody also has suggestion for that please help me. - pom.xml file:-
<proxies>
<!-- proxy
| Specification for one proxy, to be used in connecting to the network.
|-->
<proxy>
<id>myproxy</id>
<active>true</active>
<protocol>http</protocol>
<username>username</username>
<password>pass</password>
<host>companyhost</host>
<port>8080</port>
<!-- <nonProxyHosts>local.net|some.host.com</nonProxyHosts>-->
</proxy>
</proxies>
错误:-
C:\workspace\local-cas>mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building local-cas 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/mave
-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:03 min
[INFO] Finished at: 2014-11-20T17:03:32+05:30
[INFO] Final Memory: 8M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its de
endencies could not be resolved: Failed to read artifact descriptor for org.apa
he.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.ap
che.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.mave
.apache.org/maven2): Connect to host.com:8080 failed: Conection timed out: connect -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swi
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please re
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolut
onException
C:\workspace\local-cas>
我认为我遇到了麻烦,因为公司代理服务器限制了一切.
I think that I am getting problem because everything is restricted due to company proxy server.
推荐答案
我认为您需要在 settings.xml
中正确设置一个Maven代理.
I think you need to set up a maven proxy in your settings.xml
properly.
例如,在您的Web浏览器中浏览一下,看看它是如何设置的.
Have a look (for example) in your web browser and see how it is set up.
从配置代理中的文档:
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy.somewhere.com</host>
<port>8080</port>
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
</proxy>
最好请您的同事提供工作代理.没有公司会阻止此事
Better ask your colleague for working proxy. No company will block this thing
这篇关于Apache Maven错误:无法将工件org.apache.maven.plugins:maven-clean-plugin:pom:2.5传输到中央的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!