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报错

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

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

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

删除本地包重新clean和package

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即可
在这里插入图片描述

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值