Skip to content

Commit

Permalink
Merge pull request #125 from mfriedenhagen/master
Browse files Browse the repository at this point in the history
[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 7c5590b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/main/java/hudson/maven/util/ExecutionEventLogger.java
Expand Up @@ -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;
Expand Down Expand Up @@ -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() );
}
Expand Down

0 comments on commit 7c5590b

Please sign in to comment.