创建maven project时工程报错
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 transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to nexus (http://localhost:8080/nexus-2.7.0-06/content/groups/public/): Connect to localhost:8080 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect -> [Help 1]

方法一:网上有很多人说以下方法可行

1.打开maven根目录里的config并打开settings.xml找到本地仓库位置即<localRepository>F:/taotao/repository</localRepository>

2.打开F:\taotao\repository\org\apache\maven\plugins清空里面的plugins

3.右键maven工程->run as->maven install

方法二:

1.打开maven根目录里的config并打开settings.xml添加

<mirror>   
            <id>Central</id>   
            <url>http://repo1.maven.org/maven2</url>   
            <mirrorOf>central</mirrorOf>   
        </mirror>

2.打开F:\taotao\repository\org\apache\maven\plugins清空里面的plugins

3.右键maven工程->run as->maven install,此时将会下载大部分plugins,但是又出现了以下问题
Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project itcast-usemanage: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]

4-1.项目中有web.xml,则在pom.xml的<build>节点上加上maven-war-plugin配置

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<webResources>
<resource>
<directory>WebContent</directory>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>

4-2.项目中有web.xml,则在pom.xml的<build>节点上加上maven-war-plugin配置

<plugins> 
    <plugin> 
        <groupId>org.apache.maven.plugins</groupId> 
        <artifactId>maven-war-plugin</artifactId> 
        <version>3.0.0</version> 
        <configuration> 
            <failOnMissingWebXml>false</failOnMissingWebXml> 
        </configuration> 
    </plugin> 
</plugins> 
5.右键maven工程->run as->maven install,成功解决问题

方法三:

1.windows->preferences->maven->lifecycle mapping找到里面的mapping file location

地址为:D:/itcast-workspace/.metadata/.plugins/org.eclipse.m2e.core/lifecycle-mapping-metadata.xml

当我们打开的时候发现招不到这个路径

2.打开eclipses的根目录打开plugins找到名为org.eclipse.m2e.lifecyclemapping.defaults_1.5.0.20140606-0033.jar的包

3.解压步骤2中的jar包至步骤1中的mapping file location并打开lifecycle-mapping-metadata.xml

4.如缺少maven-compiler-plugin就添加其配置
    <pluginExecution>
      <pluginExecutionFilter>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <versionRange>[2.5.1,)</versionRange>
        <goals>
          <goal>testCompile</goal>
          <goal>compile</goal>
        </goals>
      </pluginExecutionFilter>
      <action>
        <ignore/>
      </action>
    </pluginExecution>

5.windows->preferences->maven中将update maven projects on startup勾上

6.右键项目->maven->update projects

												

Plugin org.apache.maven.plugins:maven-resources-plugin:2.6的更多相关文章

  1. maven Error resolving version for plugin 'org.apache.maven.plugins:maven-eclipse-plugin' from the repositories 解决

    报错:Error resolving version for plugin 'org.apache.maven.plugins:maven-eclipse-plugin' from the repos ...

  2. CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved

    CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin ...

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

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

  4. maven install 报错Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin

    Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of ...

  5. Maven命令行创建web项目,并部署到jobss当中(解决No plugin found for prefix 'jboss-as' in the current project and in the plugin groups [org.apache.maven.plugins,问题)

    首件创建项目:此处可参照:http://maven.apache.org/guides/mini/guide-webapp.html mvn archetype:generate -DgroupId= ...

  6. Eclipse使用Maven,创建项目出现:Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resour

    使用maven创建简单的项目时候经常会遇到 Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resource ...

  7. eclipse导入maven项目时报Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources

    在用Eclipse IDE for Java EE Developers进行maven项目的开发时,报错Could not calculate build plan: Plugin org.apach ...

  8. Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.3

    Maven 导入项目时报错: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.3 ...

  9. maven报错【Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of】

    [自己的操作] (1)windows -> Preferences -> maven 的settings.xml文件中.m2的位置已经失效,更改正确后尝试 (2)pom.xml还有下面错误 ...

  10. could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of(maven报错)

    could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of ...

随机推荐

  1. PC/SC双界面读写器开发指南

    友我科技PCSC双界面读写器YW-606开发指南 1.建立资源管理器的上下文 函数ScardEstablishContext()用于建立将在其中进行设备数据库操作的资源管理器上下文(范围). 函数原型 ...

  2. Docker系列01-容器初探

    关于容器的发展史 关于容器有不得不说的历史故事,以下资料来自于互联网收集整理所得: 容器概念始于 1979 年提出的 UNIX chroot,它是一个 UNIX 操作系统的系统调用,将一个进程及其子进 ...

  3. html 初识 文档结构 常用标签

    HTML初识 △HTML: 超文本标记语言,是一种用于创建网页的标记语言,不是编程语言,没有逻辑 本质上是浏览器可识别的规则 我们按照规则写网页,浏览器根据规则渲染我们的网页.对于不同的浏览器,对同一 ...

  4. 单选框radio改变事件

    <input type="radio" name="bedStatus" id="allot" checked="check ...

  5. RMAN 'Duplicate From Active Database' Feature in Oracle11g (Doc ID 452868.1)

    RMAN 'Duplicate From Active Database' Feature in Oracle11g (Doc ID 452868.1) APPLIES TO: Oracle Data ...

  6. Tornado之接口调用时方式执行顺序

    Tornado之接口调用顺序 initialize() 作用:做一些初始化操作 prepare() 作用:预处理方法,在执行对应的请求方法之前调用 注意:任何一种HTTP请求,都会执行prepare方 ...

  7. Linux-3.14.12内存管理笔记【伙伴管理算法(3)】

    前面分析了伙伴管理算法的初始化,在切入分析代码实现之前,例行先分析一下其实现原理. 伙伴管理算法(也称之为Buddy算法),该算法将所有空闲的页面分组划分为MAX_ORDER个页面块链表进行管理,其中 ...

  8. Java学习笔记(5)--- Number类和Math 类,String类的应用,Java数组入门

    1.Number 和 Math 类: 在实际开发过程中,我们经常会遇到需要使用对象,而不是内置数据类型(int,double,float这些)的情形. 这种由编译器特别支持的包装称为装箱,所以当内置数 ...

  9. spring注解实现事务

    码云: https://gitee.com/MarkPolaris/spring-transcation

  10. 第04组 Alpha冲刺(1/4)

    队名:斗地组 组长博客:地址 作业博客:Alpha冲刺(1/4) 各组员情况 林涛(组长) 过去两天完成了哪些任务: 1.安排好各个组员的任务 2.收集各个组员的进度 3.写页面 4.写博客 展示Gi ...