gpt4 book ai didi

java - '创建maven-archetype-quickstart'遇到了一个问题

转载 作者:行者123 更新时间:2023-12-05 07:54:33 26 4
gpt4 key购买 nike

我安装了maven 3.3.3,安装成功。

但是,在尝试在 Eclipse 中创建 Maven 项目时出现以下错误

'Creating maven-archtype-quickstart' has encountered a problem

Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1
Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from/to central (https://repo.maven.apache.org/maven2): Connection refused: connect
Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from/to central (https://repo.maven.apache.org/maven2): Connection refused: connect

我已将代理详细信息添加到我的 settings.xml(从我的浏览器中获取),有/没有用户名密码

<proxies>
<proxy>
<id>462603</id>
<active>true</active>
<protocol>http</protocol>
<username>com\462603</username>
<password>xxxxxxxx</password>
<host>proxy.company.com</host>
<port>6050</port>
<nonProxyHosts>10.*|*.company.com</nonProxyHosts>
</proxy>
</proxies>

我在 Eclipse->Windows->Preferences->Maven->User Settings 中列出了这个 settings.xml

还添加了原型(prototype) http://repo1.maven.org/maven2/archetype-catalog.xml在 Eclipse->Windows->Preferences->Maven->Archtype

除此之外,错误仍然存​​在

我知道有很多这样的重复问题,但是所有提到的解决方案都没有用

最佳答案

保持互联网连接,

第 1 步:- 删除 .m2 文件夹

第 2 步:- 打开 Eclipse,点击 Window->Preferences

第 3 步:- 弹出窗口将显示,单击 Maven-> Archetype

第 4 步:- 单击“添加远程目录”

第 5 步:- 输入详细信息

        CATALOG FILE = https://repo1.maven.org/maven2/archetype-catalog.xml
DESCRIPTION = maven_catalog

第 6 步:- 点击验证,验证后点击确定。

关于java - '创建maven-archetype-quickstart'遇到了一个问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31098815/

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