[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)
几经周折之后,,确定应该和电脑型号有关系。然后查资料发现是与安全凭证有关系。
解决方法
-
-
阿里云的maven镜像仓库改为了https
<mirror> <id>aliyunmaven</id> <mirrorOf>*</mirrorOf> <name>aliyun maven</name> <url>https://maven.aliyun.com/repository/public</url> </mirror>
-
-
-
IDEA的setting是当前项目配置,要使用全局默认配置(setting for new projects)(坑爹)
2020最新版idea配置如下
-
-
-
在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
-