2016-11-09 26 views
0

我使用特拉维斯对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倍的测试案例。

在此先感谢!

回答

0

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

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