0
点赞
收藏
分享

微信扫一扫

spring-boot-maven-plugin 插件,关闭自动test

斗米 2022-04-25 阅读 179
java后端

在eclipse每次使用run as -> maven install, 总是运行junit test

这是因为

spring-boot- maven -plugin 插件 已经集成了maven-surefire-plugin插件

会自动运行junit test

只需要在pom.xml里增加

<properties>
 <!-- <maven.test.skip>true</maven.test.skip> -->
    <skipTests>true</skipTests>
</properties>

这里需要注意的是maven.test.skip, 不生成test的所有.class, skipTests会编译测试类,即生成.class文件,只是不运行测试类

举报

相关推荐

0 条评论