Skip to content

Commit

Permalink
[MINVOKER-303] Print build summary at the end after logs
Browse files Browse the repository at this point in the history
  • Loading branch information
slawekjaranowski committed May 17, 2022
1 parent fbe2481 commit 2e02ca5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ public class InvokerMojo
void processResults( InvokerSession invokerSession )
throws MojoFailureException
{
if ( !suppressSummaries )
if ( streamLogsOnFailures )
{
invokerSession.logSummary( getLog(), ignoreFailures );
invokerSession.logFailedBuildLog( getLog(), ignoreFailures );
}

if ( streamLogsOnFailures )
if ( !suppressSummaries )
{
invokerSession.logFailedBuildLog( getLog(), ignoreFailures );
invokerSession.logSummary( getLog(), ignoreFailures );
}

invokerSession.handleFailures( getLog(), ignoreFailures );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ public void logSummary( Log logger, boolean ignoreFailures )
public void logFailedBuildLog( Log logger, boolean ignoreFailures )
throws MojoFailureException
{
updateStats();

List<BuildJob> jobToLogs = new ArrayList<>( failedJobs );
jobToLogs.addAll( errorJobs );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@ public void execute()
}
}

if ( !suppressSummaries )
if ( streamLogsOnFailures )
{
invokerSession.logSummary( getLog(), ignoreFailures );
invokerSession.logFailedBuildLog( getLog(), ignoreFailures );
}

if ( streamLogsOnFailures )
if ( !suppressSummaries )
{
invokerSession.logFailedBuildLog( getLog(), ignoreFailures );
invokerSession.logSummary( getLog(), ignoreFailures );
}

invokerSession.handleFailures( getLog(), ignoreFailures );
Expand Down

0 comments on commit 2e02ca5

Please sign in to comment.