continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r726688 - in /continuum/branches/continuum-parallel-builds: continuum-base/continuum-configuration/ continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/ continuum-webapp/ continuum-webapp/src/main/java/or...
Date Mon, 15 Dec 2008 12:02:57 GMT
Author: oching
Date: Mon Dec 15 04:02:56 2008
New Revision: 726688

URL: http://svn.apache.org/viewvc?rev=726688&view=rev
Log:
[CONTINUUM-265]
submitted by Gwen Harold Autencio
-UI for parallel builds

Added:
    continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/BuildQueueAction.java
    continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editParallelBuilds.jsp
    continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/parallelbuilds.jsp
Modified:
    continuum/branches/continuum-parallel-builds/continuum-base/continuum-configuration/pom.xml
    continuum/branches/continuum-parallel-builds/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java
    continuum/branches/continuum-parallel-builds/continuum-webapp/pom.xml
    continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
    continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java
    continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/resources/localization/Continuum.properties
    continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/resources/struts.xml
    continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configuration.jsp
    continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configurationEdit.jsp
    continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/editSchedule.jsp
    continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp

Modified: continuum/branches/continuum-parallel-builds/continuum-base/continuum-configuration/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-parallel-builds/continuum-base/continuum-configuration/pom.xml?rev=726688&r1=726687&r2=726688&view=diff
==============================================================================
--- continuum/branches/continuum-parallel-builds/continuum-base/continuum-configuration/pom.xml
(original)
+++ continuum/branches/continuum-parallel-builds/continuum-base/continuum-configuration/pom.xml
Mon Dec 15 04:02:56 2008
@@ -101,6 +101,19 @@
       <groupId>org.apache.continuum</groupId>
       <artifactId>continuum-test</artifactId>
       <scope>test</scope>
+    </dependency>
+    <dependency> <!-- added since depMgt doesn't override imported dependencies
-->
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus.registry</groupId>
+      <artifactId>plexus-registry-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus.registry</groupId>
+      <artifactId>plexus-registry-commons</artifactId>
+      <scope>runtime</scope>
     </dependency>        
   </dependencies>
 </project>

Modified: continuum/branches/continuum-parallel-builds/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-parallel-builds/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java?rev=726688&r1=726687&r2=726688&view=diff
==============================================================================
--- continuum/branches/continuum-parallel-builds/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java
(original)
+++ continuum/branches/continuum-parallel-builds/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java
Mon Dec 15 04:02:56 2008
@@ -29,6 +29,7 @@
 import org.apache.continuum.configuration.model.ContinuumConfigurationModel;
 import org.apache.continuum.configuration.model.io.xpp3.ContinuumConfigurationModelXpp3Reader;
 import org.apache.continuum.configuration.model.io.xpp3.ContinuumConfigurationModelXpp3Writer;
+import org.codehaus.plexus.util.ReaderFactory;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -40,12 +41,14 @@
  */
 public class DefaultContinuumConfiguration
     implements ContinuumConfiguration
