continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r575216 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java webapp/WEB-INF/jsp/buildDefinitionEdit.jsp
Date Thu, 13 Sep 2007 08:40:06 GMT
Author: evenisse
Date: Thu Sep 13 01:40:05 2007
New Revision: 575216

URL: http://svn.apache.org/viewvc?rev=575216&view=rev
Log:
Add missing type field

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java?rev=575216&r1=575215&r2=575216&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
Thu Sep 13 01:40:05 2007
@@ -31,6 +31,7 @@
 import org.apache.maven.continuum.web.exception.ContinuumActionException;
 import org.codehaus.plexus.util.StringUtils;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -78,11 +79,13 @@
     private String projectGroupName = "";
 
     private int profileId;
-    
+
     private String description;
-    
+
+    private List<String> buildDefinitionTypes;
+
     private String buildDefinitionType;
-    
+
     private boolean alwaysBuild;
 
     public void prepare()
@@ -110,6 +113,11 @@
             profiles = this.getContinuum().getProfileService().getAllProfiles();
         }
 
+        buildDefinitionTypes = new ArrayList<String>();
+        buildDefinitionTypes.add( ContinuumBuildExecutorConstants.ANT_BUILD_EXECUTOR );
+        buildDefinitionTypes.add( ContinuumBuildExecutorConstants.MAVEN_ONE_BUILD_EXECUTOR
);
+        buildDefinitionTypes.add( ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR
);
+        buildDefinitionTypes.add( ContinuumBuildExecutorConstants.SHELL_BUILD_EXECUTOR );
     }
 
     /**
@@ -191,12 +199,14 @@
                 {
                     if ( ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR.equals(
executor ) )
                     {
-                        buildFile = getContinuum().getConfiguration().getDefaultMavenTwoBuildDefinition().getBuildFile();
+                        buildFile =
+                            getContinuum().getConfiguration().getDefaultMavenTwoBuildDefinition().getBuildFile();
                         buildDefinitionType = ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR;
                     }
                     else if ( ContinuumBuildExecutorConstants.MAVEN_ONE_BUILD_EXECUTOR.equals(
executor ) )
                     {
-                        buildFile = getContinuum().getConfiguration().getDefaultMavenOneBuildDefinition().getBuildFile();
+                        buildFile =
+                            getContinuum().getConfiguration().getDefaultMavenOneBuildDefinition().getBuildFile();
                         buildDefinitionType = ContinuumBuildExecutorConstants.MAVEN_ONE_BUILD_EXECUTOR;
                     }
                     else if ( ContinuumBuildExecutorConstants.ANT_BUILD_EXECUTOR.equals(
executor ) )
@@ -214,7 +224,7 @@
                     buildFile = preDefinedBuildFile;
                 }
             }
-            
+
             // if buildDefinitionType is null it will find with the executor
             if ( StringUtils.isEmpty( buildDefinitionType ) )
             {
@@ -615,6 +625,11 @@
     public void setBuildDefinitionType( String buildDefinitionType )
     {
         this.buildDefinitionType = buildDefinitionType;
+    }
+
+    public List<String> getBuildDefinitionTypes()
+    {
+        return buildDefinitionTypes;
     }
 
     public boolean isAlwaysBuild()

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp?rev=575216&r1=575215&r2=575216&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp
Thu Sep 13 01:40:05 2007
@@ -76,6 +76,7 @@
                     <ww:select label="%{getText('buildDefinition.schedule.label')}" name="scheduleId"
list="schedules"/>
                     <ww:select label="%{getText('buildDefinition.profile.label')}" name="profileId"
list="profiles" listValue="name" 
                                listKey="id" headerKey="-1" headerValue=""/>
+                    <ww:select label="%{getText('buildDefinition.type.label')}" name="buildDefinitionType"
list="buildDefinitionTypes"/>
                     <ww:textfield label="%{getText('buildDefinition.description.label')}"
name="description" />
                   </tbody>
                 </table>
@@ -87,7 +88,6 @@
                 <ww:hidden name="projectId"/>
                 <ww:hidden name="projectGroupId"/>
                 <ww:hidden name="groupBuildDefinition"/>
-                <ww:hidden name="buildDefinitionType" />
                 <ww:if test="defaultBuildDefinition == true">
                   <ww:hidden name="defaultBuildDefinition" value="true"/>
                 </ww:if>



Mime
View raw message