continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r443134 - in /maven/continuum/branches/continuum-acegi/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/BuildResultAction.java webapp/buildResult.jsp
Date Wed, 13 Sep 2006 21:35:27 GMT
Author: carlos
Date: Wed Sep 13 14:35:26 2006
New Revision: 443134

URL: http://svn.apache.org/viewvc?view=rev&rev=443134
Log:
Show build output

Modified:
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/buildResult.jsp

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java?view=diff&rev=443134&r1=443133&r2=443134
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
Wed Sep 13 14:35:26 2006
@@ -16,13 +16,16 @@
  * limitations under the License.
  */
 
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
 import org.apache.maven.continuum.ContinuumException;
+import org.apache.maven.continuum.configuration.ConfigurationException;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
 import org.codehaus.plexus.util.FileUtils;
 
-import java.util.List;
-
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
@@ -34,8 +37,6 @@
 public class BuildResultAction
     extends ContinuumActionSupport
 {
-
-
     private BuildResult buildResult;
 
     private int buildId;
@@ -48,19 +49,23 @@
 
     private boolean hasSurefireResults;
 
+    private String buildOutput;
+
     public String execute()
-        throws ContinuumException
+        throws ContinuumException, ConfigurationException, IOException
     {
         //todo get this working for other types of test case rendering other then just surefire
         // check if there are surefire results to display
-        Project project = getContinuum().getProject( projectId );
+        Project project = getContinuum().getProject( getProjectId() );
         hasSurefireResults = FileUtils.fileExists( project.getWorkingDirectory() + "/target/surefire-reports"
);
 
+        buildResult = getContinuum().getBuildResult( getBuildId() );
 
-        buildResult = getContinuum().getBuildResult( buildId );
+        changeSet = getContinuum().getChangesSinceLastSuccess( getProjectId(), getBuildId()
);
 
+        File buildOutputFile = getContinuum().getConfiguration().getBuildOutputFile( getBuildId(),
getProjectId() );
 
-        changeSet = getContinuum().getChangesSinceLastSuccess( projectId, buildId );
+        buildOutput = FileUtils.fileRead( buildOutputFile );
 
         return SUCCESS;
     }
@@ -113,5 +118,10 @@
     public void setHasSurefireResults( boolean hasSurefireResults )
     {
         this.hasSurefireResults = hasSurefireResults;
+    }
+
+    public String getBuildOutput()
+    {
+        return buildOutput;
     }
 }

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/buildResult.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/buildResult.jsp?view=diff&rev=443134&r1=443133&r2=443134
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/buildResult.jsp
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/buildResult.jsp
Wed Sep 13 14:35:26 2006
@@ -119,12 +119,12 @@
         <ww:else>
           <h4><ww:text name="buildResult.buildOutput"/></h4>
           <p>
-            <ww:if test="buildResult.output == ''">
+            <ww:if test="buildOutput == ''">
                 <ww:text name="buildResult.noOutput"/>
             </ww:if>
             <ww:else>
               <div style="width:100%; height:500px; overflow:auto; border-style: solid;
border-width: 1px">
-                <code><pre>buildResult.output</pre></code>
+                <pre><ww:property value="buildOutput"/></pre>
               </div>
             </ww:else>
           </p>



Mime
View raw message