-{
+{ 
     private Logger log = LoggerFactory.getLogger( getClass() );
 
     private File configurationFile;
 
     private GeneralConfiguration generalConfiguration;
+    
+    public static final String CONFIGURATION_FILE = "continuum.xml";
 
     //----------------------------------------------------
     //  Initialize method configured in the Spring xml 
@@ -117,6 +120,8 @@
                 .read( new InputStreamReader( new FileInputStream( file ) ) );
 
             this.generalConfiguration = new GeneralConfiguration();
+            
+            this.generalConfiguration.setNumberOfBuildsInParallel( configuration.getNumberOfBuildsInParallel()
);
             this.generalConfiguration.setBaseUrl( configuration.getBaseUrl() );
             if ( StringUtils.isNotEmpty( configuration.getBuildOutputDirectory() ) )
             {
@@ -149,6 +154,9 @@
                 this.generalConfiguration.setReleaseOutputDirectory( new File( configuration
                     .getReleaseOutputDirectory() ) );
             }
+            
+            
+            
         }
         catch ( IOException e )
         {
@@ -170,11 +178,14 @@
         {
             ContinuumConfigurationModel configurationModel = new ContinuumConfigurationModel();
             configurationModel.setBaseUrl( this.generalConfiguration.getBaseUrl() );
+
+            
             // normally not null but NPE free is better !
             if ( this.generalConfiguration.getBuildOutputDirectory() != null )
             {
                 configurationModel.setBuildOutputDirectory( this.generalConfiguration.getBuildOutputDirectory()
                     .getPath() );
+                configurationModel.setNumberOfBuildsInParallel( this.generalConfiguration.getNumberOfBuildsInParallel()
);
             }
             if ( this.generalConfiguration.getWorkingDirectory() != null )
             {
@@ -209,6 +220,8 @@
                     .getPath() );
             }
 
+            
+            
             ContinuumConfigurationModelXpp3Writer writer = new ContinuumConfigurationModelXpp3Writer();
             FileWriter fileWriter = new FileWriter( file );
             writer.write( fileWriter, configurationModel );
@@ -225,7 +238,7 @@
     //  Spring injection
     // ----------------------------------------
 
-
+    
     public File getConfigurationFile()
     {
         return configurationFile;

Modified: continuum/branches/continuum-parallel-builds/continuum-webapp/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-parallel-builds/continuum-webapp/pom.xml?rev=726688&r1=726687&r2=726688&view=diff
==============================================================================
--- continuum/branches/continuum-parallel-builds/continuum-webapp/pom.xml (original)
+++ continuum/branches/continuum-parallel-builds/continuum-webapp/pom.xml Mon Dec 15 04:02:56
2008
@@ -319,6 +319,10 @@
   </build>
   <dependencies>
     <dependency>
+      <groupId>org.apache.continuum</groupId>
+      <artifactId>continuum-store</artifactId>
+    </dependency>
+    <dependency>
       <groupId>org.codehaus.plexus.registry</groupId>
       <artifactId>plexus-registry-api</artifactId>
     </dependency>

Modified: continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java?rev=726688&r1=726687&r2=726688&view=diff
==============================================================================
--- continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
(original)
+++ continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
Mon Dec 15 04:02:56 2008
@@ -19,12 +19,21 @@
  * under the License.
  */
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.continuum.dao.BuildQueueDao;
 import org.apache.maven.continuum.ContinuumException;
+import org.apache.maven.continuum.model.project.BuildDefinition;
+import org.apache.maven.continuum.model.project.BuildQueue;
 import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.web.exception.AuthenticationRequiredException;
 import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
+import org.apache.maven.model.Build;
 
-import java.util.Collection;
+import com.opensymphony.xwork2.Preparable;
 
 /**
  * @author Nik Gonzalez
@@ -32,6 +41,7 @@
  */
 public class ScheduleAction
     extends ContinuumConfirmAction
+    implements Preparable
 {
     private int id;
 
@@ -64,6 +74,27 @@
     private String dayOfWeek = "?";
 
     private String year;
+    
+    private List<BuildQueue> schedulesBuildQueue;
+    
+    private BuildQueue buildQueue;
+   
+    private List<BuildQueue> buildQueues;
+    
+    private List<String> buildQueueIds;
+    
+    /**
+     * @plexus.requirement
+     */
+    private BuildQueueDao buildQueueDao;
+    
+    public void prepare()
+        throws Exception
+    {
+    	super.prepare();
+        buildQueues = buildQueueDao.getAllBuildQueues();
+        schedulesBuildQueue = new ArrayList<BuildQueue>();
+    }
 
     public String summary()
         throws ContinuumException
@@ -81,7 +112,9 @@
         {
             addActionError( e.getMessage() );
             return REQUIRES_AUTHENTICATION;
-        }
+        }        buildQueueIds = new ArrayList<String>();
+        
+        
 
         schedules = getContinuum().getSchedules();
 
@@ -127,6 +160,7 @@
             name = schedule.getName();
             delay = schedule.getDelay();
             maxJobExecutionTime = schedule.getMaxJobExecutionTime();
+         
         }
         else
         {
@@ -140,6 +174,7 @@
     public String save()
         throws ContinuumException
     {
+    	
         try
         {
             checkManageSchedulesAuthorization();
@@ -178,13 +213,14 @@
 
     private Schedule setFields( Schedule schedule )
     {
-        schedule.setActive( active );
+        schedule.setActive( active );	
         schedule.setCronExpression( getCronExpression() );
         schedule.setDelay( delay );
         schedule.setDescription( description );
         schedule.setName( name );
         schedule.setMaxJobExecutionTime( maxJobExecutionTime );
-
+        schedule.setBuildQueues( schedulesBuildQueue );	
+        
         return schedule;
     }
 
@@ -414,4 +450,56 @@
         return ( second + " " + minute + " " + hour + " " + dayOfMonth + " " + month + "
" + dayOfWeek + " " +
             year ).trim();
     }
+
+	public BuildQueue getBuildQueue() 
+	{
+	    return buildQueue;
+	}
+
+	public void setBuildQueue(BuildQueue buildQueue) 
+	{
+	    this.buildQueue = buildQueue;
+	}
+
+	public List<BuildQueue> getBuildQueues() 
+	{
+	    return buildQueues;
+	}
+
+	public void setBuildQueues(List<BuildQueue> buildQueues) 
+	{
+	    this.buildQueues = buildQueues;
+	}
+
+	public List<String> getBuildQueueIds() 
+	{
+	    return buildQueueIds;
+	}
+
+	public void setBuildQueueIds(List<String> buildQueueIds) 
+	{
+	    this.buildQueueIds = buildQueueIds;
+	}
+
+	public BuildQueueDao getBuildQueueDao() 
+	{
+	    return buildQueueDao;
+	}
+
+	public void setBuildQueueDao(BuildQueueDao buildQueueDao) 
+	{
+	    this.buildQueueDao = buildQueueDao;
+	}
+
+	public List<BuildQueue> getSchedulesBuildQueue() 
+	{
+	    return schedulesBuildQueue;
+	}
+
+	public void setSchedulesBuildQueue(List<BuildQueue> schedulesBuildQueue) 
+	{
+	    this.schedulesBuildQueue = schedulesBuildQueue;
+	}
+	
+	
 }

Added: continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/BuildQueueAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/BuildQueueAction.java?rev=726688&view=auto
==============================================================================
--- continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/BuildQueueAction.java
(added)
+++ continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/BuildQueueAction.java
Mon Dec 15 04:02:56 2008
@@ -0,0 +1,163 @@
+package org.apache.maven.continuum.web.action.admin;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.continuum.dao.BuildQueueDao;
+import org.apache.continuum.taskqueue.DefaultOverallBuildQueue;
+import org.apache.continuum.taskqueue.OverallBuildQueue;
+import org.apache.maven.continuum.model.project.BuildQueue;
+import org.apache.maven.continuum.model.system.Installation;
+import org.apache.maven.continuum.store.ContinuumStoreException;
+
+import com.opensymphony.xwork2.Preparable;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+/**
+ *
+ * @plexus.component role="com.opensymphony.xwork2.Action" role-hint="buildQueueAction"
+ */
+public class BuildQueueAction 
+    extends AbstractBuildQueueAction
+    implements Preparable
+{
+	private String name;
+	
+	private int size;
+	
+    private List<BuildQueue> buildQueueList;
+    
+    /**
+     * @plexus.requirement
+     */
+    private BuildQueueDao buildQueueDao;
+    
+    private BuildQueue buildQueue;
+
+    public void prepare()
+        throws ContinuumStoreException
+    {
+	    this.buildQueueList = buildQueueDao.getAllBuildQueues();
+    }
+    
+    public String input()
+    {	
+        return INPUT;
+    }
+    
+    public String list()
+        throws Exception
+    {
+        this.buildQueueList = buildQueueDao.getAllBuildQueues();
+        return SUCCESS;
+    }
+    
+    public String save()
+        throws Exception
+    {
+    	
+    	int allowedBuilds = getContinuum().getConfiguration().getNumberOfBuildsInParallel();
+    	if ( allowedBuilds <= this.buildQueueList.size() )
+    	{
+    		addActionError(" You are only allowed " + allowedBuilds );
+    		return ERROR;
+    	}
+    	else
+    	{
+    		BuildQueue buildQueue = new BuildQueue();	
+        	buildQueue.setId( buildQueueList.size() + 1 );
+        	buildQueue.setName( name );
+        	buildQueueDao.addBuildQueue( buildQueue );
+        	
+        	return SUCCESS;
+    	}
+    	
+    }
+    
+    public String edit()
+        throws Exception
+    {
+        BuildQueue buildQueueToBeEdited = buildQueueDao.getBuildQueue( this.buildQueue.getId()
);
+        return SUCCESS;
+    }
+    
+    public String delete()
+        throws Exception
+    {
+    	BuildQueue buildQueueToBeDeleted = buildQueueDao.getBuildQueue( this.buildQueue.getId()
);
+    	buildQueueDao.removeBuildQueue( buildQueueToBeDeleted );
+
+    	this.buildQueueList = buildQueueDao.getAllBuildQueues();
+    	
+        return SUCCESS;
+    }
+
+	public String getName() 
+	{
+	    return name;
+	}
+
+	public void setName(String name) 
+	{
+	    this.name = name;
+	}
+
+	public List<BuildQueue> getBuildQueueList() 
+	{
+	    return buildQueueList;
+	}
+
+	public void setBuildQueueList(List<BuildQueue> buildQueueList) 
+	{
+	    this.buildQueueList = buildQueueList;
+	}
+
+	public BuildQueueDao getBuildQueueDao() 
+	{
+	    return buildQueueDao;
+	}
+
+	public void setBuildQueueDao(BuildQueueDao buildQueueDao) 
+	{
+	    this.buildQueueDao = buildQueueDao;
+	}
+
+	public int getSize() 
+	{
+		return size;
+	}
+
+	public void setSize(int size) 
+	{
+		this.size = size;
+	}
+
+	public BuildQueue getBuildQueue() 
+	{
+	    return buildQueue;
+	}
+
+	public void setBuildQueue(BuildQueue buildQueue) 
+	{
+	    this.buildQueue = buildQueue;
+	}
+}

Modified: continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java?rev=726688&r1=726687&r2=726688&view=diff
==============================================================================
--- continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java
(original)
+++ continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java
Mon Dec 15 04:02:56 2008
@@ -57,8 +57,12 @@
     
     private String releaseOutputDirectory;
 
+    private int numberOfAllowedBuildsinParallel;
+    
     private boolean requireReleaseOutput;
-
+    
+    private boolean requireParallelBuilds;
+    
     public void prepare()
     {
         ConfigurationService configuration = getContinuum().getConfiguration();
@@ -97,6 +101,11 @@
             releaseOutputDirectory = releaseOutputDirectoryFile.getAbsolutePath();
         }
         
+        if ( requireParallelBuilds )
+        {
+            numberOfAllowedBuildsinParallel = configuration.getNumberOfBuildsInParallel();

+        }
+        
         String requireRelease = ServletActionContext.getRequest().getParameter( "requireReleaseOutput"
);
         setRequireReleaseOutput( new Boolean( requireRelease ) );
     }
@@ -119,7 +128,12 @@
         configuration.setWorkingDirectory( new File( workingDirectory ) );
 
         configuration.setBuildOutputDirectory( new File( buildOutputDirectory ) );
-
+        
+        if ( requireParallelBuilds )
+        {
+            configuration.setNumberOfBuildsInParallel( numberOfAllowedBuildsinParallel );

+        }
+        
         if ( StringUtils.isNotEmpty( deploymentRepositoryDirectory ) )
         {
             configuration.setDeploymentRepositoryDirectory( new File( deploymentRepositoryDirectory
) );
@@ -128,7 +142,7 @@
         {
             configuration.setDeploymentRepositoryDirectory( null );
         }
-
+        
         configuration.setUrl( baseUrl );
 
         configuration.setInitialized( true );
@@ -221,4 +235,26 @@
     {
         this.requireReleaseOutput = requireReleaseOutput;
     }
+    
+	public int getNumberOfAllowedBuildsinParallel() 
+	{
+	    return numberOfAllowedBuildsinParallel;
+	}
+
+	public void setNumberOfAllowedBuildsinParallel( int numberOfAllowedBuildsinParallel ) 
+	{
+	    this.numberOfAllowedBuildsinParallel = numberOfAllowedBuildsinParallel;
+	}
+
+	public boolean isRequireParallelBuilds() 
+	{
+	    return requireParallelBuilds;
+	}
+
+	public void setRequireParallelBuilds( boolean requireParallelBuilds ) 
+	{
+	    this.requireParallelBuilds = requireParallelBuilds;
+	}
+    
+    
 }

Modified: continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=726688&r1=726687&r2=726688&view=diff
==============================================================================
--- continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/resources/localization/Continuum.properties
Mon Dec 15 04:02:56 2008
@@ -70,6 +70,7 @@
 menu.add.shellProject = Shell Project
 menu.administration = Administration
 menu.administration.configuration = Configuration
+menu.administration.build.queue = Build Queue
 menu.administration.appearance = Appearance
 menu.administration.profile = Build Environments
 menu.administration.installations = Installations
@@ -230,6 +231,8 @@
 configuration.buildOutputDirectory.label = Build Output Directory
 configuration.deploymentRepositoryDirectory.label = Deployment Repository Directory
 configuration.baseUrl.label = Base URL
+configuration.allowed.build.parallel = Number of Allowed Builds in Parallel
+configuration.disable.parallel.builds = Disable Parallel Builds
 configuration.submit.edit = Edit
 configuration.guest.message = Enable/Disable login as guest
 configuration.workingDirectory.message = Enter the working directory of the Continuum web
application
@@ -239,6 +242,7 @@
 configuration.companyName.message = Enter the company name
 configuration.companyLogo.message = Enter the company logo
 configuration.companyUrl.message = Enter the URL of the official company website
+configuration.allowed.build.paralle.message = Enter the number of Allowed Builds in Parallel
 configuration.releaseOutputDirectory.label = Release Output Directory
 configuration.releaseOutputDirectory.message = Enter the release output directory of the
Continuum web application
 configuration.releaseOutputDirectory.required = You must define a release output directory
@@ -612,6 +616,9 @@
 schedule.dayOfWeek.label = Day of Week
 schedule.year.label = Year [optional]
 schedule.remove.error = The schedule can't be removed, it is probably used by a build definition.
+schedule.buildqueues.define = Configure the used build queues
+schedule.available.buildqueues = --- Available Build Queues ---
+schedule.available.buildqueues.used = --- Used Build Queues ---
 
 # ----------------------------------------------------------------------
 # Page: SurefireReport
@@ -947,4 +954,17 @@
 scmResult.state = State
 scmResult.projectGroupName = Project Group Name
 scmResult.scmRootAddress = SCM Root URL
-scmResult.scmError = SCM Error
\ No newline at end of file
+scmResult.scmError = SCM Error
+
+# ----------------------------------------------------------------------
+# Page: Parallel Build Queue List
+# ----------------------------------------------------------------------
+parallel.build.queues.page.title= Continumm - Parallel Build Queue
+parallel.build.queues.section.title= Continuum - Parallel Build Queue
+
+# ----------------------------------------------------------------------
+# Page: Parallel Build Edit
+# ----------------------------------------------------------------------
+parallel.build.queue.page.title= Continuum - Add/Edit Parallel Build Queue
+parallel.build.queue.section.title=Continuum - Add/Edit Parallel Build Queue
+parallel.build.queue.name = Name
\ No newline at end of file

Modified: continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/resources/struts.xml?rev=726688&r1=726687&r2=726688&view=diff
==============================================================================
--- continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/resources/struts.xml
(original)
+++ continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/resources/struts.xml
Mon Dec 15 04:02:56 2008
@@ -686,7 +686,7 @@
       <result name="success">/WEB-INF/jsp/admin/installationsList.jsp</result>
     </action>  
     
-    <!--
+    <!--addBuildEnv
        Build Definitions Templates actions 
     -->  
     <action name="buildDefinitionTemplates" class="buildDefinitionTemplates" method="summary">
@@ -782,6 +782,29 @@
     </action>    
     
     <!--
+    * ALLOWED BUILDS IN PARALLEL
+    -->
+    
+    <action name="buildQueueList" class="org.apache.maven.continuum.web.action.admin.BuildQueueAction"
method="list">
+      <result name="success">/WEB-INF/jsp/admin/parallelbuilds.jsp</result>
+    </action>
+    
+    <action name="addBuildQueue" class="org.apache.maven.continuum.web.action.admin.BuildQueueAction">
+      <result name="input">/WEB-INF/jsp/admin/editParallelBuilds.jsp</result>

+    </action>
+    
+    <action name="saveBuildQueue" class="org.apache.maven.continuum.web.action.admin.BuildQueueAction"
method="save">
+      <result name="input">/WEB-INF/jsp/admin/editParallelBuilds.jsp</result>
+      <result name="error">/WEB-INF/jsp/admin/editParallelBuilds.jsp</result>
+      <result name="success" type="redirect-action">buildQueueList</result>
+    </action> 
+    
+    <action name="deleteBuildQueue" class="org.apache.maven.continuum.web.action.admin.BuildQueueAction"
method="delete">
+      <result name="input">/WEB-INF/jsp/admin/parallelbuilds.jsp</result>
+      <result name="success">/WEB-INF/jsp/admin/parallelbuilds.jsp</result>
+    </action>  
+        
+    <!--
     * Local Repository actions
     -->
     

Modified: continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configuration.jsp
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configuration.jsp?rev=726688&r1=726687&r2=726688&view=diff
==============================================================================
--- continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configuration.jsp
(original)
+++ continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configuration.jsp
Mon Dec 15 04:02:56 2008
@@ -31,7 +31,7 @@
     <h3>
       <s:text name="configuration.section.title"/>
     </h3>
-
+     
     <div class="axial">
       <table border="1" cellspacing="2" cellpadding="3" width="100%">
         <c1:data label="%{getText('configuration.workingDirectory.label')}" name="workingDirectory"/>
@@ -40,6 +40,7 @@
         <c1:data label="%{getText('configuration.deploymentRepositoryDirectory.label')}"
                  name="deploymentRepositoryDirectory"/>
         <c1:data label="%{getText('configuration.baseUrl.label')}" name="baseUrl"/>
+        <c1:data label="%{getText('configuration.allowed.build.parallel')}" name="numberOfAllowedBuildsinParallel"/>
       </table>
       <div class="functnbar3">
         <s:form action="configuration!input.action" method="post">

Modified: continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configurationEdit.jsp
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configurationEdit.jsp?rev=726688&r1=726687&r2=726688&view=diff
==============================================================================
--- continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configurationEdit.jsp
(original)
+++ continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configurationEdit.jsp
Mon Dec 15 04:02:56 2008
@@ -82,7 +82,15 @@
                 <s:text name="configuration.baseUrl.message"/>
               </p></s:param>
             </s:textfield>
+            
+            <s:textfield label="%{getText('configuration.allowed.build.parallel')}" name="numberOfAllowedBuildsinParallel"
size="10">
+              <s:param name="desc"><p>
+                <s:text name="configuration.allowed.build.paralle.message"/>
+              </p></s:param>
+            </s:textfield>
 
+            <s:checkbox label="%{getText('configuration.disable.parallel.builds')}" name="requireParallelBuilds"
required="true"/>
+            
             <s:hidden name="requireReleaseOutput"/>
           </tbody>
         </table>

Added: continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editParallelBuilds.jsp
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editParallelBuilds.jsp?rev=726688&view=auto
==============================================================================
--- continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editParallelBuilds.jsp
(added)
+++ continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editParallelBuilds.jsp
Mon Dec 15 04:02:56 2008
@@ -0,0 +1,53 @@
+<%--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you 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.
+  --%>
+
+<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
+<%@ taglib uri="/struts-tags" prefix="s" %>
+<%@ taglib uri="continuum" prefix="c1" %>
+<%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %>
+<%@ taglib uri="http://plexus.codehaus.org/redback/taglib-1.0" prefix="redback" %>
+
+<html>
+  <s:i18n name="localization.Continuum">
+<head>
+<title><s:text name="repository.page.title"/></title>
+</head>
+<body>
+
+<div class="app">
+  <div id="axial" class="h3">
+    <h3><s:text name="parallel.build.queue.section.title"/></h3>
+
+    <s:actionerror />
+    
+    <div class="axial">
+      <s:form action="saveBuildQueue" method="post" validate="true">
+          <table>
+            <s:textfield label="%{getText('parallel.build.queue.name')}" name="name" required="true"
/>
+          </table>
+          <div class="functnbar3">
+            <c1:submitcancel value="%{getText('save')}" cancel="%{getText('cancel')}"/>
+          </div>
+      </s:form>
+    </div>
+  </div>
+</div>
+</body>
+</s:i18n>
+</html>
\ No newline at end of file

Added: continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/parallelbuilds.jsp
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/parallelbuilds.jsp?rev=726688&view=auto
==============================================================================
--- continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/parallelbuilds.jsp
(added)
+++ continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/parallelbuilds.jsp
Mon Dec 15 04:02:56 2008
@@ -0,0 +1,69 @@
+<%--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you 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.
+  --%>
+
+<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
+<%@ taglib uri="/struts-tags" prefix="s" %>
+<%@ taglib uri="continuum" prefix="c1" %>
+<%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %>
+<%@ taglib uri="http://plexus.codehaus.org/redback/taglib-1.0" prefix="redback" %>
+
+<html>
+  <s:i18n name="localization.Continuum">
+  <head>
+    <title><s:text name="parallel.build.queues.page.title"/></title>
+  </head>  
+  <body>
+    <div id="h3">  
+      <h3>
+        <s:text name="parallel.build.queues.section.title"/>
+      </h3>
+      <c:if test="${not empty buildQueueList}">
+      <ec:table items="buildQueueList"
+              var="buildQueue"
+              showExports="false"
+              showPagination="false"
+              showStatusBar="false"
+              sortable="false"
+              filterable="false">
+        <ec:row highlightRow="true">
+        <ec:column property="name" title="Name" style="white-space: nowrap" />
+           
+        <ec:column property="id" title="&nbsp;" width="1%">
+          <c:if test="${buildQueue.id != 1}"> 
+            <a href="deleteBuildQueue!delete.action?buildQueue.id=<c:out value="${buildQueue.id}"/>">
+              <img src="<s:url value='/images/delete.gif' includeParams="none"/>"
alt="<s:text name='delete'/>" title="<s:text name='delete'/>" border="0" />
+            </a>
+          </c:if>
+          <c:if test="${buildQueue.id == 1}">
+              <img src="<s:url value='/images/delete_disabled.gif' includeParams="none"/>"
alt="<s:text name='delete'/>" title="<s:text name='delete'/>" border="0" />
+          </c:if>
+        </ec:column>             
+        </ec:row>
+        </ec:table>
+      </c:if>
+      
+       <div class="functnbar3">
+        <s:form action="addBuildQueue!input.action" method="post">
+          <s:submit value="%{getText('add')}"/>
+        </s:form>
+      </div> 
+    </div>
+  </body>
+  </s:i18n>
+</html>
\ No newline at end of file

Modified: continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/editSchedule.jsp
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/editSchedule.jsp?rev=726688&r1=726687&r2=726688&view=diff
==============================================================================
--- continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/editSchedule.jsp
(original)
+++ continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/editSchedule.jsp
Mon Dec 15 04:02:56 2008
@@ -71,15 +71,21 @@
             <s:textfield label="%{getText('schedule.quietPeriod.label')}" name="delay">
                 <s:param name="desc"><p><s:text name="schedule.quietPeriod.message"/></p></s:param>
             </s:textfield>
+            
+            <s:select label="Build Queues" id="schedulesBuildQueue" name="schedulesBuildQueue"
headerKey="-1" listValue="name" multiple="true" size="4" 
+                      listKey="id" headerValue="--Build Queues--" list="buildQueues" />
+                        
             <s:checkbox label="%{getText('schedule.enabled.label')}" name="active" value="active"
fieldValue="true">
                 <s:param name="desc"><p><s:text name="schedule.enabled.message"/></p></s:param>
             </s:checkbox>
+
           </table>
           <s:hidden name="id"/>
         <div class="functnbar3">
           <c1:submitcancel value="%{getText('save')}" cancel="%{getText('cancel')}"/>
         </div>
       </s:form>
+      
     </div>
   </div>
 </div>

Modified: continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp?rev=726688&r1=726687&r2=726688&view=diff
==============================================================================
--- continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp
(original)
+++ continuum/branches/continuum-parallel-builds/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp
Mon Dec 15 04:02:56 2008
@@ -89,6 +89,14 @@
       </div>
       <div>
         <redback:ifAuthorized permission="continuum-manage-repositories">
+          <s:url id="buildQueueListUrl" action="buildQueueList" namespace="/admin" includeParams="none"/>
+          <div class="body">
+            <s:a href="%{buildQueueListUrl}">
+              <s:text name="menu.administration.build.queue"/>
+            </s:a>
+          </div>
+        </redback:ifAuthorized>
+        <redback:ifAuthorized permission="continuum-manage-repositories">
           <s:url id="repositoryListUrl" action="repositoryList" namespace="/admin" includeParams="none"/>
           <div class="body">
             <s:a href="%{repositoryListUrl}">



Mime
View raw message