美文网首页从零开始学springboot
多种姿势关闭Maven的Test打包

多种姿势关闭Maven的Test打包

作者: 码哥说 | 来源:发表于2021-03-18 14:04 被阅读0次

前言

IDEA开发Maven SringBoot项目, 每次打包时都会发现Maven执行Test打包, 费时费力, 那么问题来了, 我不要Test打包, 直接打包多好?!

下面介绍关闭默认Maven Test打包的几种姿势,

方式一

IDEA设置


image.png

方式二

项目pom加上

<properties>
    <skipTests>true</skipTests>
</properties>

方式三

项目pom加上

<build>
        <plugins>
              <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-surefire-plugin</artifactId>
              <configuration>
              <skipTests>true</skipTests>
              </configuration>
              </plugin>
        </plugins>
</build>

三种姿势, 让你的打包简单起来~
IDEA打包的操作


image.png

相关文章

网友评论

    本文标题:多种姿势关闭Maven的Test打包

    本文链接:https://www.haomeiwen.com/subject/qmlfdktx.html