解决ide的[ERROR] Plugin org.apache.maven.plugins:maven-archetype-plugin:RELEASE or one of its dependenc

本文介绍了在使用联想小新pro13笔记本进行maven项目创建时遇到的[ERROR] Plugin org.apache.maven.plugins:maven-archetype-plugin:RELEASE错误。错误并非由于配置文件错误,而是与电脑型号和安全凭证有关。解决方案是调整阿里云maven镜像仓库为https,并在IDEA的全局默认配置中,修改maven runner的VM options以忽略证书问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[ERROR] Plugin org.apache.maven.plugins:maven-archetype-plugin:RELEASE or one of its dependencies…

前言:
我用的是联想小新pro13的笔记本,今天创建maven项目的时候死活报错。原以为是我配置文件写错了。按照网上很多很多教程,还是不行,报

[ERROR] Plugin org.apache.maven.plugins:maven-archetype-plugin:RELEASE or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-archetype-plugin:jar:RELEASE: Failed to resolve version for org.apache.maven.plugins:maven-archetype-plugin:jar:RELEASE: Could not find metadata org.apache.maven.plugins:maven-archetype-plugin/maven-metadata.xml in local (D:\maven-repo) -> [Help 1]  
[ERROR]  
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.  
[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 read the following articles:  
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException  
[ERROR] Maven execution terminated abnormally (exit code 1)  

几经周折之后,,确定应该和电脑型号有关系。然后查资料发现是与安全凭证有关系。

解决方法

    1. 阿里云的maven镜像仓库改为了https

         <mirror>
            <id>aliyunmaven</id>
            <mirrorOf>*</mirrorOf>
            <name>aliyun maven</name>
            <url>https://maven.aliyun.com/repository/public</url>
          </mirror>
      

      在这里插入图片描述

    1. IDEA的setting是当前项目配置,要使用全局默认配置(setting for new projects)(坑爹)

      2020最新版idea配置如下

      在这里插入图片描述

      在这里插入图片描述

    1. 在setting for project中把maven的runner中的VM options添加如下语法(忽略证书问题)

      -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
      

      参考:https://www.jianshu.com/p/f0f1d6f33f97

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值