Maven遇到插件下载不下来(Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin:2.5)

今天解决这个问题
Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin:2.5
很多人都说下面三个配置不一致,下图中这三个配置都一致!!!
在这里插入图片描述
联通网段不能访问maven的下载地址

反正就是因为网络问题导致不能下载插件,那我们就来多配几个镜像!!!(之前我只配置了一个阿里云镜像)

配置settings.xml文件中的镜像:

 <mirrors>
	 <!-- maven官方镜像 -->
<mirror>
<id>mirrorId</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name </name>
<url>http://repo1.maven.org/maven2/</url>
</mirror>

<!-- 又一个镜像 -->
<mirror> 
<id>alimaven</id> 
<name>aliyun maven</name> 
<url>http://central.maven.org/maven2</url> 
<mirrorOf>central</mirrorOf> 
</mirror>

<!-- 阿里云镜像 -->
<mirror> 
<id>alimaven</id> 
<name>aliyun maven</name> 
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url> 
<mirrorOf>central</mirrorOf> 
</mirror>

<!-- junit镜像地址 -->
<mirror> 
<id>junit</id> 
<name>junit Address/</name> 
<url>http://jcenter.bintray.com/</url> 
<mirrorOf>central</mirrorOf> 
</mirror>

  </mirrors>

问题解决


版权声明:本文为weixin_39778417原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。