为大型日志优化Travis

时间:2016-11-09 00:12:20

标签: maven

我使用Travis进行maven项目,并且因为输出错误很大,我只想查看最后50行输出,以便: mvn -q clean verify | tail -n 50

但是,即使我的一些测试用例失败,代码也会以状态0退出,除非我在本地运行测试,否则我无法确定构建是否失败。

Tests run: 106, Failures: 0, Errors: 2, Skipped: 0 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.18.1:verify (default) on project easyshare-api: There are test failures. [ERROR] [ERROR] Please refer to /home/travis/build/au-easyshare/easyshare-api/target/failsafe-reports for the individual test results. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException The command "mvn -q clean verify | tail -n 50" exited with 0.

处理此问题的最佳方法是什么?理想情况下 的解决方案在有2-3倍以上的测试用例时仍然有效。

提前致谢!

1 个答案:

答案 0 :(得分:0)

我更改了application.properties以获取更短的输出并删除了tail -n 50。这解决了我的问题:

spring.jpa.generate-ddl = false spring.jpa.show-sql = false