Maven打包错误:Please refer to XXXXX for the individual test results.

问题

IDEA package项目时报错:

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project facdriver: There are test failures.

今天在idea package 项目时报错,如下:
在这里插入图片描述

解决方式

一、跳过单元测试

在这里插入图片描述
点击跳过单元测试,只要 test 编程灰色就可以了

二、修改pom文件

    <build>
    <plugins>
        <!-- maven 打包时跳过测试 -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <skip>true</skip>
            </configuration>
        </plugin>
    </plugins>
    </build>

这两种方法都可以成功的跳过单元测试,大家根据自己的需要使用其中一种就可以了。