maven 打包报错 export_dao\target\surefire-reports for the individual test results.

打包maven项目时报错:

在这里插入图片描述

原因

  • 这是因为测试代码时遇到错误,它会停止编译。

解决方法

在pom.xml中添加以下代码:

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

猜你喜欢

转载自blog.csdn.net/qq_41209886/article/details/109262933
今日推荐