Skip to content
Permalink
Browse files
[JENKINS-15025] Change PrintStreamLogger to System.out instead
listener.getLogger (as MavenCli). In this manner output is highlighted.
  • Loading branch information
Nikolas Falco committed Jul 15, 2013
1 parent 0b795de commit 588e9cb7e122bda1e2aa2453fa99b8d4a94f418c
Showing with 1 addition and 13 deletions.
  1. +1 −13 maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
@@ -129,18 +129,6 @@ public Result call() throws IOException {

// manage of Maven error are moved to ExecutionEventLogger, they are
// threaded as in MavenCli
if (!mavenExecutionResult.getThrowables().isEmpty() && isDebug()) {
logger.println( "mavenExecutionResult exceptions not empty");
for(Throwable throwable : mavenExecutionResult.getThrowables()) {
logger.println("message : " + throwable.getMessage());
if (throwable.getCause()!=null) {
logger.println("cause : " + throwable.getCause().getMessage());
}
logger.println("Stack trace : ");
throwable.printStackTrace( logger );
}

}

if(markAsSuccess) {
logger.println(Messages.MavenBuilder_Failed());
@@ -200,7 +188,7 @@ public MavenExecutionListener(AbstractMavenBuilder maven3Builder) {

// TODO: we should think about reusing the code in org.apache.maven.cli.DefaultMavenExecutionRequestBuilder#logging?
// E.g. there's also the option to redirect logging to a file which is handled there, but not here.
PrintStreamLogger logger = new PrintStreamLogger( maven3Builder.listener.getLogger() );
PrintStreamLogger logger = new PrintStreamLogger( /* maven3Builder.listener.getLogger() */ System.out );
if (maven3Builder.isDebug()) {
logger.setThreshold(PrintStreamLogger.LEVEL_DEBUG);
} else if (maven3Builder.isQuiet()) {

0 comments on commit 588e9cb

Please sign in to comment.