zoukankan      html  css  js  c++  java
  • 新装mvn建第一个项目报错org.apache.maven.plugins:maven-resources-plugin:2.6

    1、第一次创建mvn项目会报maven-resources-plugin-2.6.jar错,原因是mvn无法自动下载这个jar包,多次删除这个目录下的C:UsersAdministrator.m2 epositoryorgapachemavenplugins(你自己的目录)所有文件(有时候会解决,有的时候不会解决这个问题),自动下载maven-resources-plugin-2.6.jar还是不行(多次从装都没有这个问题,最近换了网络,估计是网络不行造成的)。

    2、解决方法:在mvn项目下pom.xml文件下手动

    项目有jar包可以直接在里边加上这段

    <dependency>

      <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-resources-plugin</artifactId>
       <version>2.6</version>
    </dependency>

    如果是新装没有jar包的话直接输入会报错

     加一个标签即可

    <dependencies>

       <dependency>

         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-resources-plugin</artifactId>
         <version>2.6</version>
        </dependency>

    </dependencies>

    在建好的mvn项目上run as --》maven install下载即可

    3、总结大部分出现这种错误的直接删除1、中的目录下文件 新建mvn项目即可解决,如果无法解决请按照2、进行操作即可。

    我的报错信息如下:

    ```java

    Errors occurred during the build.
    Errors running builder 'Maven Project Builder' on project 'shouka_merchant'.
    Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
    Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
    Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
    Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
    Errors running builder 'Maven Project Builder' on project 'shouka_new'.
    Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
    Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
    Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
    Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6

  • 相关阅读:
    Nginx作为反向代理时传递客户端IP的设置方法
    通过VNC远程连接Linux实例
    【Office-Word妙手回春】Word文本秒转表格
    如何在Windows7安装U盘中加入USB3.0驱动的支持
    关注mainfest.mf的说明
    netty cs 过高优化
    查看MySql使用的数据库引擎
    DispatcherServlet--研究spring mvc 处理 流程必读源码
    PostConstruct,PreDestroy 注解处理器类 InitDestroyAnnotationBeanPostProcessor
    @autoware 注解处理器
  • 原文地址:https://www.cnblogs.com/jpfss/p/9100162.html
Copyright © 2011-2022 走看看