微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

无法在 Eclipse IDE 中使用 maven

如何解决无法在 Eclipse IDE 中使用 maven

在选择 File->new->other->Maven Project-> maven-archetype-quickstart version 1.1 后,我试图在我的 Eclipse IDE 中创建 Maven 项目,但我收到此错误

无法从任何配置的存储库中解析原型 org.apache.maven.archtypes:maven-archtype-quickstart1:1。

我尝试了很多方法,但错误仍然存​​在。我也卸载了 eclipse 并安装了几次,这个错误仍然存​​在。有人能帮我解决这种情况吗。

以下是我的错误跟踪

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): PKIX path building Failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
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): PKIX path building Failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

解决方法

假设这不是代理问题,您可能想尝试一些事情:

  • Why would one use Task<T> over ValueTask<T> in C#? 添加为远程目录。当您在 New Maven Project 窗口 中的原型步骤中时,选择 Configure...->Add Remote Catalog...,粘贴URL,并为其命名。
  • 删除您的本地 Maven 存储库,默认情况下,该存储库位于您用户主目录的 .m2 目录中。

如果您使用代理,您可以在首选项(常规->网络连接)中进行配置。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。