您的位置:首页 > 运维架构 > Apache

idea 下载依赖不全 导致的报错:Cannot resolve plugin org.apache.maven.plugins:maven-deploy-plugin:2.8.2

2020-06-29 04:31 5386 查看

idea 下载依赖不全 导致的报错:Cannot resolve plugin org.apache.maven.plugins:maven-deploy-plugin:2.8.2

下载完全的依赖应该有5个文件:

_remote.repositories

maven-deploy-plugin-2.7.jar

maven-deploy-plugin-2.7.jar.sha1

maven-deploy-plugin-2.7.pom

maven-deploy-plugin-2.7.pom.sha1

如果下载不全就会报错,需要删除整个本地仓库,重新

clean
install

我到处百度查,搞了两天,才弄出来

第一步

首先看看我的setting.xml

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

<pluginGroups />
<proxies />
<servers />

<!-- maven本地仓库 -->
<localRepository>D:\Apache\maven-repository</localRepository>

<mirrors>
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
</mirror>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>central</id>
<name>Maven Repository Switchboard</name>
<url>http://repo1.maven.org/maven2/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo2.maven.org/maven2/</url>
</mirror>
<mirror>
<id>ibiblio</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>
</mirror>
<mirror>
<id>jboss-public-repository-group</id>
<mirrorOf>central</mirrorOf>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
</mirror>
<mirror>
<id>google-maven-central</id>
<name>Google Maven Central</name>
<url>https://maven-central.storage.googleapis.com
</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>maven.net.cn</id>
<name>oneof the central mirrors in china</name>
<url>http://maven.net.cn/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>

<mirror>
<id>nexus-aliyun</id>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>nexus</id>
<name>internal nexus repository</name>
<url>http://repo.maven.apache.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>

</settings>

我百度到一个就往里面加一个 0—0(太难了)

第二步

然后设置 VM Options

Setting -> Build,Execution... -> Build Tools -> Maven -> Runner

设置

-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true

第三步

  1. 点击右边的Maven,点击小写m
  2. 输入命令运行
mvn -U idea:idea
  1. 都下载完毕后,在点击 刷新图标 即Reimport

最后

就可以了

具体原因不知道,我也不知道,到底是那一步起到作用,哈哈哈。。。。

但是我最后可以了

希望能够帮到你

也希望知道其他方法的可以给我讲一讲0.0,感谢

参考文章

idea中maven下载jar包不完整问题

pom文件中的依赖下载不完整问题和依赖已经下载到本地仓库IDEA却不能导入问题

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