Skip to content
Permalink
Browse files
Merge pull request #125 from mfriedenhagen/master
[FIXED JENKINS-9691] Boldify names of executed mojos for Freestyle and Maven2/3 jobs using Maven3 in console output.
Originally-Committed-As: 1fbf02aed964328f3e9243bfbffcd4687e2683d1
  • Loading branch information
olamy committed May 17, 2011
2 parents fdcfaf3 + 88d0df2 commit 7c5590b64b51f779f8d57e48d4daf44ed2307918
Showing with 11 additions and 3 deletions.
  1. +11 −3 src/main/java/hudson/maven/util/ExecutionEventLogger.java
@@ -19,6 +19,9 @@
* under the License.
*/

import hudson.tasks._maven.Maven3MojoNote;

import java.io.IOException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
@@ -261,13 +264,18 @@ public void mojoStarted( ExecutionEvent event )
{
if ( logger.isInfoEnabled() )
{
StringBuilder buffer = new StringBuilder( 128 );

final Maven3MojoNote note = new Maven3MojoNote();
final StringBuilder buffer = new StringBuilder( 128 );
try {
buffer.append( note.encode() );
} catch ( IOException e ) {
// As we use only memory buffers this should not happen, ever.
throw new RuntimeException( "Could not encode note?", e );
}
buffer.append( "--- " );
append( buffer, event.getMojoExecution() );
append( buffer, event.getProject() );
buffer.append( " ---" );

logger.info( "" );
logger.info( buffer.toString() );
}

0 comments on commit 7c5590b

Please sign in to comment.