Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin:2.5(解决办法)

idea新创建spring boot项目 build的时候报了这个错(截图如下),原因在于远程仓库下载不了需要的依赖,大部分原因是远程仓库地址有问题。

Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin:2.5(解决办法)_第1张图片

解决方式如下:

1.Idea点击File->Settings->Build,Execution,Deployment->Build Tools->Maven(或者直接设置搜索框搜索Maven,看到这里应该就明白了,maven仓库的setting有问题,找不到地址,就类似于你浏览器输入了一个错误的地址,访问不了Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin:2.5(解决办法)_第2张图片

 2.修改Maven home Path,根据自己安装的目录找到对应的,如下图是我的(若没有maven可自行下载,Maven官方下载地址:Maven – Download Apache Maven,尽量下载zip压缩包,方便点),我这里把maven软件、maven setting 和maven Box放在三个不同的文件夹,就是隔离开,可以将maven软件的conf的settings.xml复制到maven-settings里面,然后修改里面的内容

Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin:2.5(解决办法)_第3张图片

注意:这里的本地仓库地址,要根据你自己的目录设置

D:\tool\maven\maven_box

本地版本库地址加在我的图里面:

Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin:2.5(解决办法)_第4张图片

镜像


        alimaven
        aliyun maven
        https://maven.aliyun.com/repository/public
        central
    
    
        alimaven-central
        aliyun maven central
        https://maven.aliyun.com/repository/central
        central
    
    
        alimaven-spring
        aliyun maven-spring
        https://maven.aliyun.com/repository/spring
        central
    
    
        central
        Maven Repository Switchboard
        https://repo1.maven.org/maven2/
        central
    
    
        jboss-public-repository-group
        central
        JBoss Public Repository Group
        http://repository.jboss.org/nexus/content/groups/public
    
    
        spring-snapshots
        central
        Spring Snapshots
        https://repo.spring.io/snapshot
    
    
        spring-milestones
        central
        Spring Milestones
        https://repo.spring.io/milestone
    
    
      maven-default-http-blocker
      external:http:*
      Pseudo repository to mirror external repositories initially using HTTP.
      http://0.0.0.0/
      true
    

加在

Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin:2.5(解决办法)_第5张图片

 最后进行设置

Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin:2.5(解决办法)_第6张图片

 弄个好了的话一般会默认进行重新更新,若没有的话,点击idea的右边这个maven按钮,然后进行刷新,就好了,完美解决

Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin:2.5(解决办法)_第7张图片

你可能感兴趣的:(后端,软件使用,maven,apache,intellij-idea)