这几天想把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. 仿flash轮播

    <!DOCTYPE html><html> <head> <meta charset="utf-8" /> <title> ...

  2. datatables 学习笔记1 基础篇

    本文共3部分:基本使用|遇到的问题|属性表 1.DataTables的默认配置 $(document).ready(function() { $('#example').dataTable(); } ...

  3. Vue 爬坑之路(四)—— 与 Vuex 的第一次接触

    在 Vue.js 的项目中,如果项目结构简单, 父子组件之间的数据传递可以使用  props 或者 $emit 等方式 http://www.cnblogs.com/wisewrong/p/62660 ...

  4. springmvc 之 Controller

    一.简介 在SpringMVC 中,控制器Controller 负责处理由DispatcherServlet 分发的请求,它把用户请求的数据经过业务处理层处理之后封装成一个Model ,然后再把该Mo ...

  5. 解决laydate时间日期插件定位溢出

    laydate是一款比较好用的网页时间日期插件,不过用起来有一些细节问题需要我们手动去解决!例如:laydate兼容bootstrap 1. 默认情况 laydate弹出层默认对齐input左边框 2 ...

  6. CoolBlog开发笔记第2课:搭建开发环境

    教程目录 1.1 CoolBlog开发笔记第1课:项目分析 前言 今天是CoolBlog开发笔记的第2课,我们将要讲解的是开发环境的搭建.俗话说"工欲善其事必先利其器",Djang ...

  7. 中国省市区地址三级联动jQuery插件 案例下载

    中国省市区地址三级联动jQuery插件 案例下载 distpicker 是一款可以实现中国省市区地址三级联动jQuery插件.它使用简单,简单设置即可完成中国省市区地址联动效果. 安装 可以通过npm ...

  8. bootstrap-datepicker的bug:有日期输入的地方在下个月页面选择当天日期会以当天日期减少一个月显示

    Bug复现详细描述:先选择今日日期,然后点击下个月的某个日期,注意,是直接点击下个月的某个日期,不能通过日期显示tab的下个月箭头进入下个月再来点击某个日期,然后再直接点击本月的今日日期.然后bug会 ...

  9. Vim按Esc后光标左移问题的解决

    参考了这篇文章http://vim.wikia.com/wiki/Prevent_escape_from_moving_the_cursor_one_character_to_the_left 在Vi ...

  10. xUtils使用详细介绍

    xUtils3使用详解 一.xUtils简介: xUtils是基于Afinal开发的目前功能比较完善的一个Android开源框架,官网:https://github.com/wyouflf/xUtil ...