Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can maven print a shorter reactor summary?

Tags:

maven

When a multiproject maven build completes, a summary of all the components is printed as the final output. It looks like this:

[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] -----------------------------------------

I have a very large project with over a hundred components. If there is a failure, I would like the error message and its context to be very near the bottom of the output. Is there a way to make this summary shorter? Instead of listing all the components I just want it to show the last component and whether it succeeded or failed.

like image 823
John Watts Avatar asked Jun 14 '12 17:06

John Watts


1 Answers

I've had similar issues here. What I do is run mvn somegoal -l file.log and then grep through file.log

like image 165
Miquel Avatar answered Oct 03 '22 06:10

Miquel