Index: src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java =================================================================== --- src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java (revision 578225) +++ src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java (working copy) @@ -123,6 +123,11 @@ */ private boolean includeBuildResult = true; + /** + * @plexus.configuration + */ + private boolean includeBuildSummary = true; + // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- @@ -259,25 +264,21 @@ try { + VelocityContext context = new VelocityContext(); + if ( includeBuildResult ) { - VelocityContext context = new VelocityContext(); + context.put( "buildOutput", buildOutput ); + } - // ---------------------------------------------------------------------- - // Data objects - // ---------------------------------------------------------------------- + if ( includeBuildSummary ) { + context.put( "build", build ); - context.put( "reportUrl", getReportUrl( project, build, configurationService ) ); - context.put( "project", project ); - context.put( "build", build ); - context.put( "changesSinceLastSuccess", continuum.getChangesSinceLastSuccess( project.getId(), build .getId() ) ); - context.put( "buildOutput", buildOutput ); - context.put( "previousBuild", previousBuild ); // ---------------------------------------------------------------------- @@ -308,21 +309,24 @@ context.put( "javaHomeInformations", getJavaHomeInformations( buildDefinition ) ); context.put( "builderVersions", getBuilderVersion( buildDefinition, project ) ); + } + + // ---------------------------------------------------------------------- + // Data objects + // ---------------------------------------------------------------------- - // TODO put other profile env var could be a security if they provide passwords ? + context.put( "reportUrl", getReportUrl( project, build, configurationService ) ); - // ---------------------------------------------------------------------- - // Generate - // ---------------------------------------------------------------------- - velocity.getEngine().mergeTemplate( templateName, context, writer ); + // TODO put other profile env var could be a security if they provide passwords ? - content = writer.getBuffer().toString(); - } - else - { - content = getReportUrl( project, build, configurationService ); - } + // ---------------------------------------------------------------------- + // Generate + // ---------------------------------------------------------------------- + + velocity.getEngine().mergeTemplate( templateName, context, writer ); + + content = writer.getBuffer().toString(); } catch ( ResourceNotFoundException e ) { Index: src/main/resources/org/apache/maven/continuum/notification/mail/templates/common.vm =================================================================== --- src/main/resources/org/apache/maven/continuum/notification/mail/templates/common.vm (revision 578103) +++ src/main/resources/org/apache/maven/continuum/notification/mail/templates/common.vm (working copy) @@ -16,6 +16,7 @@ #macro( shellBuildResult ) Online report : $reportUrl +#if ( $build ) Build statistics: State: $formatter.formatProjectState( $build.state ) #if ( $previousBuild ) @@ -178,16 +179,14 @@ #end #end #end -#else +#end +#end +#if ( $buildOutput && $buildOutput != "" ) **************************************************************************** Output: **************************************************************************** -#if ( $buildOutput && $buildOutput != "" ) $buildOutput -#else -There was no output. -#end **************************************************************************** - #end + #end ## #macro( shellBuildResult )