您的位置:首页 > 编程语言 > Java开发

spring boot maven 略过 test

2017-11-28 21:17 375 查看
spring boot 项目在用maven打包时会自动执行单元测试test。这个功能有时很有用,但是有时候打包时不想执行test,这时就需要省略test。

maven 官网有省略test的详细说明,链接为http://maven.apache.org/plugins-archives/maven-surefire-plugin-2.12.4/examples/skipping-test.html

spring boot的spring-boot-maven-plugin中已经引入了maven-surefire-plugin所以如果需要默认略过test,只需要在pom文件中加入如下属性

<properties>
<skipTests>true</skipTests>
</properties>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: