Plugin execution not covered by lifecycle configuration问题
来源:互联网 发布:哪里买高仿手表知乎 编辑:程序博客网 时间:2024/06/04 19:18
今天在构建maven项目时,添加了一个编译插件
<plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin></plugins>
接着项目报如下错误:
Description Resource Path Location Type Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.6.0:testCompile (execution: default-testCompile, phase: test-compile) pom.xml /test line 47 Maven Project Build Lifecycle Mapping Problem
网上查了半天,各种说法都有。不过最终还是自己发现了关键问题:
没有加<build>
标签啊是不是?完整的结构如下
<project> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.8</source> <!-- 源代码使用的开发版本 --> <target>1.8</target> <!-- 需要生成的目标class文件的编译版本 --> <!-- 这下面的是可选项 --> <!-- <meminitial>128m</meminitial> --> <!-- <maxmem>512m</maxmem> --> <!-- <fork>true</fork> fork is enable,用于明确表示编译版本配置的可用 --> <!-- <compilerVersion>1.3</compilerVersion> --> <!-- 这个选项用来传递编译器自身不包含但是却支持的参数选项 --> <!-- <compilerArgument>-verbose -bootclasspath ${java.home}\lib\rt.jar</compilerArgument> --> </configuration> </plugin> </plugins> </build></project>
其次,相关子配置问题:问题配置如下
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>${maven.compiler.source}</source> <target>${maven.compiler.target}</target> <compilerId>eclipse</compilerId> <skip>test</skip> </configuration></plugin>
删除compilerId
配置,问题解决
<compilerId>eclipse</compilerId>
阅读全文
0 0
- Plugin execution not covered by lifecycle configuration
- Plugin execution not covered by lifecycle configuration...
- Plugin execution not covered by lifecycle configuration
- Plugin execution not covered by lifecycle configuration
- Plugin execution not covered by lifecycle configuration
- Plugin execution not covered by lifecycle configuration
- Plugin execution not covered by lifecycle configuration
- Plugin execution not covered by lifecycle configuration
- Plugin execution not covered by lifecycle configuration
- 解禁 MAVEN “Plugin execution not covered by lifecycle configuration” 问题
- Plugin execution not covered by lifecycle configuration问题
- Jacoco Maven Plugin - Plugin execution not covered by lifecycle configuration
- 解决Maven报Plugin execution not covered by lifecycle configuration
- 怎么解决 “Plugin execution not covered by lifecycle configuration”
- plugin execution not covered by lifecycle configuration错误解决
- Maven报Plugin execution not covered by lifecycle configuration
- 解决Maven报Plugin execution not covered by lifecycle configuration
- Eclipse m2e报Plugin execution not covered by lifecycle configuration
- android 自动执行点击事件
- linux常用环境变量和c/c++头文件/库路径环境变量
- c++析构函数、虚析构函数、纯虚析构函数详解
- 【HTML5学习笔记】19:CSS文本样式 上
- CSS入门
- Plugin execution not covered by lifecycle configuration问题
- Windows下利用dlib19.2实现多目标追踪
- Linux--用shell脚本实现菲波那切数列
- 单点登录的三种实现方式
- Android 开发之 RecyclerView相关知识
- JMeter--HTTP(S) 测试脚本录制创建过程 ---上
- Joda-Time 操作常用时间函数
- 虚拟机可以ping同宿主机,宿主机ping不通虚拟机
- bootstrap尝试用法