2016-11-09 22 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