continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r365377 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/ resources/ resources/META-INF/plexus/ resources/localization/ webapp/
Date Mon, 02 Jan 2006 17:04:22 GMT
Author: evenisse
Date: Mon Jan  2 09:04:15 2006
New Revision: 365377

URL: http://svn.apache.org/viewcvs?rev=365377&view=rev
Log:
Start build result screen

Added:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
  (with props)
    maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResult.jsp   (with props)
Modified:
    maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
    maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml

Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java?rev=365377&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
Mon Jan  2 09:04:15 2006
@@ -0,0 +1,96 @@
+package org.apache.maven.continuum.web.action;
+
+/*
+ * 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.Continuum;
+import org.apache.maven.continuum.ContinuumException;
+import org.apache.maven.continuum.model.project.BuildResult;
+
+import com.opensymphony.xwork.ActionSupport;
+
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public class BuildResultAction
+    extends ActionSupport
+{
+    private Continuum continuum;
+
+    private BuildResult buildResult;
+
+    private int buildId;
+
+    private int projectId;
+
+    private String projectName;
+
+    public String execute()
+    {
+        try
+        {
+            buildResult = continuum.getBuildResultByBuildNumber( projectId, buildId );
+        }
+        catch ( ContinuumException e )
+        {
+            addActionError( "Can't get build result (id=" + buildId + ") for project (id="
+ projectId + ") : " + e.getMessage() );
+
+            e.printStackTrace();
+
+            return ERROR;
+        }
+
+        return SUCCESS;
+    }
+
+    public int getBuildId()
+    {
+        return buildId;
+    }
+
+    public void setBuildId( int buildId )
+    {
+        this.buildId = buildId;
+    }
+
+    public int getProjectId()
+    {
+        return projectId;
+    }
+
+    public void setProjectId( int projectId )
+    {
+        this.projectId = projectId;
+    }
+
+    public String getProjectName()
+    {
+        return projectName;
+    }
+
+    public void setProjectName( String projectName )
+    {
+        this.projectName = projectName;
+    }
+
+    public BuildResult getBuildResult()
+    {
+        return buildResult;
+    }
+}

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml?rev=365377&r1=365376&r2=365377&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml
Mon Jan  2 09:04:15 2006
@@ -229,6 +229,17 @@
     </component>
     <component>
       <role>com.opensymphony.xwork.Action</role>
+      <role-hint>buildResult</role-hint>
+      <implementation>org.apache.maven.continuum.web.action.BuildResultAction</implementation>
+      <instantiation-strategy>per-lookup</instantiation-strategy>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.continuum.Continuum</role>
+        </requirement>
+      </requirements>
+    </component>
+    <component>
+      <role>com.opensymphony.xwork.Action</role>
       <role-hint>workingCopy</role-hint>
       <implementation>org.apache.maven.continuum.web.action.WorkingCopyAction</implementation>
       <instantiation-strategy>per-lookup</instantiation-strategy>

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=365377&r1=365376&r2=365377&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
Mon Jan  2 09:04:15 2006
@@ -248,6 +248,12 @@
 buildResults.state = State
 
 // ----------------------------------------------------------------------
+// Page: BuildResults
+// ----------------------------------------------------------------------
+buildResult.page.title = Continuum - Build result
+buildResult.section.title = Build result for {0}
+
+// ----------------------------------------------------------------------
 // Page: WorkingCopy
 // ----------------------------------------------------------------------
 workingCopy.page.title = Continuum - Working Copy

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml?rev=365377&r1=365376&r2=365377&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Mon Jan  2 09:04:15
2006
@@ -150,6 +150,11 @@
             <result name="success">buildResults.jsp</result>
         </action>
 
+        <action name="buildResult"
+                class="buildResult">
+            <result name="success">buildResult.jsp</result>
+        </action>
+
         <action name="workingCopy"
                 class="workingCopy">
             <result name="success">workingCopy.jsp</result>

Added: maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResult.jsp
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResult.jsp?rev=365377&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResult.jsp (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResult.jsp Mon Jan  2 09:04:15
2006
@@ -0,0 +1,27 @@
+<%@ taglib uri="webwork" prefix="ww" %>
+<%@ taglib uri="/tld/extremecomponents" prefix="ec" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
+<html>
+  <ww:i18n name="localization.Continuum">
+    <head>
+        <title><ww:text name="buildResult.page.title"/></title>
+    </head>
+    <body>
+      <div id="h3">
+        <div>
+          <p style="border-top: 1px solid transparent; border-bottom: 1px solid black;">
+            <a style="border: 1px solid black; padding-left: 1em; padding-right: 1em;
text-decoration:none;" href="<ww:url value="/projectView.action?projectId="/><ww:property
value="projectId"/>&projectName=<ww:property value="projectName"/>">Info</a>
+            <a style="border: 1px solid black; padding-left: 1em; padding-right: 1em;
text-decoration:none;" href="<ww:url value="/buildResults.action?projectId="/><ww:property
value="projectId"/>&projectName=<ww:property value="projectName"/>">Builds</a>
+            <a style="border: 1px solid black; padding-left: 1em; padding-right: 1em;
text-decoration:none;" href="<ww:url value="/workingCopy.action?projectId="/><ww:property
value="projectId"/>&projectName=<ww:property value="projectName"/>">Working&nbsp;Copy</a>
+          </p>
+        </div>
+
+        <h3>
+            <ww:text name="buildResult.section.title">
+                <ww:param><ww:property value="projectName"/></ww:param>
+            </ww:text>
+        </h3>
+      </div>
+    </body>
+  </ww:i18n>
+</html>

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResult.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResult.jsp
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"



Mime
View raw message