web项目打包时发生错误
来源:5-4 部署配置Web应用服务器
WilliamSCohen
2023-01-14 15:52:50
There are test failures.
Please refer to D:\IdeaProjects\imooc-oa\target\surefire-reports for the individual test results.
你好老师,我在尝试给前两天写的oa系统打war包时出现了这个错误是什么原因呀?我尝试百度解决,但试了几个都不行
2回答
同学你好,1、根据异常信息,老师这边推测可能是测试类导致的。建议同学注释掉@Test、或者整个文件都注释掉。然后clean一下,然后重新打包。
2、同学还可以尝试在pom.xml文件添加下面的代码,maven打包的时候忽略测试的失败。
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <testFailureIgnore>true</testFailureIgnore> </configuration> </plugin> </plugins> </build>
祝学习愉快!
WilliamSCohen
提问者
2023-01-14
问题已解决:
这个应该是关闭了测试功能吧,可以正常打包了
相似问题