关闭

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5

641人阅读 评论(0) 收藏 举报
分类:

下载maven-resources-plugin-2.5.jar的网址不能访问。

添加镜像,

C:\Program Files\apache-maven-3.3.9\conf\settings.xml,有同学不知道settings.xml的位置,这里列一下。

=======================================settings.xml=================================================

  <mirrors>
    <!-- mirror
     | Specifies a repository mirror site to use instead of a given repository. The repository that
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
     |
    <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>
    </mirror>
     -->
<mirror>   
        <id>Central</id>   
        <url>http://repo1.maven.org/maven2</url>   
        <mirrorOf>central</mirrorOf>   
    </mirror>  

  </mirrors>

=====================================settings.xml===================================================



----------------------ERROR log-------------------

Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project '项目名称'.


Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5


-----------------------感谢原作者 http://blog.csdn.net/xuefeng0707/article/details/42157311----------------------

Eclipse创建maven项目时报错:maven-resources-plugin:2.5 or one of its dependencies could not be resolved

Eclipse创建maven简单项目时,报错:Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5

Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5




本人解决方法:

修改settings.xml,添加:

[html] view plain copy
  1. <mirror>   
  2.         <id>Central</id>   
  3.         <url>http://repo1.maven.org/maven2</url>   
  4.         <mirrorOf>central</mirrorOf>   
  5.     </mirror>  

而后删除项目重新创建,或者Force Update


0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:51295次
    • 积分:859
    • 等级:
    • 排名:千里之外
    • 原创:15篇
    • 转载:127篇
    • 译文:0篇
    • 评论:6条