Home > Java > javaTutorial > Detailed explanation of 2 BUG solutions for maven projects in Java

Detailed explanation of 2 BUG solutions for maven projects in Java

黄舟
Release: 2017-08-23 11:21:20
Original
3472 people have browsed it

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
Copy after login

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。
Copy after login


##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> -->
Copy after login
Later, it was found out that the reason was because there was already a version that failed to download. You need to find the directory where the file is located and delete it manually

(1)

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template