continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r233320 - in /maven/continuum/trunk/continuum-web/src/main: java/org/apache/maven/continuum/web/tool/ resources/META-INF/plexus/ resources/templates/screens/
Date Thu, 18 Aug 2005 14:36:56 GMT
Author: brett
Date: Thu Aug 18 07:36:46 2005
New Revision: 233320

URL: http://svn.apache.org/viewcvs?rev=233320&view=rev
Log:
add back build information

Added:
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumTriggerContentGenerator.java
  (with props)
Modified:
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumStateContentGenerator.java
    maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectBuild.vm

Modified: maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumStateContentGenerator.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumStateContentGenerator.java?rev=233320&r1=233319&r2=233320&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumStateContentGenerator.java
(original)
+++ maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumStateContentGenerator.java
Thu Aug 18 07:36:46 2005
@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.project.ContinuumProjectState;
@@ -31,11 +30,6 @@
     extends AbstractLogEnabled
     implements ContentGenerator
 {
-    /**
-     * @plexus.requirement
-     */
-    private Continuum continuum;
-
     public String generate( Object item )
     {
         int state;

Added: maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumTriggerContentGenerator.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumTriggerContentGenerator.java?rev=233320&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumTriggerContentGenerator.java
(added)
+++ maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumTriggerContentGenerator.java
Thu Aug 18 07:36:46 2005
@@ -0,0 +1,55 @@
+package org.apache.maven.continuum.web.tool;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.continuum.model.project.BuildResult;
+import org.apache.maven.continuum.project.ContinuumProjectState;
+import org.codehaus.plexus.formica.web.ContentGenerator;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+
+/**
+ * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
+ * @version $Id$
+ */
+public class ContinuumTriggerContentGenerator
+    extends AbstractLogEnabled
+    implements ContentGenerator
+{
+
+    public String generate( Object item )
+    {
+        int trigger;
+
+        BuildResult result = (BuildResult) item;
+        trigger = result.getTrigger();
+
+        if ( trigger == ContinuumProjectState.TRIGGER_UNKNOWN )
+        {
+            return "Scheduled";
+        }
+        else if ( trigger == ContinuumProjectState.TRIGGER_FORCED )
+        {
+            return "Forced";
+        }
+        else
+        {
+            getLogger().warn( "Unknown trigger '" + trigger + "'." );
+
+            return "Unknown";
+        }
+    }
+}

Propchange: maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumTriggerContentGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumTriggerContentGenerator.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml?rev=233320&r1=233319&r2=233320&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml
(original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml
Thu Aug 18 07:36:46 2005
@@ -97,6 +97,12 @@
             <scope>global</scope>
           </tool>
           <tool>
+            <name>trigger</name>
+            <role>org.codehaus.plexus.formica.web.ContentGenerator</role>
+            <role-hint>continuum-trigger</role-hint>
+            <scope>global</scope>
+          </tool>
+          <tool>
             <name>formtool</name>
             <role>org.apache.maven.continuum.web.tool.FormicaTool</role>
             <scope>global</scope>
@@ -165,7 +171,7 @@
               </scalar>
               <scalar>
                 <id>builds</id>
-                <expression>getBuildsForProject(#id)</expression>
+                <expression>getBuildResultsForProject(#id)</expression>
               </scalar>
             </scalars>
           </view>
@@ -178,7 +184,7 @@
               </scalar>
               <scalar>
                 <id>build</id>
-                <expression>getBuild(#buildId)</expression>
+                <expression>getBuildResult(#buildId)</expression>
               </scalar>
             </scalars>
           </view>
@@ -407,11 +413,12 @@
       <role>org.codehaus.plexus.formica.web.ContentGenerator</role>
       <role-hint>continuum-state</role-hint>
       <implementation>org.apache.maven.continuum.web.tool.ContinuumStateContentGenerator</implementation>
-      <requirements>
-        <requirement>
-          <role>org.apache.maven.continuum.Continuum</role>
-        </requirement>
-      </requirements>
+    </component>
+
+    <component>
+      <role>org.codehaus.plexus.formica.web.ContentGenerator</role>
+      <role-hint>continuum-trigger</role-hint>
+      <implementation>org.apache.maven.continuum.web.tool.ContinuumTriggerContentGenerator</implementation>
     </component>
 
   </components>

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectBuild.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectBuild.vm?rev=233320&r1=233319&r2=233320&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectBuild.vm
(original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectBuild.vm
Thu Aug 18 07:36:46 2005
@@ -14,7 +14,7 @@
       </tr>
       <tr class="a">
         <th>Triggered By</th>
-        <td>$formatter.formatTrigger( $build.trigger )</td>
+        <td>$trigger.generate($build)</td>
       </tr>
     </table>
   </p>
@@ -22,13 +22,20 @@
   #if ( $build.scmResult )
   <h4>Changes</h4>
   <p>
-    #if ( $build.scmResult.files.size() == 0 )
-    <b>No files changed</b>
+    #if ( $build.scmResult.changes.size() == 0 )
+    <b>No changes</b>
     #else
     <table border="1" cellspacing="2" cellpadding="3" width="100%">
-      #foreach ( $file in $build.scmResult.files )
+      #foreach ( $changeSet in $build.scmResult.changes )
       <tr class="a">
-        <td>$file.path</td>
+        #if ($changeSet.author) <td>$changeSet.author</td> #end
+        #if ($changeSet.date > 0) <td>$date.format('medium',$changeSet.date)</td>
#end
+        #if ($changeSet.comment) <td>$changeSet.comment</td> #end
+        <td>
+          #foreach ( $file in $changeSet.files )
+            <code>$!file.name</code><br/>
+          #end
+        </td>
       </tr>
       #end
     </table>



Mime
View raw message