这几天想把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. spring-boot+mybatis开发实战:如何在spring-boot中使用myabtis持久层框架

    前言: 本项目基于maven构建,使用mybatis-spring-boot作为spring-boot项目的持久层框架 spring-boot中使用mybatis持久层框架与原spring项目使用方式 ...

  2. 利用SSH框架开发时遇到的各种Bug及解决方法

    .hibernate自动生成的配置文件 hibernate.cfg.xml 有时候是有问题的,会出现 org.hibernate.HibernateException: Could not parse ...

  3. zookeeper 新手安装指南

    Zookeeper集群的角色:  Leader 和  follower  (Observer) zk集群最好配成奇数个节点 只要集群中有半数以上节点存活,集群就能提供服务 本事例采用版本:zookee ...

  4. Webpack 代码分离

    Webpack 代码分离 代码分离是 webpack 中最引人注目的特性之一. 你可以把你的代码分离到不同的 bundle 中,然后你就可以去按需加载这些文件. 总的来说, webpack 分离可以分 ...

  5. navicat连接oracle 报 ORA-12737 set CHS16GBK

    1首先,我们打开“工具”-->"选项"菜单,见到如下界面,依据OCI library(oci.dll) 路径,导航到 navicat oci 目录下,备份里面的文件(通过在该 ...

  6. RabbitMQ~开篇与环境部署

    想写这篇文章很久了,今天终于有时间总结一下,一个大型的系统里,消息中间件是必不可少的,它将并发环境处理的数据异步进行处理,有效的提高了系统的并发能力,有很多系统的瓶颈点都在于此,而消息中间件在这个时候 ...

  7. linux中怎么进入root用户

    如果你是第一次使用root用户,需要设置root用户密码:passwd root 根据提示输入然后切换到root用户:su root回车输入密码 回车

  8. 学习Java绝对要懂的,Java编程中最常用的几种排序算法!

    今天给大家分享一下Java中几种常见的排序算法的Java代码 推荐一下我的Java学习羊君前616,中959,最后444.把数字串联起来!     ,群里有免费的学习视频和项目给大家练手.大神有空时也 ...

  9. 【Android Developers Training】 11. 支持不同语言

    注:本文翻译自Google官方的Android Developers Training文档,译者技术一般,由于喜爱安卓而产生了翻译的念头,纯属个人兴趣爱好. 原文链接:http://developer ...

  10. 【转】Header Only Library的介绍

    什么是Header Only Library Header Only Library把一个库的内容完全写在头文件中,不带任何cpp文件. 这是一个巧合,决不是C++的原始设计. 第一次这么做估计是ST ...