本文介绍: 背景idea项目添加pom文件,在下载依赖过程报错Could not transfer artifact org.apache.commons:commonscompress:pom:1.9 from/to xxxxx点击文件在浏览器中能下载,但是在idea中却报错了,这个问题纠结我了很久,终于参考如下链接题解决了

1. idea添加pom文件后报错Could not transfer artifact org.apache.commons:commonscompress:pom:1.9 from/toxx

背景
idea项目添加pom文件,在下载依赖过程中报错
Could not transfer artifact org.apache.commons:commonscompress:pom:1.9 from/to xxxxx点击文件在浏览器中能下载,但是在idea中却报错了,这个问题纠结我了很久,终于参考如下链接题解决了
https://blog.csdn.net/u014692224/article/details/112758493

2. 本地有包,但是pom报错

在这里插入图片描述
点击update后,点击apply重启idea即可解决

  1. maven窗口依赖有波浪线
    在这里插入图片描述
    参照2更新删除本地包重新cleanpackagemanven窗口左上角的刷新线上和线下、删除pom文件中的依赖close project然后打开

3. Failed to read artifact descriptor for org.mybatis:mybatisspring:jar:2.0.6

删除本地包重新cleanpackage

4. No plugin found for prefixdependencyin the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local

pom文件中加入

<build&gt;
        <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:mavendependency-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进行投诉反馈,一经查实,立即删除!

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注