You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by oc...@apache.org on 2009/01/13 12:05:10 UTC
svn commit: r734099 [3/3] - in /continuum/trunk: ./
continuum-api/src/main/java/org/apache/continuum/buildmanager/
continuum-api/src/main/java/org/apache/continuum/buildqueue/
continuum-api/src/main/java/org/apache/continuum/configuration/
continuum-ap...
Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java?rev=734099&r1=734098&r2=734099&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java Tue Jan 13 03:00:41 2009
@@ -19,10 +19,14 @@
* under the License.
*/
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
+import java.util.Set;
import org.apache.commons.lang.ArrayUtils;
-import org.apache.continuum.taskqueue.manager.TaskQueueManager;
+import org.apache.continuum.buildmanager.BuildManagerException;
import org.apache.maven.continuum.buildqueue.BuildProjectTask;
import org.apache.maven.continuum.model.project.Project;
import org.apache.maven.continuum.scm.queue.CheckOutTask;
@@ -33,7 +37,6 @@
import org.codehaus.plexus.logging.LogEnabled;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.taskqueue.Task;
-import org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor;
import org.codehaus.redback.integration.interceptor.SecureAction;
import org.codehaus.redback.integration.interceptor.SecureActionBundle;
import org.codehaus.redback.integration.interceptor.SecureActionException;
@@ -45,344 +48,441 @@
* @since 24 sept. 07
*/
public class QueuesAction
- extends ContinuumActionSupport
- implements SecureAction, LogEnabled
-{
-
- /**
- * @plexus.requirement role-hint='build-project'
- */
- private TaskQueueExecutor taskQueueExecutor;
-
- private BuildProjectTask currentBuildProjectTask;
-
- private List<BuildProjectTask> buildProjectTasks;
-
- private List<String> selectedBuildTaskHashCodes;
-
- /**
- * @plexus.requirement role-hint='check-out-project'
- */
- private TaskQueueExecutor checkoutTaskQueueExecutor;
-
- private CheckOutTask currentCheckOutTask;
-
- private List<CheckOutTask> currentCheckOutTasks;
-
- private List<String> selectedCheckOutTaskHashCodes;
-
- private int buildDefinitionId;
-
- private int projectId;
-
- private int trigger;
-
- private String projectName;
-
- /**
- * @plexus.requirement
- */
- private TaskQueueManager taskQueueManager;
-
- // -----------------------------------------------------
- // webwork
- // -----------------------------------------------------
-
- public String cancelCurrent()
- throws Exception
- {
- try
- {
- checkManageQueuesAuthorization();
- }
- catch( AuthorizationRequiredException authzE )
- {
- addActionError( authzE.getMessage() );
- return REQUIRES_AUTHORIZATION;
- }
- catch ( AuthenticationRequiredException e )
- {
- addActionError( e.getMessage() );
- return REQUIRES_AUTHENTICATION;
- }
-
- taskQueueManager.cancelBuildTask( projectId );
-
- return SUCCESS;
- }
-
- public String removeCheckout()
- throws Exception
- {
- try
- {
- checkManageQueuesAuthorization();
- }
- catch( AuthorizationRequiredException authzE )
- {
- addActionError( authzE.getMessage() );
- return REQUIRES_AUTHORIZATION;
- }
- catch ( AuthenticationRequiredException e )
- {
- addActionError( e.getMessage() );
- return REQUIRES_AUTHENTICATION;
- }
-
- taskQueueManager.removeProjectFromCheckoutQueue( projectId );
- return SUCCESS;
- }
-
- public String cancelCurrentCheckout()
- throws Exception
- {
- try
- {
- checkManageQueuesAuthorization();
- }
- catch( AuthorizationRequiredException authzE )
- {
- addActionError( authzE.getMessage() );
- return REQUIRES_AUTHORIZATION;
- }
- catch ( AuthenticationRequiredException e )
- {
- addActionError( e.getMessage() );
- return REQUIRES_AUTHENTICATION;
- }
-
- taskQueueManager.cancelCheckout( projectId );
- return SUCCESS;
- }
-
- public String display()
- throws Exception
- {
- this.setCurrentBuildProjectTask( (BuildProjectTask) taskQueueExecutor.getCurrentTask() );
- this.setBuildProjectTasks( taskQueueManager.getProjectsInBuildQueue() );
- this.setCurrentCheckOutTask( (CheckOutTask) checkoutTaskQueueExecutor.getCurrentTask() );
- this.setCurrentCheckOutTasks( taskQueueManager.getCheckOutTasksInQueue() );
- return SUCCESS;
- }
-
- public String remove()
- throws Exception
- {
- try
- {
- checkManageQueuesAuthorization();
- }
- catch( AuthorizationRequiredException authzE )
- {
- addActionError( authzE.getMessage() );
- return REQUIRES_AUTHORIZATION;
- }
- catch ( AuthenticationRequiredException e )
- {
- addActionError( e.getMessage() );
- return REQUIRES_AUTHENTICATION;
- }
-
- taskQueueManager.removeFromBuildingQueue( projectId, buildDefinitionId, trigger, projectName );
- Project project = getContinuum().getProject( projectId );
- project.setState( project.getOldState() );
- getContinuum().updateProject( project );
-
- return SUCCESS;
- }
-
- public String removeBuildEntries()
- throws Exception
- {
- try
- {
- checkManageQueuesAuthorization();
- }
- catch( AuthorizationRequiredException authzE )
- {
- addActionError( authzE.getMessage() );
- return REQUIRES_AUTHORIZATION;
- }
- catch ( AuthenticationRequiredException e )
- {
- addActionError( e.getMessage() );
- return REQUIRES_AUTHENTICATION;
- }
-
- taskQueueManager.removeProjectsFromBuildingQueueWithHashCodes( listToIntArray(this.getSelectedBuildTaskHashCodes()) );
- return SUCCESS;
- }
-
- public String removeCheckoutEntries()
- throws Exception
- {
- try
- {
- checkManageQueuesAuthorization();
- }
- catch( AuthorizationRequiredException authzE )
- {
- addActionError( authzE.getMessage() );
- return REQUIRES_AUTHORIZATION;
- }
- catch ( AuthenticationRequiredException e )
- {
- addActionError( e.getMessage() );
- return REQUIRES_AUTHENTICATION;
- }
-
- taskQueueManager
- .removeTasksFromCheckoutQueueWithHashCodes( listToIntArray( this.getSelectedCheckOutTaskHashCodes() ) );
- return SUCCESS;
- }
-
- private int[] listToIntArray( List<String> strings )
- {
- if ( strings == null || strings.isEmpty() )
- {
- return new int[0];
- }
- int[] array = new int[0];
- for ( String intString : strings )
- {
- array = ArrayUtils.add( array, Integer.parseInt( intString ) );
- }
- return array;
- }
-
-
- // -----------------------------------------------------
- // security
- // -----------------------------------------------------
-
- public SecureActionBundle getSecureActionBundle()
- throws SecureActionException
- {
- SecureActionBundle bundle = new SecureActionBundle();
- bundle.setRequiresAuthentication( true );
- bundle.addRequiredAuthorization( ContinuumRoleConstants.CONTINUUM_VIEW_QUEUES, Resource.GLOBAL );
-
- return bundle;
- }
-
- public List<BuildProjectTask> getBuildProjectTasks()
- {
- return buildProjectTasks;
- }
-
- public void setBuildProjectTasks( List<BuildProjectTask> buildProjectTasks )
- {
- this.buildProjectTasks = buildProjectTasks;
- }
-
- public int getBuildDefinitionId()
- {
- return buildDefinitionId;
- }
-
- public void setBuildDefinitionId( int buildDefinitionId )
- {
- this.buildDefinitionId = buildDefinitionId;
- }
-
- public int getProjectId()
- {
- return projectId;
- }
-
- public void setProjectId( int projectId )
- {
- this.projectId = projectId;
- }
-
- public int getTrigger()
- {
- return trigger;
- }
-
- public void setTrigger( int trigger )
- {
- this.trigger = trigger;
- }
-
- public String getProjectName()
- {
- return projectName;
- }
-
- public void setProjectName( String projectName )
- {
- this.projectName = projectName;
- }
-
- public BuildProjectTask getCurrentBuildProjectTask()
- {
- return currentBuildProjectTask;
- }
-
- public void setCurrentBuildProjectTask( BuildProjectTask currentBuildProjectTask )
- {
- this.currentBuildProjectTask = currentBuildProjectTask;
- }
-
- public TaskQueueExecutor getTaskQueueExecutor()
- {
- return taskQueueExecutor;
- }
-
-
- public TaskQueueExecutor getCheckoutTaskQueueExecutor()
- {
- return checkoutTaskQueueExecutor;
- }
-
-
- public void setCheckoutTaskQueueExecutor( TaskQueueExecutor checkoutTaskQueueExecutor )
- {
- this.checkoutTaskQueueExecutor = checkoutTaskQueueExecutor;
- }
-
-
- public CheckOutTask getCurrentCheckOutTask()
- {
- return currentCheckOutTask;
- }
-
-
- public void setCurrentCheckOutTask( CheckOutTask currentCheckOutTask )
- {
- this.currentCheckOutTask = currentCheckOutTask;
- }
-
-
- public List<CheckOutTask> getCurrentCheckOutTasks()
- {
- return currentCheckOutTasks;
- }
-
-
- public void setCurrentCheckOutTasks( List<CheckOutTask> currentCheckOutTasks )
- {
- this.currentCheckOutTasks = currentCheckOutTasks;
- }
-
- public List<String> getSelectedBuildTaskHashCodes()
- {
- return selectedBuildTaskHashCodes;
- }
-
- public void setSelectedBuildTaskHashCodes( List<String> selectedBuildTaskHashCodes )
- {
- this.selectedBuildTaskHashCodes = selectedBuildTaskHashCodes;
- }
-
- public List<String> getSelectedCheckOutTaskHashCodes()
- {
- return selectedCheckOutTaskHashCodes;
- }
-
- public void setSelectedCheckOutTaskHashCodes( List<String> selectedCheckOutTaskHashCodes )
- {
- this.selectedCheckOutTaskHashCodes = selectedCheckOutTaskHashCodes;
- }
+ extends ContinuumActionSupport
+ implements SecureAction, LogEnabled
+{
+ private List<String> selectedBuildTaskHashCodes;
+
+ private List<String> selectedCheckOutTaskHashCodes;
+
+ private int buildDefinitionId;
+
+ private int projectId;
+
+ private int trigger;
+
+ private String projectName;
+
+ private Map<String, BuildProjectTask> currentBuildProjectTasks = new HashMap<String, BuildProjectTask>();
+
+ private Map<String, CheckOutTask> currentCheckoutTasks = new HashMap<String, CheckOutTask>();
+
+ private Map<String, List<BuildProjectTask>> buildsInQueue = new HashMap<String, List<BuildProjectTask>>();
+
+ private Map<String, List<CheckOutTask>> checkoutsInQueue = new HashMap<String, List<CheckOutTask>>();
+
+ // -----------------------------------------------------
+ // webwork
+ // -----------------------------------------------------
+
+ public String cancelCurrent()
+ throws Exception
+ {
+ try
+ {
+ checkManageQueuesAuthorization();
+ }
+ catch( AuthorizationRequiredException authzE )
+ {
+ addActionError( authzE.getMessage() );
+ return REQUIRES_AUTHORIZATION;
+ }
+ catch ( AuthenticationRequiredException e )
+ {
+ addActionError( e.getMessage() );
+ return REQUIRES_AUTHENTICATION;
+ }
+
+ try
+ {
+ getContinuum().getBuildsManager().cancelBuild( projectId );
+ }
+ catch ( BuildManagerException e )
+ {
+ addActionError( e.getMessage() );
+ return ERROR;
+ }
+
+ return SUCCESS;
+ }
+
+ public String removeCheckout()
+ throws Exception
+ {
+ try
+ {
+ checkManageQueuesAuthorization();
+ }
+ catch( AuthorizationRequiredException authzE )
+ {
+ addActionError( authzE.getMessage() );
+ return REQUIRES_AUTHORIZATION;
+ }
+ catch ( AuthenticationRequiredException e )
+ {
+ addActionError( e.getMessage() );
+ return REQUIRES_AUTHENTICATION;
+ }
+
+ try
+ {
+ getContinuum().getBuildsManager().removeProjectFromCheckoutQueue( projectId );
+ }
+ catch ( BuildManagerException e )
+ {
+ addActionError( e.getMessage() );
+ return ERROR;
+ }
+
+ return SUCCESS;
+ }
+
+ public String cancelCurrentCheckout()
+ throws Exception
+ {
+ try
+ {
+ checkManageQueuesAuthorization();
+ }
+ catch( AuthorizationRequiredException authzE )
+ {
+ addActionError( authzE.getMessage() );
+ return REQUIRES_AUTHORIZATION;
+ }
+ catch ( AuthenticationRequiredException e )
+ {
+ addActionError( e.getMessage() );
+ return REQUIRES_AUTHENTICATION;
+ }
+ try
+ {
+ cancelCheckout( projectId );
+ }
+ catch ( BuildManagerException e )
+ {
+ addActionError( e.getMessage() );
+ return ERROR;
+ }
+
+ return SUCCESS;
+ }
+
+ public String display()
+ throws Exception
+ {
+ try
+ {
+ // current builds
+ Map<String, Task> currentBuilds = getContinuum().getBuildsManager().getCurrentBuilds();
+ Set<String> keySet = currentBuilds.keySet();
+ for( String key : keySet )
+ {
+ BuildProjectTask buildTask = (BuildProjectTask) currentBuilds.get( key );
+ currentBuildProjectTasks.put( key, buildTask );
+ }
+ }
+ catch ( BuildManagerException e )
+ {
+ addActionError( e.getMessage() );
+ return ERROR;
+ }
+
+ try
+ {
+ // queued builds
+ Map<String, List<Task>> builds = getContinuum().getBuildsManager().getProjectsInBuildQueues();
+ Set<String> keySet = builds.keySet();
+ for( String key : keySet )
+ {
+ List<BuildProjectTask> buildTasks = new ArrayList<BuildProjectTask>();
+ for( Task task : builds.get( key ) )
+ {
+ BuildProjectTask buildTask = (BuildProjectTask) task;
+ buildTasks.add( buildTask );
+ }
+ buildsInQueue.put( key, buildTasks );
+ }
+ }
+ catch ( BuildManagerException e )
+ {
+ addActionError( e.getMessage() );
+ return ERROR;
+ }
+
+ try
+ {
+ // current checkouts
+ Map<String, Task> currentCheckouts = getContinuum().getBuildsManager().getCurrentCheckouts();
+ Set<String> keySet = currentCheckouts.keySet();
+ for( String key : keySet )
+ {
+ CheckOutTask checkoutTask = (CheckOutTask) currentCheckouts.get( key );
+ currentCheckoutTasks.put( key, checkoutTask );
+ }
+ }
+ catch ( BuildManagerException e )
+ {
+ addActionError( e.getMessage() );
+ return ERROR;
+ }
+
+ try
+ {
+ // queued checkouts
+ Map<String, List<Task>> checkouts = getContinuum().getBuildsManager().getProjectsInCheckoutQueues();
+ Set<String> keySet = checkouts.keySet();
+ for( String key : keySet )
+ {
+ List<CheckOutTask> checkoutTasks = new ArrayList<CheckOutTask>();
+ for( Task task : checkouts.get( key ) )
+ {
+ CheckOutTask checkoutTask = (CheckOutTask) task;
+ checkoutTasks.add( checkoutTask );
+ }
+ checkoutsInQueue.put( key, checkoutTasks );
+ }
+ }
+ catch ( BuildManagerException e )
+ {
+ addActionError( e.getMessage() );
+ return ERROR;
+ }
+
+ return SUCCESS;
+ }
+
+ public String remove()
+ throws Exception
+ {
+ try
+ {
+ checkManageQueuesAuthorization();
+ }
+ catch( AuthorizationRequiredException authzE )
+ {
+ addActionError( authzE.getMessage() );
+ return REQUIRES_AUTHORIZATION;
+ }
+ catch ( AuthenticationRequiredException e )
+ {
+ addActionError( e.getMessage() );
+ return REQUIRES_AUTHENTICATION;
+ }
+
+ getContinuum().getBuildsManager().removeProjectFromBuildQueue( projectId, buildDefinitionId, trigger, projectName );
+ Project project = getContinuum().getProject( projectId );
+ project.setState( project.getOldState() );
+ getContinuum().updateProject( project );
+
+ return SUCCESS;
+ }
+
+ public String removeBuildEntries()
+ throws Exception
+ {
+ try
+ {
+ checkManageQueuesAuthorization();
+ }
+ catch( AuthorizationRequiredException authzE )
+ {
+ addActionError( authzE.getMessage() );
+ return REQUIRES_AUTHORIZATION;
+ }
+ catch ( AuthenticationRequiredException e )
+ {
+ addActionError( e.getMessage() );
+ return REQUIRES_AUTHENTICATION;
+ }
+
+ getContinuum().getBuildsManager().removeProjectsFromBuildQueueWithHashcodes(
+ listToIntArray( this.getSelectedBuildTaskHashCodes() ) );
+ return SUCCESS;
+ }
+
+ public String removeCheckoutEntries()
+ throws Exception
+ {
+ try
+ {
+ checkManageQueuesAuthorization();
+ }
+ catch( AuthorizationRequiredException authzE )
+ {
+ addActionError( authzE.getMessage() );
+ return REQUIRES_AUTHORIZATION;
+ }
+ catch ( AuthenticationRequiredException e )
+ {
+ addActionError( e.getMessage() );
+ return REQUIRES_AUTHENTICATION;
+ }
+
+ getContinuum().getBuildsManager().removeProjectsFromCheckoutQueueWithHashcodes(
+ listToIntArray( this.getSelectedCheckOutTaskHashCodes() ) );
+ return SUCCESS;
+ }
+
+ private int[] listToIntArray( List<String> strings )
+ {
+ if ( strings == null || strings.isEmpty() )
+ {
+ return new int[0];
+ }
+ int[] array = new int[0];
+ for ( String intString : strings )
+ {
+ array = ArrayUtils.add( array, Integer.parseInt( intString ) );
+ }
+ return array;
+ }
+
+
+ // -----------------------------------------------------
+ // security
+ // -----------------------------------------------------
+
+ public SecureActionBundle getSecureActionBundle()
+ throws SecureActionException
+ {
+ SecureActionBundle bundle = new SecureActionBundle();
+ bundle.setRequiresAuthentication( true );
+ bundle.addRequiredAuthorization( ContinuumRoleConstants.CONTINUUM_VIEW_QUEUES, Resource.GLOBAL );
+
+ return bundle;
+ }
+
+ private boolean cancelCheckout(int projectId)
+ throws BuildManagerException
+ {
+ Map<String, Task> tasks = getContinuum().getBuildsManager().getCurrentCheckouts();
+ if( tasks != null )
+ {
+ Set<String> keySet = tasks.keySet();
+ for( String key : keySet )
+ {
+ Task task = tasks.get( key );
+ if( task != null && task instanceof CheckOutTask )
+ {
+ if ( ( (CheckOutTask) task ).getProjectId() == projectId )
+ {
+ getLogger().info( "Cancelling checkout for project " + projectId );
+ return getContinuum().getBuildsManager().cancelCheckout( projectId );
+ }
+ else
+ {
+ getLogger().warn(
+ "Current task is not for the given projectId (" + projectId + "): "
+ + ( (CheckOutTask) task ).getProjectId() + "; not cancelling checkout" );
+ }
+ }
+ }
+ }
+ else
+ {
+ getLogger().warn( "No task running - not cancelling checkout" );
+ }
+
+ return false;
+ }
+
+ public int getBuildDefinitionId()
+ {
+ return buildDefinitionId;
+ }
+
+ public void setBuildDefinitionId( int buildDefinitionId )
+ {
+ this.buildDefinitionId = buildDefinitionId;
+ }
+
+ public int getProjectId()
+ {
+ return projectId;
+ }
+
+ public void setProjectId( int projectId )
+ {
+ this.projectId = projectId;
+ }
+
+ public int getTrigger()
+ {
+ return trigger;
+ }
+
+ public void setTrigger( int trigger )
+ {
+ this.trigger = trigger;
+ }
+
+ public String getProjectName()
+ {
+ return projectName;
+ }
+
+ public void setProjectName( String projectName )
+ {
+ this.projectName = projectName;
+ }
+
+ public List<String> getSelectedBuildTaskHashCodes()
+ {
+ return selectedBuildTaskHashCodes;
+ }
+
+ public void setSelectedBuildTaskHashCodes( List<String> selectedBuildTaskHashCodes )
+ {
+ this.selectedBuildTaskHashCodes = selectedBuildTaskHashCodes;
+ }
+
+ public List<String> getSelectedCheckOutTaskHashCodes()
+ {
+ return selectedCheckOutTaskHashCodes;
+ }
+
+ public void setSelectedCheckOutTaskHashCodes( List<String> selectedCheckOutTaskHashCodes )
+ {
+ this.selectedCheckOutTaskHashCodes = selectedCheckOutTaskHashCodes;
+ }
+
+ public Map<String, BuildProjectTask> getCurrentBuildProjectTasks()
+ {
+ return currentBuildProjectTasks;
+ }
+
+ public void setCurrentBuildProjectTasks( Map<String, BuildProjectTask> currentBuildProjectTasks )
+ {
+ this.currentBuildProjectTasks = currentBuildProjectTasks;
+ }
+
+ public Map<String, CheckOutTask> getCurrentCheckoutTasks()
+ {
+ return currentCheckoutTasks;
+ }
+
+ public void setCurrentCheckoutTasks( Map<String, CheckOutTask> currentCheckoutTasks )
+ {
+ this.currentCheckoutTasks = currentCheckoutTasks;
+ }
+
+ public Map<String, List<BuildProjectTask>> getBuildsInQueue()
+ {
+ return buildsInQueue;
+ }
+
+ public void setBuildsInQueue( Map<String, List<BuildProjectTask>> buildsInQueue )
+ {
+ this.buildsInQueue = buildsInQueue;
+ }
+
+ public Map<String, List<CheckOutTask>> getCheckoutsInQueue()
+ {
+ return checkoutsInQueue;
+ }
+
+ public void setCheckoutsInQueue( Map<String, List<CheckOutTask>> checkoutsInQueue )
+ {
+ this.checkoutsInQueue = checkoutsInQueue;
+ }
}
Modified: continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=734099&r1=734098&r2=734099&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties (original)
+++ continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties Tue Jan 13 03:00:41 2009
@@ -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
@@ -231,6 +232,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
@@ -240,9 +243,11 @@
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
+configuration.numberOfBuildsInParallel.invalid = Number of Allowed Builds in Parallel must be greater than zero
# ----------------------------------------------------------------------
# Page: Add Project
@@ -613,6 +618,11 @@
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.label = Add Build Queue
+schedule.buildqueues.define = Configure the used build queues
+schedule.available.buildqueues = --- Available Build Queues ---
+schedule.available.buildqueues.used = --- Used Build Queues ---
+schedule.buildqueues.add.error = Error attaching the build queue(s) to schedule.
# ----------------------------------------------------------------------
# Page: SurefireReport
@@ -794,17 +804,19 @@
buildDefinitionTemplate.builddefinitions.define = Configure the used Build Definitions
# ----------------------------------------------------------------------
-# Page: Build Queue
+# Page: Queues
# ----------------------------------------------------------------------
buildQueue.page.title = Continuum - Build Queue
buildQueue.section.title = Continuum - Build Queue
buildQueue.empty = Build Queue is empty
buildQueue.currentTask.section.title = Current Build
+buildQueue.currentTask.buildQueue = Build Queue
buildQueue.currentTask.projectName = Project Name
buildQueue.currentTask.buildDefinition = Build Definition
buildQueue.no.currentTaks = Nothing is building
buildQueue.removeEntries = Cancel Entries
checkoutQueue.currentTask.section.title = Current Checkout
+checkoutQueue.currentTask.buildQueue = Build Queue
checkoutQueue.currentTask.projectName = Project Name
checkoutQueue.no.currentTaks = No current checkout
checkoutQueue.section.title = Checkout Queue
@@ -812,6 +824,12 @@
checkoutQueue.removeEntries = Cancel Entries
# ----------------------------------------------------------------------
+# Page: Build Queue
+# ----------------------------------------------------------------------
+buildQueue.cannot.delete = Cannot delete build queue, task is currently executing.
+buildQueue.delete.error = Unable to delete build queue from the database.
+
+# ----------------------------------------------------------------------
# Page: Confirm Delete BuildResult(s)
# ----------------------------------------------------------------------
buildResult.delete.confirmation.page.title = Continuum - Delete Build Results
@@ -997,4 +1015,17 @@
companyPom.page.title = Edit Company POM
companyPom.section.title = Company POM
companyPom.autoIncrementVersion = The version will automatically be incremented when you save this form.
-companyPom.organization = Organization
\ No newline at end of file
+companyPom.organization = Organization
+
+# ----------------------------------------------------------------------
+# 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
Modified: continuum/trunk/continuum-webapp/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/struts.xml?rev=734099&r1=734098&r2=734099&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/struts.xml (original)
+++ continuum/trunk/continuum-webapp/src/main/resources/struts.xml Tue Jan 13 03:00:41 2009
@@ -697,7 +697,7 @@
<result name="success">/WEB-INF/jsp/admin/installationsList.jsp</result>
</action>
- <!--
+ <!--addBuildEnv
Build Definitions Templates actions
-->
<action name="buildDefinitionTemplates" class="buildDefinitionTemplates" method="summary">
@@ -793,6 +793,29 @@
</action>
<!--
+ * Build Queue (Parallel Builds)
+ -->
+
+ <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/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp?rev=734099&r1=734098&r2=734099&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp Tue Jan 13 03:00:41 2009
@@ -36,41 +36,113 @@
<s:text name="buildQueue.currentTask.section.title"/>
</h3>
<table width="100%">
- <s:if test="%{currentBuildProjectTask != null}">
+ <s:if test="%{currentBuildProjectTasks != null}">
<tbody>
<tr>
+ <th><s:text name="buildQueue.currentTask.buildQueue"/></th>
<th><s:text name="buildQueue.currentTask.projectName"/></th>
<th><s:text name="buildQueue.currentTask.buildDefinition"/></th>
<th> </th>
</tr>
+ <c:forEach var="element" items="${currentBuildProjectTasks}">
+ <tr>
+ <td width="20%">${element.key}</td>
+ <td width="50%">${element.value.projectName}</td>
+ <td width="29%">${element.value.buildDefinitionLabel}</td>
+ <td width="1%">
+ <redback:ifAuthorized permission="continuum-manage-queues">
+ <s:url id="cancelUrl" action="cancelCurrentBuildTask" method="cancelCurrent" namespace="/">
+ <s:param name="projectId">${element.value.projectId}</s:param>
+ </s:url>
+ <s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0"></s:a>
+ </redback:ifAuthorized>
+ <redback:elseAuthorized>
+ <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
+ </redback:elseAuthorized>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
+ </s:if>
+ <s:else>
+ <s:text name="buildQueue.no.currentTaks" />
+ </s:else>
+ </table>
+ </div>
+
+ <div id="h3">
+ <h3>
+ <s:text name="buildQueue.section.title"/>
+ </h3>
+ <table width="100%">
+ <s:if test="%{buildsInQueue != null}">
+ <tbody>
<tr>
- <td width="50%"><s:property value="currentBuildProjectTask.projectName"/></td>
- <td width="49%"><s:property value="currentBuildProjectTask.buildDefinitionLabel"/></td>
- <td width="1%">
<redback:ifAuthorized permission="continuum-manage-queues">
- <s:url id="cancelUrl" action="cancelCurrentBuildTask" method="cancelCurrent" namespace="/">
- <s:param name="projectId"><s:property value="currentBuildProjectTask.projectId"/></s:param>
- </s:url>
- <s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0"></s:a>
+ <th> </th>
</redback:ifAuthorized>
- <redback:elseAuthorized>
- <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
- </redback:elseAuthorized>
- </td>
+ <th><s:text name="buildQueue.currentTask.buildQueue"/></th>
+ <th><s:text name="buildQueue.currentTask.projectName"/></th>
+ <th><s:text name="buildQueue.currentTask.buildDefinition"/></th>
+ <th> </th>
</tr>
+ <c:forEach var="element" items="${buildsInQueue}">
+ <c:forEach var="buildTask" items="${element.value}">
+ <tr>
+ <td width="1%">
+ <redback:ifAuthorized permission="continuum-manage-queues">
+ <input type="checkbox" name="selectedBuildTaskHashCodes" value="${buildTask.hashCode}" />
+ </redback:ifAuthorized>
+ </td>
+ <td width="29%">${element.key}</td>
+ <td width="50%">${buildTask.projectName}</td>
+ <td width="19%">${buildTask.buildDefinitionLabel}</td>
+ <td width="1%">
+ <redback:ifAuthorized permission="continuum-manage-queues">
+ <s:url id="cancelUrl" action="removeBuildQueueEntry" method="remove" namespace="/">
+ <s:param name="projectId">${pageScope.buildTask.projectId}</s:param>
+ <s:param name="buildDefinitionId">${pageScope.buildTask.buildDefinitionId}</s:param>
+ <s:param name="trigger">${pageScope.buildTask.trigger}</s:param>
+ <s:param name="projectName">${pageScope.buildTask.projectName}</s:param>
+ </s:url>
+ <s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0"></s:a>
+ </redback:ifAuthorized>
+ <redback:elseAuthorized>
+ <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
+ </redback:elseAuthorized>
+ </td>
+ </tr>
+ </c:forEach>
+ </c:forEach>
</tbody>
</s:if>
<s:else>
- <s:text name="buildQueue.no.currentTaks" />
+ <s:text name="buildQueue.empty"/>
</s:else>
</table>
- </div>
+ </div>
+ <c:if test="${not empty buildsInQueue}">
+ <div class="functnbar3">
+ <table>
+ <tbody>
+ <tr>
+ <td>
+ <input type="submit" value="<s:text name="buildQueue.removeEntries"/>"
+ onclick="$('removeForm').action='removeBuildQueueEntries!removeBuildEntries.action';$('removeForm').submit();" />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </c:if>
+
+ <%--
<div id="h3">
<h3>
<s:text name="buildQueue.section.title"/>
</h3>
- <c:if test="${not empty buildProjectTasks}">
- <ec:table items="buildProjectTasks"
+ <c:if test="${not empty buildsInQueue}">
+ <ec:table items="buildsInQueue.values"
var="buildProjectTask"
showExports="false"
showPagination="false"
@@ -102,11 +174,11 @@
</ec:row>
</ec:table>
</c:if>
- <c:if test="${empty buildProjectTasks}">
+ <c:if test="${empty buildsInQueue}">
<s:text name="buildQueue.empty"/>
</c:if>
</div>
- <c:if test="${not empty buildProjectTasks}">
+ <c:if test="${not empty buildsInQueue}">
<div class="functnbar3">
<table>
<tbody>
@@ -119,7 +191,9 @@
</tbody>
</table>
</div>
- </c:if>
+ </c:if>
+
+ --%>
<!-- checkout queue -->
@@ -128,26 +202,77 @@
<s:text name="checkoutQueue.currentTask.section.title"/>
</h3>
<table width="100%">
- <s:if test="%{currentCheckOutTask != null}">
+ <s:if test="%{currentCheckoutTasks != null}">
<tbody>
<tr>
+ <th><s:text name="checkoutQueue.currentTask.buildQueue"/></th>
<th><s:text name="checkoutQueue.currentTask.projectName"/></th>
<th> </th>
</tr>
+ <c:forEach var="element" items="${currentCheckoutTasks}">
+ <tr>
+ <td width="30%">${element.key}</td>
+ <td width="69%">${element.value.projectName}</td>
+ <td width="1%">
+ <redback:ifAuthorized permission="continuum-manage-queues">
+ <s:url id="cancelUrl" action="cancelCurrentQueueTask" method="cancelCurrentCheckout" namespace="/">
+ <s:param name="projectId">${element.value.projectId}</s:param>
+ </s:url>
+ <s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0"></s:a>
+ </redback:ifAuthorized>
+ <redback:elseAuthorized>
+ <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
+ </redback:elseAuthorized>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
+ </s:if>
+ <s:else>
+ <s:text name="checkoutQueue.no.currentTaks" />
+ </s:else>
+ </table>
+ </div>
+
+ <div id="h3">
+ <h3>
+ <s:text name="checkoutQueue.section.title"/>
+ </h3>
+ <table width="100%">
+ <s:if test="%{checkoutsInQueue != null}">
+ <tbody>
<tr>
- <td width="99%"><s:property value="currentCheckOutTask.projectName"/></td>
- <td width="1%">
<redback:ifAuthorized permission="continuum-manage-queues">
- <s:url id="cancelUrl" action="cancelCurrentQueueTask" method="cancelCurrentCheckout" namespace="/">
- <s:param name="projectId"><s:property value="currentCheckOutTask.projectId"/></s:param>
- </s:url>
- <s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0"></s:a>
+ <th> </th>
</redback:ifAuthorized>
- <redback:elseAuthorized>
- <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
- </redback:elseAuthorized>
- </td>
+ <th><s:text name="checkoutQueue.currentTask.buildQueue"/></th>
+ <th><s:text name="checkoutQueue.currentTask.projectName"/></th>
+ <th> </th>
</tr>
+ <c:forEach var="element" items="${checkoutsInQueue}">
+ <c:forEach var="checkoutTask" items="${element.value}">
+ <tr>
+ <td width="1%">
+ <redback:ifAuthorized permission="continuum-manage-queues">
+ <input type="checkbox" name="selectedCheckOutTaskHashCodes" value="${checkoutTask.hashCode}" />
+ </redback:ifAuthorized>
+ </td>
+ <td width="29%">${element.key}</td>
+ <td width="69%">${checkoutTask.projectName}</td>
+ <td width="1%">
+ <redback:ifAuthorized permission="continuum-manage-queues">
+ <s:url id="cancelUrl" action="removeCheckoutQueueEntry" method="removeCheckout">
+ <s:param name="projectId">${checkoutTask.projectId}</s:param>
+ </s:url>
+ <s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0"></s:a>
+ </redback:ifAuthorized>
+ <redback:elseAuthorized>
+ <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
+ </redback:elseAuthorized>
+ </td>
+ </tr>
+ </c:forEach>
+ </c:forEach>
</tbody>
</s:if>
<s:else>
@@ -155,12 +280,36 @@
</s:else>
</table>
</div>
+ <c:if test="${not empty checkoutsInQueue}">
+ <div class="functnbar3">
+ <table>
+ <tbody>
+ <tr>
+ <td>
+ <redback:ifAuthorized permission="continuum-manage-queues">
+ <input type="submit" value="<s:text name="checkoutQueue.removeEntries"/>"
+ onclick="$('removeForm').action='removeCheckoutQueueEntries!removeCheckoutEntries.action';$('removeForm').submit();" />
+ </redback:ifAuthorized>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </c:if>
+
+ <%--
<div id="h3">
<h3>
<s:text name="checkoutQueue.section.title"/>
</h3>
- <c:if test="${!empty currentCheckOutTasks}">
- <ec:table items="currentCheckOutTasks"
+
+
+ <c:forEach var="element" items="${checkoutsInQueue}">
+ <h4>
+ Build Queue: ${element.key}
+ </h4>
+ <c:if test="${!empty checkoutsInQueue}">
+ <ec:table items="checkoutsInQueue.values.value"
var="currentCheckOutTask"
showExports="false"
showPagination="false"
@@ -188,11 +337,12 @@
</ec:row>
</ec:table>
</c:if>
- <c:if test="${empty currentCheckOutTasks}">
+ <c:if test="${empty checkoutsInQueue}">
<s:text name="checkoutQueue.empty"/>
</c:if>
+ </c:forEach>
</div>
- <c:if test="${not empty currentCheckOutTasks}">
+ <c:if test="${not empty checkoutsInQueue}">
<div class="functnbar3">
<table>
<tbody>
@@ -208,6 +358,8 @@
</table>
</div>
</c:if>
+ --%>
+
</s:form>
</body>
</s:i18n>
Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configuration.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configuration.jsp?rev=734099&r1=734098&r2=734099&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configuration.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configuration.jsp Tue Jan 13 03:00:41 2009
@@ -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/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configurationEdit.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configurationEdit.jsp?rev=734099&r1=734098&r2=734099&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configurationEdit.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configurationEdit.jsp Tue Jan 13 03:00:41 2009
@@ -82,7 +82,17 @@
<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>
Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/editSchedule.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/editSchedule.jsp?rev=734099&r1=734098&r2=734099&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/editSchedule.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/editSchedule.jsp Tue Jan 13 03:00:41 2009
@@ -20,6 +20,7 @@
<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="continuum" prefix="c1" %>
+
<html>
<s:i18n name="localization.Continuum">
<head>
@@ -71,15 +72,28 @@
<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:optiontransferselect label="%{getText('schedule.buildqueues.label')}" name="availableBuildQueues"
+ list="availableBuildQueues" size="8" multiple="true" emptyOption="false"
+ doubleName="selectedBuildQueues" doubleList="selectedBuildQueues" doubleSize="8"
+ doubleMultiple="true" doubleEmptyOption="false"
+ addAllToRightOnclick="selectAllOptions(document.getElementById('saveSchedule_availableBuildQueues'));selectAllOptions(document.getElementById('saveSchedule_selectedBuildQueues'));"
+ addToRightOnclick="selectAllOptions(document.getElementById('saveSchedule_availableBuildQueues'));selectAllOptions(document.getElementById('saveSchedule_selectedBuildQueues'));"
+ addAllToLeftOnclick="selectAllOptions(document.getElementById('saveSchedule_availableBuildQueues'));selectAllOptions(document.getElementById('saveSchedule_selectedBuildQueues'));"
+ addToLeftOnclick="selectAllOptions(document.getElementById('saveSchedule_availableBuildQueues'));selectAllOptions(document.getElementById('saveSchedule_selectedBuildQueues'));"
+ />
+
<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>
@@ -87,3 +101,4 @@
</body>
</s:i18n>
</html>
+
Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp?rev=734099&r1=734098&r2=734099&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp Tue Jan 13 03:00:41 2009
@@ -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}">
Modified: continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java?rev=734099&r1=734098&r2=734099&view=diff
==============================================================================
--- continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java (original)
+++ continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java Tue Jan 13 03:00:41 2009
@@ -21,12 +21,13 @@
import net.sf.dozer.util.mapping.DozerBeanMapperSingletonWrapper;
import net.sf.dozer.util.mapping.MapperIF;
+
+import org.apache.continuum.buildmanager.BuildManagerException;
+import org.apache.continuum.buildmanager.BuildsManager;
import org.apache.continuum.dao.SystemConfigurationDao;
import org.apache.continuum.purge.ContinuumPurgeManagerException;
import org.apache.continuum.purge.PurgeConfigurationServiceException;
import org.apache.continuum.repository.RepositoryServiceException;
-import org.apache.continuum.taskqueue.manager.TaskQueueManager;
-import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
import org.apache.continuum.xmlrpc.release.ContinuumReleaseResult;
import org.apache.continuum.xmlrpc.repository.DirectoryPurgeConfiguration;
import org.apache.continuum.xmlrpc.repository.LocalRepository;
@@ -58,6 +59,7 @@
import org.codehaus.plexus.redback.authorization.AuthorizationException;
import org.codehaus.plexus.redback.role.RoleManager;
import org.codehaus.plexus.redback.role.RoleManagerException;
+import org.codehaus.plexus.taskqueue.Task;
import org.codehaus.plexus.util.StringUtils;
import java.lang.reflect.Field;
@@ -68,6 +70,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Set;
/**
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
@@ -93,11 +96,11 @@
* @plexus.requirement role-hint="default"
*/
private RoleManager roleManager;
-
+
/**
- * @plexus.requirement
+ * @plexus.requirement role-hint="parallel"
*/
- private TaskQueueManager taskQueueManager;
+ private BuildsManager parallelBuildsManager;
public boolean ping()
throws ContinuumException
@@ -1045,9 +1048,9 @@
{
try
{
- return taskQueueManager.isInBuildingQueue( projectId );
+ return parallelBuildsManager.isInAnyBuildQueue( projectId );
}
- catch ( TaskQueueManagerException e )
+ catch ( BuildManagerException e )
{
throw new ContinuumException( e.getMessage(), e );
}
@@ -1057,10 +1060,24 @@
throws ContinuumException
{
try
- {
- return populateBuildProjectTaskList( taskQueueManager.getProjectsInBuildQueue() );
+ {
+ Map<String, List<Task>> buildTasks = parallelBuildsManager.getProjectsInBuildQueues();
+ Set<String> keys = buildTasks.keySet();
+ List<org.apache.maven.continuum.buildqueue.BuildProjectTask> convertedTasks =
+ new ArrayList<org.apache.maven.continuum.buildqueue.BuildProjectTask>();
+
+ for( String key : keys )
+ {
+ List<Task> tasks = buildTasks.get( key );
+ for( Task task : tasks )
+ {
+ convertedTasks.add( ( org.apache.maven.continuum.buildqueue.BuildProjectTask ) task );
+ }
+ }
+
+ return populateBuildProjectTaskList( convertedTasks );
}
- catch ( TaskQueueManagerException e )
+ catch ( BuildManagerException e )
{
throw new ContinuumException( e.getMessage(), e );
}
@@ -1070,14 +1087,9 @@
throws ContinuumException
{
checkManageQueuesAuthorization();
- try
- {
- taskQueueManager.removeProjectsFromBuildingQueue( projectsId );
- }
- catch ( TaskQueueManagerException e )
- {
- throw new ContinuumException( e.getMessage(), e );
- }
+
+ parallelBuildsManager.removeProjectsFromBuildQueue( projectsId );
+
return 0;
}
@@ -1087,9 +1099,9 @@
checkManageQueuesAuthorization();
try
{
- return taskQueueManager.cancelCurrentBuild();
+ return parallelBuildsManager.cancelAllBuilds();
}
- catch ( TaskQueueManagerException e )
+ catch ( BuildManagerException e )
{
throw new ContinuumException( e.getMessage(), e );
}
Modified: continuum/trunk/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/pom.xml?rev=734099&r1=734098&r2=734099&view=diff
==============================================================================
--- continuum/trunk/pom.xml (original)
+++ continuum/trunk/pom.xml Tue Jan 13 03:00:41 2009
@@ -38,9 +38,9 @@
</prerequisites>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/continuum/trunk/</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/continuum/trunk/</developerConnection>
- <url>http://svn.apache.org/viewcvs.cgi/continuum/trunk/</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/continuum/branches/continuum-parallel-builds</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/continuum/branches/continuum-parallel-builds</developerConnection>
+ <url>http://svn.apache.org/viewcvs.cgi/continuum/branches/continuum-parallel-builds</url>
</scm>
<distributionManagement>
<site>
@@ -286,12 +286,30 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.jmock</groupId>
+ <artifactId>jmock-legacy</artifactId>
+ <version>2.4.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>jmock</groupId>
<artifactId>jmock</artifactId>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib-nodep</artifactId>
+ <version>2.1_3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.objenesis</groupId>
+ <artifactId>objenesis</artifactId>
+ <version>1.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${maven.version}</version>