continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r358420 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/ resources/ resources/META-INF/plexus/ resources/localization/ webapp/
Date Wed, 21 Dec 2005 23:21:30 GMT
Author: evenisse
Date: Wed Dec 21 15:21:19 2005
New Revision: 358420

URL: http://svn.apache.org/viewcvs?rev=358420&view=rev
Log:
Add build feature

Added:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java
  (with props)
Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/DeleteProjectAction.java
    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
    maven/continuum/trunk/continuum-webapp/src/main/webapp/summary.jsp

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java?rev=358420&r1=358419&r2=358420&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
Wed Dec 21 15:21:19 2005
@@ -34,8 +34,6 @@
 {
     private Continuum continuum;
 
-    private Project project;
-
     private String projectName;
 
     private String projectVersion;
@@ -52,7 +50,7 @@
     
     public String execute()
     {
-        project = new Project();
+        Project project = new Project();
 
         project.setName( projectName );
 

Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java?rev=358420&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java
Wed Dec 21 15:21:19 2005
@@ -0,0 +1,73 @@
+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.Project;
+
+import com.opensymphony.webwork.ServletActionContext;
+import com.opensymphony.xwork.ActionSupport;
+
+import java.util.Map;
+
+/**
+ * @author Nick Gonzalez
+ * @version $Id$
+ */
+public class BuildProjectAction
+    extends ActionSupport
+{
+    private Continuum continuum;
+
+    private int projectId;
+
+    public String execute()
+    {
+        try
+        {
+            if ( projectId > 0 )
+            {
+                continuum.buildProject( projectId );
+            }
+            else
+            {
+                continuum.buildProjects();
+            }
+        }
+        catch ( ContinuumException e )
+        {
+            addActionMessage( "Can't build project (id=" + projectId + ") : " + e.getMessage()
);
+
+            e.printStackTrace();
+
+            return ERROR;
+        }
+
+        return SUCCESS;
+    }
+
+    public void setProjectId( int projectId )
+    {
+        this.projectId = projectId;
+    }
+
+    public int getProjectId()
+    {
+        return projectId;
+    }
+}
\ No newline at end of file

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

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

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/DeleteProjectAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/DeleteProjectAction.java?rev=358420&r1=358419&r2=358420&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/DeleteProjectAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/DeleteProjectAction.java
Wed Dec 21 15:21:19 2005
@@ -48,6 +48,7 @@
 
             return ERROR;
         }
+
         return SUCCESS;
     }
 

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=358420&r1=358419&r2=358420&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
Wed Dec 21 15:21:19 2005
@@ -89,6 +89,17 @@
         </requirement>
       </requirements>
     </component>
+    <component>
+      <role>com.opensymphony.xwork.Action</role>
+      <role-hint>buildProject</role-hint>
+      <implementation>org.apache.maven.continuum.web.action.BuildProjectAction</implementation>
+      <instantiation-strategy>per-lookup</instantiation-strategy>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.continuum.Continuum</role>
+        </requirement>
+      </requirements>
+    </component>
 
     <!--
      | Components

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=358420&r1=358419&r2=358420&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
Wed Dec 21 15:21:19 2005
@@ -52,6 +52,7 @@
 summary.projectTable.version = Version
 summary.projectTable.build = Build
 summary.projectTable.group = Group
+summary.buildAll = Build All
 
 // ----------------------------------------------------------------------
 // Page: Configuration

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=358420&r1=358419&r2=358420&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Wed Dec 21 15:21:19
2005
@@ -72,5 +72,10 @@
             <result name="delete">deleteProject.jsp</result>
             <result name="success" type="redirect">summary.action</result>
         </action>
+
+        <action name="buildProject"
+                class="buildProject">
+            <result name="success" type="redirect">summary.action</result>
+        </action>
     </package>
 </xwork>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/summary.jsp
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/webapp/summary.jsp?rev=358420&r1=358419&r2=358420&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/summary.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/summary.jsp Wed Dec 21 15:21:19
2005
@@ -35,9 +35,12 @@
           </ec:row>
         </ec:table>
         <div class="functnbar3">
-          <img src="<ww:url value="/images/icon_success_sml.gif"/>" alt="<ww:text
name="message.success"/>" title="<ww:text name="message.success"/>"/> <ww:property
value="nbSuccesses"/>
-          <img src="<ww:url value="/images/icon_warning_sml.gif"/>" alt="<ww:text
name="message.failed"/>" title="<ww:text name="message.failed"/>"/> <ww:property
value="nbFailures"/>
-          <img src="<ww:url value="/images/icon_error_sml.gif"/>" alt="<ww:text
name="message.error"/>" title="<ww:text name="message.error"/>"/> <ww:property
value="nbErrors"/>
+          <form method="post" action="buildProject.action">
+              <img src="<ww:url value="/images/icon_success_sml.gif"/>" alt="<ww:text
name="message.success"/>" title="<ww:text name="message.success"/>"/> <ww:property
value="nbSuccesses"/>
+              <img src="<ww:url value="/images/icon_warning_sml.gif"/>" alt="<ww:text
name="message.failed"/>" title="<ww:text name="message.failed"/>"/> <ww:property
value="nbFailures"/>
+              <img src="<ww:url value="/images/icon_error_sml.gif"/>" alt="<ww:text
name="message.error"/>" title="<ww:text name="message.error"/>"/> <ww:property
value="nbErrors"/>
+              <input type="submit" name="build-all" value="<ww:text name="summary.buildAll"/>"/>
+          </form>
         </div>
       </div>
     </body>



Mime
View raw message