After changing to a new environment, two bugs appeared in the re-imported maven project:
1,
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin: 2.5 or one of
The content is very long, only the first part is intercepted
2、
Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from http://maven.aliyun.com/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from/to nexus (http://maven.aliyun.com/nexus/content/groups/public): maven.aliyun.com。
##The solution is as follows:
1、
(1)Just delete all the folders under the D:\Repositories\.m2\repository\org\apache\maven\plugins folder
(The default address is C:\User\. m2\repository\org\apache\maven\plugins directory)(2)Then right-click the project Maven->Update Project or Alt+F5
2. I took some detours about this. I thought it was a problem with the Alibaba Cloud image configuration. After changing several versions, the result was the same. For example,
<!-- 阿里云镜像 下载配置 --> <mirror> <id>alimaven</id> <mirrorOf>central</mirrorOf> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> </mirror> <!-- <mirror> <id>nexus-aliyun</id> <mirrorOf>central</mirrorOf> <name>Nexus aliyun</name> <url>http://maven.aliyun.com/nexus/content/groups/public</url> </mirror> -->
My existing address is D:\Repositories\.m2\repository\ com, delete the google folder.
(2)Then right-click the project Maven->Update Project or Alt+F5
The problem is solved.The above is the detailed content of Detailed explanation of 2 BUG solutions for maven projects in Java. For more information, please follow other related articles on the PHP Chinese website!