Maven在导入其他项目时报错:Plugin execution not covered by lifecycle configuration
这几天想把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的更多相关文章
- MyEclipse导入Maven项目报错 Plugin execution not covered by lifecycle configuration:
web项目使用到mybatis,需要使用mybatis的自动生成代码插件,配置build部分如下: <build> <pluginManagement></pluginM ...
- [转]解决Maven报错"Plugin execution not covered by lifecycle configuration"
[转]解决Maven报错"Plugin execution not covered by lifecycle configuration" 导入Myabtis源码后,POM文件会报 ...
- Maven項目打包報錯:Plugin execution not covered by lifecycle configuration
Maven項目打包報錯:Plugin execution not covered by lifecycle configuration 使用Eclipse导入一个新的maven项目时不时的会遇到这个错 ...
- Maven-pom.xml文件报错 Plugin execution not covered by lifecycle configuration
问题: Eclipse中新导入的项目pom.xml文件报错: Plugin execution not covered by lifecycle configuration: org.jacoco:j ...
- Plugin execution not covered by lifecycle configuration: aspectj-maven-plugin:1.8
现象: eclipse导入existing maven project,(父项目包含很多子项目),子项目的pom.xml报错: Plugin execution not covered by life ...
- 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- ...
- Maven项目POM文件错误,提示“Plugin execution not covered by lifecycle configuration”的解决方案
一. 问题 Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-depend ...
- 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 ...
- Maven项目:Plugin execution not covered by lifecycle configuration 解决方案
这个是eclipse中配置文件pom.xml报的错.具体错误信息: Plugin execution not covered by lifecycle configuration: org.apach ...
随机推荐
- 两个HTML,CSS布局实例
今天首先仿照某公司页面只做了一个几乎一模一样,连距离都相同的页面. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional/ ...
- (转)addEventListener()与removeEventListener()详解
转自:http://www.111cn.net/wy/js-ajax/48004.htm addEventListener()与removeEventListener()用于处理指定和删除事件处理程序 ...
- 如何让.Net线程支持超时后并自动销毁!
如何让.Net线程支持超时后并自动销毁! 1.使用CancellationTokenSource之基于Task实现方式 CancellationTokenSource source = new Can ...
- Asp.net MVC 如何对所有用户输入的字符串字段做Trim处理
经常需要对用户输入的数据在插入数据库或者判断之前做Trim处理,针对每个ViewModel的字段各自做处理是我们一般的想法.最近调查发现其实也可以一次性实现的. MVC4.6中实现方式 1,实现IMo ...
- javascript痛点之四this的指向问题
先看以下例子 1.我们直接调用this看看指向的是谁 alert(this);//指向window 2.在函数中直接调用看看指向的是谁 function fn(){ alert(this); } fn ...
- 前台跨站点获取session
var sessionId = System.Web.HttpContext.Current.Response.Cookies[System.Web.Security.FormsAuthenticat ...
- idea live template高级知识, 进阶(给方法,类,js方法添加注释)(二)
上一篇文章(http://www.cnblogs.com/xzjxylophone/p/6994488.html) 是在 groovyScript中直接添加的代码,这个看起来是简单,粗暴,麻烦和不美观 ...
- 【Python3之socket编程】
一.socket的定义 Socket是应用层与TCP/IP协议族通信的中间软件抽象层,它是一组接口.在设计模式中,Socket其实就是一个门面模式,它把复杂的TCP/IP协议族隐藏在Socket接口后 ...
- Entity Framework入门教程:创建实体数据模型
下图为一个已经创建好的数据库表关系 实体数据模型的创建过程 在Visual Studio项目中,右键程序集菜单,选择[添加]->[新建项],在[添加新项窗口]中选择[ADO.NET实体数据模型] ...
- 持续集成篇-- SonarQube代码质量管理平台的配置与使用
样例视频教程:http://www.roncoo.com/course/view/85d6008fe77c4199b0cdd2885eaeee53 一.SonarQube的配置(前提,先用admin用 ...