这几天想把Spring 攻略第二版完整的学习下,所以就在网上下载了该教材的源码,寻思边看书边练习!之前有过一些Maven开发的相关经验,觉得Maven在引入jar包上的配置还是很方便的,所以这次源码的Maven配置我倒是不担心,没想到项目导入后就报了一堆错误,一个一个的去解决,很多问题网上都有解决办法,就剩下一个问题折腾好久才解决掉,现将问题的解决过程记录如下:

1 问题描述

Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-dependency-plugin:2.0:copy-dependencies (execution: copy-dependencies, phase: process-sources)

2 解决过程

在谷歌上面搜索——org.apache.maven.plugins:maven-dependency-plugin:2.0:copy-dependencies

点击进入链接http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-project-dependencies.html

将上述代码copy到项目的pom.xml文件中即可,代码如下:

Copying project dependencies

Project dependencies are the dependencies declared in your pom. To copy them with their transitive dependencies, use the dependency:copy-dependencies mojo and configure the plugin like the sample below:

<project>
[...]
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/alternateLocation</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
[...]
</project>

粘贴完代码之后,选择Maven——Update Project...

3 Missing artifact javax.transaction:jta:jar:1.0.1B解决办法

就是本地maven库中缺少了这个jar,需要把这个jar安装到本地库中去。

3.1 下载包含此jar的zip包,地址:

http://download.csdn.net/detail/spring123tt/6847843

3.2 cmd到zip包的目录,运行下面的字符串

mvn install:install-file   -Dfile=./jta-1_0_1B-classes.zip   -DgroupId=javax.transaction   -DartifactId=jta -Dversion=1.0.1B   -Dpackaging=jar

上述命令是把下载的jar包安装在本地仓库。

然后去update你的maven工程。就OK了!

4 在sts中导入旧的工程报错处理

报错如图:

一共两个问题,上面已经说明了解决过程。总的来说,需要在工程中引入两个插件,在pom.xml中添加如下代码:

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/alternateLocation</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Maven在导入其他项目时报错:Plugin execution not covered by lifecycle configuration的更多相关文章

  1. MyEclipse导入Maven项目报错 Plugin execution not covered by lifecycle configuration:

    web项目使用到mybatis,需要使用mybatis的自动生成代码插件,配置build部分如下: <build> <pluginManagement></pluginM ...

  2. [转]解决Maven报错"Plugin execution not covered by lifecycle configuration"

    [转]解决Maven报错"Plugin execution not covered by lifecycle configuration" 导入Myabtis源码后,POM文件会报 ...

  3. Maven項目打包報錯:Plugin execution not covered by lifecycle configuration

    Maven項目打包報錯:Plugin execution not covered by lifecycle configuration 使用Eclipse导入一个新的maven项目时不时的会遇到这个错 ...

  4. Maven-pom.xml文件报错 Plugin execution not covered by lifecycle configuration

    问题: Eclipse中新导入的项目pom.xml文件报错: Plugin execution not covered by lifecycle configuration: org.jacoco:j ...

  5. Plugin execution not covered by lifecycle configuration: aspectj-maven-plugin:1.8

    现象: eclipse导入existing maven project,(父项目包含很多子项目),子项目的pom.xml报错: Plugin execution not covered by life ...

  6. maven项目-修复Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.8:add-resource (execution: add-resource, phase: generate-resources) pom.xml报错

    1:pom.xml代码 <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build- ...

  7. Maven项目POM文件错误,提示“Plugin execution not covered by lifecycle configuration”的解决方案

    一. 问题 Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-depend ...

  8. Java-Maven(十一):Maven 项目出现pom.xml错误:Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin

    Maven项目出现ERROR: eclipse更新了Maven插件后,让后就出现了以下错误: Description Resource Path Location Type Conflicting l ...

  9. Maven项目:Plugin execution not covered by lifecycle configuration 解决方案

    这个是eclipse中配置文件pom.xml报的错.具体错误信息: Plugin execution not covered by lifecycle configuration: org.apach ...

随机推荐

  1. 最全面的Java字节byte操作,处理Java基本数据的转换及进制转换操作工具,流媒体及java底层开发项目常用工具类

    前言:用于处理Java基本数据的转换及进制转换操作工具 一.实现功能 1.int与byte互转 2.int与byte[]互转 3.short与byte互转 4.short与byte[]互转 5.16位 ...

  2. js数组及数组应用(冒泡和二分,遍历输出)

    一.定义:1)var arr=new Array(); 加数据:arr[0]=1; 2)定义同时赋值:var arr=new Array(1,2,3,4,5); 3)调用:var arr=new Ar ...

  3. 抓包工具 - Fiddler(如何捕获Android数据包)

    如何捕获Android数据包 一.移动设备访问网络原理 先看看移动设备是怎么去访问网络,如图1所示,可以看到,移动端的数据包是从wifi出去的. 图1(移动设备访问网络) 所以我们可以把自己的电脑开启 ...

  4. arcgis api for js入门开发系列九热力图效果

    上一篇实现了demo的聚合效果,本篇新增热力图效果,截图如下: 热力图效果实现的思路如下: 1.map.js初始化函数调用聚合效果的js接口,map.heatmap.js实现聚合核心效果的js文件 / ...

  5. .NET C#转Java没那么难,开发环境篇

    .NET C#转Java没那么难,都是面向对向的语言,而且语法还是相似的,先对比一下开发环境,再到Servlet,再到MVC,都是一样一样的,只是JAVA的配制项比较多而已,只要配好一个,后面都是co ...

  6. java——国际化详解

    深入理解Java国际化 假设我们正在开发一个支持多国语言的Web应用程序,要求系统能够根据客户端的系统的语言类型返回对应的界面:英文的操作系统返回英文界面,而中文的操作系统则返回中文界面--这便是典型 ...

  7. Android 音乐播放

    android简单音乐播放控制代码 这个几个月业余时间一直在做一个android项目,里面涉及到了音乐播放功能.很简单那种,播放.暂停.上一曲.下一曲.音量调节等. 音乐播放主要使用的对象是Media ...

  8. 一起学习c++11——c++11中的新增的容器

    c++11新增的容器1:array array最早是在boost中出现:http://www.boost.org/doc/libs/1_61_0/doc/html/array.html 当时的初衷是希 ...

  9. [leetcode-515-Find Largest Value in Each Tree Row]

    You need to find the largest value in each row of a binary tree. Example: Input:    1   / \  3 2 / \ ...

  10. [leetcode-485-Max Consecutive Ones]

    Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1, ...