gpt4 book ai didi

maven - Apache Maven 错误 : Could not transfer artifact org. apache.maven.plugins :maven-clean-plugin:pom: 2. 5 到中央

转载 作者:行者123 更新时间:2023-12-04 18:05:46 24 4
gpt4 key购买 nike

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

  <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>

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

最佳答案

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

看看(例如)您的网络浏览器,看看它是如何设置的。

来自 Configuring a proxy 上的文档:

<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>

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

关于maven - Apache Maven 错误 : Could not transfer artifact org. apache.maven.plugins :maven-clean-plugin:pom: 2. 5 到中央,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27038262/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com