continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r475736 - in /maven/continuum/trunk/continuum-core/src/main: java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java resources/org/apache/maven/continuum/notification/mail/templates/common.vm
Date Thu, 16 Nov 2006 13:52:19 GMT
Author: evenisse
Date: Thu Nov 16 05:52:18 2006
New Revision: 475736

URL: http://svn.apache.org/viewvc?view=rev&rev=475736
Log:
Add changesSinceLastSuccess to mail notification

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
    maven/continuum/trunk/continuum-core/src/main/resources/org/apache/maven/continuum/notification/mail/templates/common.vm

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java?view=diff&rev=475736&r1=475735&r2=475736
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
Thu Nov 16 05:52:18 2006
@@ -16,6 +16,7 @@
  * limitations under the License.
  */
 
+import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
@@ -73,6 +74,11 @@
     private ContinuumStore store;
 
     /**
+     * @plexus.requirement
+     */
+    private Continuum continuum;
+
+    /**
      * @plexus.configuration
      */
     private MailSender mailSender;
@@ -246,6 +252,9 @@
 
                 context.put( "build", build );
 
+                context.put( "changesSinceLastSuccess",
+                             continuum.getChangesSinceLastSuccess( project.getId(), build.getId()
) );
+
                 context.put( "buildOutput", buildOutput );
 
                 context.put( "previousBuild", previousBuild );
@@ -460,7 +469,7 @@
     }
 
     /**
-     * @see org.codehaus.plexus.notification.notifier.Notifier#sendNotification(java.lang.String,
java.util.Set, java.util.Properties)
+     * @see org.codehaus.plexus.notification.notifier.Notifier#sendNotification(java.lang.String,java.util.Set,java.util.Properties)
      */
     public void sendNotification( String arg0, Set arg1, Properties arg2 )
         throws NotificationException

Modified: maven/continuum/trunk/continuum-core/src/main/resources/org/apache/maven/continuum/notification/mail/templates/common.vm
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/resources/org/apache/maven/continuum/notification/mail/templates/common.vm?view=diff&rev=475736&r1=475735&r2=475736
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/resources/org/apache/maven/continuum/notification/mail/templates/common.vm
(original)
+++ maven/continuum/trunk/continuum-core/src/main/resources/org/apache/maven/continuum/notification/mail/templates/common.vm
Thu Nov 16 05:52:18 2006
@@ -65,7 +65,39 @@
 #end
 #end
 #end
+#if ( $changesSinceLastSuccess )
+****************************************************************************
+SCM Changes since last success:
+****************************************************************************
+#if ( $changesSinceLastSuccess.changes.size() == 0 )
+No files changed
 
+#else
+#foreach ( $changeSet in $changesSinceLastSuccess )
+#if ($changeSet.author)
+#set($author = $changeSet.author)
+#else
+#set($author = "no author")
+#end
+#set($date = $formatter.formatTimestamp($changeSet.date))
+#if (!$date)
+#set($date = "no date")
+#end
+#if ($changeSet.comment)
+#set($comment = $formatter.trim($changeSet.comment))
+#else
+#set($comment = "no comment")
+#end
+Changed: $author @ $date
+Comment: $comment
+Files changed:
+#foreach ( $file in $changeSet.files )
+  $!file.name (#if ($file.revision) $file.revision #else no revision #end)
+#end
+
+#end
+#end
+#end
 #if ( $build.modifiedDependencies )
 ****************************************************************************
 Dependencies Changes:



Mime
View raw message