continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r751253 - in /continuum/trunk: continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java continuum-webapp/src/main/resources/META-INF/plexus/application.xml
Date Sat, 07 Mar 2009 12:27:06 GMT
Author: ctan
Date: Sat Mar  7 12:27:06 2009
New Revision: 751253

URL: http://svn.apache.org/viewvc?rev=751253&view=rev
Log:
[CONTINUUM-2102] make subject line for prepare build and actual build configurable

Modified:
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
    continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java?rev=751253&r1=751252&r2=751253&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
Sat Mar  7 12:27:06 2009
@@ -163,7 +163,13 @@
      *
      * @plexus.configuration
      */
-    private String subjectFormat = "[continuum] BUILD ${state}: ${project.groupId} ${project.name}";
+    private String buildSubjectFormat = "[continuum] BUILD ${state}: ${project.groupId} ${project.name}";
+
+    /**
+     * Customizable mail subject
+     * @plexus.configuration
+     */
+    private String prepareBuildSubjectFormat = "[continuum] PREPARE BUILD ${state]";
 
     // ----------------------------------------------------------------------
     //
@@ -569,7 +575,7 @@
 
         StringWriter writer = new StringWriter();
 
-        boolean velocityResults = velocity.getEngine().evaluate( context, writer, "subjectPattern",
subjectFormat );
+        boolean velocityResults = velocity.getEngine().evaluate( context, writer, "subjectPattern",
buildSubjectFormat );
 
         return writer.toString();
     }
@@ -578,7 +584,6 @@
         throws Exception
     {
         String state = getState( projectScmRoot );
-        subjectFormat = "[continuum] PREPARE BUILD ${state}: ${projectScmRoot.scmRootAddress}";
         
         VelocityContext context = new VelocityContext();
         context.put( "projectScmRoot", projectScmRoot );
@@ -586,7 +591,7 @@
     
         StringWriter writer = new StringWriter();
     
-        boolean velocityResults = velocity.getEngine().evaluate( context, writer, "subjectPattern",
subjectFormat );
+        boolean velocityResults = velocity.getEngine().evaluate( context, writer, "subjectPattern",
prepareBuildSubjectFormat );
     
         return writer.toString();
     }

Modified: continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml?rev=751253&r1=751252&r2=751253&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml (original)
+++ continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml Sat
Mar  7 12:27:06 2009
@@ -76,7 +76,7 @@
         <from-mailbox></from-mailbox>
         <from-name></from-name>
         <timestamp-format>EEE d MMM yyyy HH:mm:ss Z</timestamp-format>
-        <!-- Customizable mail subject.  Use any combination of literal text, or state,
project, or build attributes.
+        <!-- Customizable mail subject for the actual build.  Use any combination of literal
text, or state, project, or build attributes.
           Examples: 
             "[continuum] BUILD ${state}: ${project.groupId} ${project.name}"
               results in "[continuum] BUILD SUCCESSFUL: foo.bar Hello World"
@@ -93,7 +93,8 @@
             "[continuum] BUILD ${state}: ${project.name}, Build Def - ${build.buildDefinition.description}"

               results in "[continuum] BUILD SUCCESSFUL: Hello World, Build Def - Nightly
Test Build"
          -->
-        <subject-format>[continuum] BUILD ${state}: ${project.projectGroup.name} -
${project.name} - ${build.buildDefinition.description}</subject-format>
+        <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>



Mime
View raw message