continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r787643 - in /continuum/branches/continuum-1.3.x: continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/ continuum-core/src/test/resources/org/apache/maven/continuum/notification/ continuum-core/src/test/resources/org/ap...
Date Tue, 23 Jun 2009 11:51:10 GMT
Author: evenisse
Date: Tue Jun 23 11:51:10 2009
New Revision: 787643

URL: http://svn.apache.org/viewvc?rev=787643&view=rev
Log:
Load build output into the memory only if necessary

Modified:
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
    continuum/branches/continuum-1.3.x/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml
    continuum/branches/continuum-1.3.x/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/META-INF/plexus/application.xml

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java?rev=787643&r1=787642&r2=787643&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
Tue Jun 23 11:51:10 2009
@@ -136,11 +136,6 @@
     /**
      * @plexus.configuration
      */
-    private boolean includeBuildResult = true;
-
-    /**
-     * @plexus.configuration
-     */
     private boolean includeBuildSummary = true;
 
     /**
@@ -151,7 +146,7 @@
     /**
      * @plexus.configuration
      */
-    private boolean includeOutput = false;
+    private boolean includeBuildOutput = false;
 
     /**
      * Customizable mail subject.  Use any combination of literal text, project or build
attributes.
@@ -254,7 +249,6 @@
         Project project = context.getProject();
         List<ProjectNotifier> notifiers = context.getNotifiers();
         BuildResult build = context.getBuildResult();
-        String buildOutput = getBuildOutput( project, build );
         BuildDefinition buildDefinition = context.getBuildDefinition();
         ProjectScmRoot projectScmRoot = context.getProjectScmRoot();
 
@@ -281,7 +275,7 @@
 
         if ( messageId.equals( ContinuumNotificationDispatcher.MESSAGE_ID_BUILD_COMPLETE
) )
         {
-            buildComplete( project, notifiers, build, buildOutput, messageId, context, buildDefinition
);
+            buildComplete( project, notifiers, build, messageId, context, buildDefinition
);
         }
         else if ( isPrepareBuildComplete )
         {
@@ -289,8 +283,8 @@
         }
     }
 
-    private void buildComplete( Project project, List<ProjectNotifier> notifiers, BuildResult
build, String buildOutput,
-                                String messageId, MessageContext context, BuildDefinition
buildDefinition )
+    private void buildComplete( Project project, List<ProjectNotifier> notifiers, BuildResult
build, String messageId,
+                                MessageContext context, BuildDefinition buildDefinition )
         throws NotificationException
     {
         BuildResult previousBuild = getPreviousBuild( project, buildDefinition, build );
@@ -307,12 +301,12 @@
                 notifiersList.add( notifier );
             }
         }
-        buildComplete( project, notifiersList, build, previousBuild, buildOutput, messageId,
context, buildDefinition );
+        buildComplete( project, notifiersList, build, previousBuild, messageId, context,
buildDefinition );
     }
 
     private void buildComplete( Project project, List<ProjectNotifier> notifiers, BuildResult
build,
-                                BuildResult previousBuild, String buildOutput, String messageId,
-                                MessageContext messageContext, BuildDefinition buildDefinition
)
+                                BuildResult previousBuild, String messageId, MessageContext
messageContext,
+                                BuildDefinition buildDefinition )
         throws NotificationException
     {
         // ----------------------------------------------------------------------
@@ -333,11 +327,11 @@
 
             context.put( "includeTestSummary", includeTestSummary );
 
-            context.put( "includeOutput", includeOutput );
+            context.put( "includeOutput", includeBuildOutput );
 
-            if ( includeBuildResult )
+            if ( includeBuildOutput )
             {
-                context.put( "buildOutput", buildOutput );
+                context.put( "buildOutput", getBuildOutput( project, build ) );
             }
 
             if ( includeBuildSummary )

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml?rev=787643&r1=787642&r2=787643&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml
Tue Jun 23 11:51:10 2009
@@ -59,7 +59,7 @@
         <fromMailbox>continuum@localhost</fromMailbox>
         <fromName>Continuum</fromName>
         <timestampFormat>EEE, d MMM yyyy HH:mm:ss Z</timestampFormat>
-        <includeBuildResult>true</includeBuildResult>
+        <includeBuildOutput>true</includeBuildOutput>
         <toOverride>nobody@localhost</toOverride>
       </configuration>
     </component>

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml?rev=787643&r1=787642&r2=787643&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml
Tue Jun 23 11:51:10 2009
@@ -61,7 +61,7 @@
         <fromMailbox>continuum@localhost</fromMailbox>
         <fromName>Continuum</fromName>
         <timestampFormat>EEE, d MMM yyyy HH:mm:ss Z</timestampFormat>
-        <includeBuildResult>true</includeBuildResult>
+        <includeBuildOutput>true</includeBuildOutput>
       </configuration>
     </component>
 

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/META-INF/plexus/application.xml?rev=787643&r1=787642&r2=787643&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
Tue Jun 23 11:51:10 2009
@@ -95,10 +95,9 @@
          -->
         <buildSubjectFormat>[continuum] BUILD ${state}: ${project.projectGroup.name}
- ${project.name} - ${build.buildDefinition.description}</buildSubjectFormat>
         <prepareBuildSubjectFormat>[continuum] PREPARE BUILD ${state}: ${project.projectGroup.name}</prepareBuildSubjectFormat>
-        <includeBuildResult>true</includeBuildResult>
         <includeBuildSummary>true</includeBuildSummary>
         <includeTestSummary>true</includeTestSummary>
-        <includeOutput>false</includeOutput>
+        <includeBuildOutput>false</includeBuildOutput>
         <alwaysSend>false</alwaysSend>
         <!--
         Setting this propery will make Continuum send all emails to



Mime
View raw message