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 lifecycle mapping (plugin execution "org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (execution: default-compile, phase: compile)"). To enable full functionality, remove the conflicting mapping and run Maven->Update Project Configuration.
|
pom.xml
|
/icos-mrfingerlib-common
|
line 1
|
Maven Project Build Lifecycle Mapping Problem
|
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (execution: default-compile, phase: compile)
|
pom.xml
|
/icos-mrfingerlib-common
|
line 35
|
Maven Project Build Lifecycle Mapping Problem
|
解决方案1:
1)Window --> Perferences --> Maven --> Lifecycle Mapping
发现目录:E:\work\git\ICOS-DASpark-Project\.metadata\.plugins\org.eclipse.m2e.core下并没有“lifecycle-mapping-metadata.xml”文件。
新建文件lifecycle-mapping-metadata.xml,并填写内容为:
<?xml version="1.0" encoding="UTF-8"?> <lifecycleMappingMetadata> <pluginExecutions> <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> </pluginExecutions> </lifecycleMappingMetadata>
2)记得点击 ”Reload workspace lifecycle mappings metadata“按钮
3)update Project 就可以了
解决方案2:
直接在pom.xml文件中加入如
<build> <pluginManagement> <plugins> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <versionRange>[2.5,)</versionRange> <goals> <goal>compile</goal> <goal>testCompile</goal> </goals> </pluginExecutionFilter> <action> <ignore /> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> </plugins> </pluginManagement> </build>
记得保存之后在项目上右击Maven -> Update Project...
基础才是编程人员应该深入研究的问题,比如:
1)List/Set/Map内部组成原理|区别
2)mysql索引存储结构&如何调优/b-tree特点、计算复杂度及影响复杂度的因素。。。
3)JVM运行组成与原理及调优
4)Java类加载器运行原理
5)Java中GC过程原理|使用的回收算法原理
6)Redis中hash一致性实现及与hash其他区别
7)Java多线程、线程池开发、管理Lock与Synchroined区别
8)Spring IOC/AOP 原理;加载过程的。。。
【+加关注】。