IDEA maven打包 跳过test的3种方法

IDEA maven打包 跳过test的3种方法

第一种

命令行的方式,在哪输入命令都行。

mvn install -Dmaven.test.skip=true

在这里插入图片描述
在这里插入图片描述在这里插入图片描述

第二种

修改pox.xml文件

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

第三种

选中小闪电,test就被划掉了。然后点击install就会跳过test了
在这里插入图片描述


版权声明:本文为m0_54853503原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。