创建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. OpenCV:获取图像当中某一点的坐标

    import numpy as np image=np.zeros((300,300,3),dtype='uint8') (cx,cy)=image.shape[1]//2,image.shape[0 ...

  2. Oracle 快速配置连接服务

    [net Manager配置] oracle客户端连接,或者代码连接时,需要配置本地连接服务. [快速配置] ①找到 tnsnames.ora 文件,使用记事本打开 ② TEST{#服务名} = (D ...

  3. 程序运行时间测试 - 使用libc 中 time 函数 实现秒级的运行时间检测

    c 标准库中,有time 函数,可以返回 1970年1月1日 开始到现在的秒数,我们可以调用两次的时间差来计算程序运行时间: https://github.com/yaowenxu/Workplace ...

  4. 2. Linux-3.14.12内存管理笔记【系统启动阶段的memblock算法(2)】

    memory:表示可用可分配的内存: 结束完memblock算法初始化前的准备工作,回到memblock算法初始化及其算法实现上面.memblock是一个很简单的算法. memblock算法的实现是, ...

  5. LG1131 「ZJOI2007」时态同步 树形DP

    问题描述 LG1131 题解 正难则反,把从一个点出发到叶子结点看做从叶子结点走到那个点. DP方程很显然. \(\mathrm{Code}\) #include<bits/stdc++.h&g ...

  6. WPF 精修篇 全局为处理异常处理

    原文:WPF 精修篇 全局为处理异常处理 当我们写代码的时候 对代码错误异常处理 有的时候会 没做处理 比如 我们执行如下代码 会引发程序崩溃 private void Button_Click(ob ...

  7. Python程序中的线程操作-守护线程

    目录 一.守护线程 1.1 详细解释 1.2 守护线程例1 1.3 守护线程例2 一.守护线程 无论是进程还是线程,都遵循:守护xx会等待主xx运行完毕后被销毁.需要强调的是:运行完毕并非终止运行. ...

  8. 无限可能,Elasticsearch(一)

    这个世界已然被数据淹没.多年来,我们系统间流转和产生的大量数据已让我们不知所措. 现有的技术都集中在如何解决数据仓库存储以及如何结构化这些数据. 这些看上去都挺美好,直到你实际需要基于这些数据实时做决 ...

  9. vscode源码分析【四】程序启动的逻辑,最初创建的服务

    第一篇: vscode源码分析[一]从源码运行vscode 第二篇:vscode源码分析[二]程序的启动逻辑,第一个窗口是如何创建的 第三篇:vscode源码分析[三]程序的启动逻辑,性能问题的追踪 ...

  10. 蓝牙Inquriy 过程详解

    问题 今天遇到了一个问题,就是自己的耳机产品,手机经常搜不到,从日志里面查看,发现原因是平时手机蓝牙发送的是inquiry mode =2 出问题的时候,inquiry mode =1 由于本设备很多 ...