首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Apache错误:无法将工件org.apache.maven.plugins:maven-clean-plugin:pom: 2.5传输到中心

Apache错误:无法将工件org.apache.maven.plugins:maven-clean-plugin:pom: 2.5传输到中心
EN

Stack Overflow用户
提问于 2014-11-20 11:18:25
回答 1查看 14.9K关注 0票数 3

我是新来的。我在研究apache maven。我在代理服务器后面工作。每次我都试图构建maven项目。它给了我这个错误。我还在settings.xml文件中更改了代理设置。但这是行不通的。一直给我同样的问题。建造失败。我在网上寻找答案。但我找不到。我正在尝试将CAS集成到我的web应用程序和站点中。如果有人对此也有建议,请帮助我。编辑:- pom.xml文件:-

代码语言:javascript
复制
  <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>

错误:-

代码语言:javascript
复制
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>

我认为我遇到了问题,因为公司代理服务器限制了一切。

EN

回答 1

Stack Overflow用户

发布于 2014-11-20 12:19:09

我认为您需要在settings.xml中正确地设置一个maven代理。

在您的web浏览器中查看(例如)并查看它是如何设置的。

来自配置代理的文档

代码语言:javascript
复制
<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>

最好问你的同事工作代理。没有公司会阻止这件事

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27038262

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档