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
解决方案
假设这不是代理问题,您可能想尝试几件事:
- 添加https://repo1.maven.org/maven2/archetype-catalog.xml作为远程目录。当您处于New Maven Project 窗口中的原型步骤时,选择Configure... -> Add Remote Catalog...,粘贴 URL,并为其命名。
- 删除您的本地 Maven 存储库,默认情况下,该存储库位于
.m2
您的用户主目录的目录中。
如果您使用的是代理,您可以在首选项(常规->网络连接)中配置它。
推荐阅读
- r - 从字符串中提取多个模式
- java - Apache Tomcat 上的 maxHttpHeaderSize 是否考虑所有标头,或者这是“特定于单个标头”的配置?
- arangodb - 使用 Foxx CLI 创建服务
- spring-boot - 在本地使用 Spring Cloud 运行带有 Timer Trigger 的 Azure Function
- python - 一次在多个 xml 文件中添加 <value> 行
- python - 获取对应于条件字段过滤器创建的最后一个 Django 数据库模型实例?
- jquery - 将鼠标悬停在图像上时在鼠标指针处显示图像
- c++ - 我打电话给删除,但我的 d-tor 没有被调用,为什么?
- php - 将 doc 和 docx 转换为图像
- amazon-web-services - Kubernetes RBAC:即使用户似乎拥有所需的权限,也无法获得 cronjob