解决:Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstre

maven打包出错:

再进行项目打包的时候出现以下错误:

There are test failures.

Please refer to F:\code\study\wxpay-demo\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.

报错截图:
在这里插入图片描述


问题描述

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


解决方案1:

在pom文件添加以下配置,打包跳过测试:

            <plugin>
                <groupId>org.apache.maven.pluginsgroupId>
                <artifactId>maven-surefire-pluginartifactId>
                <configuration>
                    <testFailureIgnore>truetestFailureIgnore>
                configuration>
            plugin>

打包成功
解决:Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstre_第1张图片

解决方案2:

通过idea设置maven打包跳过测试
点击小图标会发现test变灰,再进行打包就可以了解决:Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstre_第2张图片
解决:Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstre_第3张图片

你可能感兴趣的:(maven,maven,java,springboot)