本文介绍: 背景idea项目中添加了pom文件,在下载依赖过程中报错Could not transfer artifact org.apache.commons:commons–compress:pom:1.9 from/to xxxxx,点击文件在浏览器中能下载,但是在idea中却报错了,这个问题纠结我了很久,终于参考如下链接问题解决了
1. idea添加pom文件后报错Could not transfer artifact org.apache.commons:commons–compress:pom:1.9 from/toxx
背景
idea项目中添加了pom文件,在下载依赖过程中报错
Could not transfer artifact org.apache.commons:commons–compress:pom:1.9 from/to xxxxx,点击文件在浏览器中能下载,但是在idea中却报错了,这个问题纠结我了很久,终于参考如下链接问题解决了
https://blog.csdn.net/u014692224/article/details/112758493
2. 本地有包,但是pom报错
3. Failed to read artifact descriptor for org.mybatis:mybatis–spring:jar:2.0.6
4. No plugin found for prefix ‘dependency’ in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local
pom文件中加入
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<!-- configure the plugin here -->
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
5. [ERROR] Plugin org.apache.maven.plugins:maven–dependency-plugin:3.10.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:3.10.0: Could not transfer artifact org.apache.maven.plugins:maven-dependency-plugin:pom:3.10.0 from/to xx(https://mirrors.tools.xx.com/maven/): Transfer failed for https://mirrors.tools.xx.com/maven/org/apache/maven/plugins/maven-dependency-plugin/3.10.0/maven-dependency-plugin-3.10.0.pom: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
直接浏览这个路径
https://mirrors.tools.xx.com/maven/org/apache/maven/plugins/maven-dependency-plugin/
然后找出存在的版本修改即可,如下是没有3.10这个版本的,把plugin修改为3.5即可
原文地址:https://blog.csdn.net/m0_60688978/article/details/127846231
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.7code.cn/show_29328.html
如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。