原文:https://blog.csdn.net/afgasdg/article/details/12757433
我的解决办法:
1. Setting.xml文件配置出了问题
文件目录:maven的安装路劲/conf下,如我的“G:\Maven_1903\apache-maven-3.6.0\conf”,我的配置如下所示,采用的是阿里的远程仓库;
<mirrors>
<mirror>
<id>aliyun</id>
<name>aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>central</id>
<url>http://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>ansj-repo</id>
<name>ansj Repository</name>
<url>http://maven.nlpcn.org/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</profile>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
2. 遇到pom.xml上面报错,错误信息:
Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.6
解决办法:可见:https://blog.csdn.net/weixin_39533410/article/details/80059707#commentBox
说明:找该版本的依赖文件是在c://当前用户目录/.m2/repository/org/apache/maven/plugins\maven-resources-plugin\3.0.2,比如我的:
C:\Users\Thinkpad\.m2\repository\org\apache\maven\plugins\maven-resources-plugin\3.0.2