当一个多项目 maven 构建完成时,所有组件的摘要都会作为最终输出打印出来。它看起来像这样:
[INFO] Compiling 5 source files to C:\project\target\classes
----------
1. ERROR in C:\project\src\main\java\com\example\Foo.java (at line 100)
foo.bar();
^^^
The method bar() is undefined
----------
3 problems (3 errors)[INFO] ------------------------------
[ERROR] COMPILATION ERROR :
[INFO] ---------------------------------------------------
[ERROR] Found 1 errors and 0 warnings.
[INFO] 1 error
[INFO] ---------------------------------------------------
[INFO] -----------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Component 1 ... SUCCESS [1.000s]
[INFO] Component 2 ... FAILURE [2.000s]
[INFO] Component 3 ... SKIPPED
[INFO] -----------------------------------------
[INFO] BUILD FAILURE
[INFO] -----------------------------------------
[INFO] Total time: 3.000s
[INFO] Finished at: Thu Jun 14 12:10:36 EDT 2012
[INFO] Final Memory: 579M/812M
[INFO] -----------------------------------------
我有一个非常大的项目,包含一百多个组件。如果出现故障,我希望错误消息及其上下文非常接近输出的底部。有没有办法让这个摘要更短?我不想列出所有组件,而是希望它显示最后一个组件以及它是成功还是失败。