创建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. Callable实现JAVA多线程

    最近项目用到一个功能需要实现多线程分发任务且需要任务的返回值,之前一直都是实现Runnable接口,但里面的run方法是返回void的.后来在网上查了下JAVA1.5开始就有了Callable. 下面 ...

  2. 微信支付和微信支付通知基于sdk的说明(2)

    前期准备工作 微信商户账户/密码(获取appid等信息) 微信公众号账户/密码(获取cert证书等信息,不做线上退款不需要证书) 下载php支付demo 从商户平台进入的话是以下界面或者直接搜索公众号 ...

  3. Python .pyc的编译和反编译

    1. 由Python文件编译为.pyc文件 python -m compileall apps.py 演示 2. .pyc的反编译,使用 uncompyle, 也可以使用网上在线的反编译工具 需要安装 ...

  4. RabbitMQ学习笔记(四、RabbitMQ队列)

    目录: 消息路由失败了会怎样 备份交换器 TTL与DLX 如何实现延迟队列 RabbitMQ的RPC实现 持久化 事务 发送方确认机制 消息路由失败了会怎样: 在RabbitMQ中,如果消息路由失败了 ...

  5. python selenium 处理时间日期控件

    # -*- coding: utf-8 -*- from selenium import webdriverfrom time import sleep driver = webdriver.Fire ...

  6. POJ1961Period(kmp+循环节)

    传送门 题目大意:输出字符串所有前缀的循环节个数,下标从1开始,i 和1-i循环节的个数 题解:网上摘得 KMP最小循环节.循环周期: 定理:假设S的长度为len,则S存在最小循环节,循环节的长度L为 ...

  7. React中引用CSS样式的方法

    相对于html中引用css的三种方法,react中也有三种方法,一一相对: 1. 行内样式:直接在组件内部定义 <div style={{width:'20px',height:'30px'}} ...

  8. django--调用百度AI接口实现人脸注册登录

    面部识别----考勤打卡.注册登录.面部支付等等...感觉很高大上,又很方便,下面用python中的框架--django完成一个注册登录的功能,调用百度AI的接口,面部识别在网上也有好多教程,可以自己 ...

  9. Java连载40-参数传递、this关键字

    一.对象和引用 1.对象:目前在使用new运算符在堆内存中开辟的内存空间成为对象. 2.引用:是一个变量,不一定是局部变量,好可能是成员变量,引用保存了内存地址,指向了堆内存中对象.所有访问实例的相关 ...

  10. jTessBoxEditor训练识别库

    1.背景 前文已经简要介绍tesseract ocr引擎的安装及基本使用,其中提到使用-l eng参数来限定语言库,可以提高识别准确率及识别效率. 本文将针对某个网站的验证码进行样本训练,形成自己的语 ...