continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r734912 - in /continuum/trunk: continuum-api/src/main/java/org/apache/continuum/buildmanager/ continuum-api/src/main/java/org/apache/continuum/taskqueue/ continuum-api/src/main/java/org/apache/continuum/taskqueue/manager/ continuum-core/src...
Date Fri, 16 Jan 2009 05:33:55 GMT
Author: oching
Date: Thu Jan 15 21:33:54 2009
New Revision: 734912

URL: http://svn.apache.org/viewvc?rev=734912&view=rev
Log:
[CONTINUUM-2034]
reverted -r734663 

Modified:
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/PrepareBuildProjectsTask.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/manager/TaskQueueManager.java
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/InitPrepareBuildProjectsTaskExecutor.java
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/DefaultTaskQueueManager.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
    continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java?rev=734912&r1=734911&r2=734912&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java
(original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java
Thu Jan 15 21:33:54 2009
@@ -71,17 +71,8 @@
      * @param scmRootAddress TODO
      * @throws BuildManagerException
      */
-    /*void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap,
int trigger, int projectGroupId, 
+    void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, int
trigger, int projectGroupId, 
                                String projectGroupName, String scmRootAddress, int scmRootId
)
-        throws BuildManagerException;*/
-    
-    /**
-     * Adds the task in the prepare-build-queue
-     * 
-     * @param prepareBuildTask
-     * @throws BuildManagerException
-     */
-    void prepareBuildProjects( Task prepareBuildTask )
         throws BuildManagerException;
 
     /**
@@ -336,15 +327,6 @@
         throws BuildManagerException;
 
     /**
-     * Returns all the tasks in prepare-build-queue
-     * 
-     * @return
-     * @throws BuildManagerException
-     */
-    List<Task> getTasksInPrepareBuildQueue()
-        throws BuildManagerException;
-    
-    /**
      * Checks whether a build is in progress.
      * 
      * @return

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/PrepareBuildProjectsTask.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/PrepareBuildProjectsTask.java?rev=734912&r1=734911&r2=734912&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/PrepareBuildProjectsTask.java
(original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/PrepareBuildProjectsTask.java
Thu Jan 15 21:33:54 2009
@@ -96,14 +96,4 @@
     {
         return this.projectGroupId + this.projectScmRootId + this.trigger;
     }
-
-    public int getProjectScmRootId()
-    {
-        return projectScmRootId;
-    }
-
-    public void setProjectScmRootId( int projectScmRootId )
-    {
-        this.projectScmRootId = projectScmRootId;
-    }
 }

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/manager/TaskQueueManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/manager/TaskQueueManager.java?rev=734912&r1=734911&r2=734912&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/manager/TaskQueueManager.java
(original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/manager/TaskQueueManager.java
Thu Jan 15 21:33:54 2009
@@ -36,35 +36,6 @@
     List<PrepareBuildProjectsTask> getDistributedBuildProjectsInQueue()
         throws TaskQueueManagerException;
 
-    /**
-     * Returns the init-prepare-build-queue where projects are initially queued
-     * when triggered to be built.
-     * 
-     * @return
-     */
-    TaskQueue getInitPrepareBuildQueue();
-    
-    /**
-     * Returns the list of tasks in init-prepare-build-project queue.
-     * 
-     * @return
-     * @throws TaskQueueManagerException
-     */
-    List<PrepareBuildProjectsTask> getTasksInInitPrepareBuildQueue()
-        throws TaskQueueManagerException;
-    
-    /**
-     * Check whether the specified project group with the given scm root address is in
-     * init-prepare-build-project queue.
-     * 
-     * @param projectGroupId
-     * @param scmRootAddress
-     * @return
-     * @throws TaskQueueManagerException
-     */
-    boolean isInInitPrepareBuildQueue( int projectGroupId, String scmRootAddress )
-        throws TaskQueueManagerException;
-    
     TaskQueue getPurgeQueue();
 
     boolean isInDistributedBuildQueue( int projectGroupId, String scmRootAddress )

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java?rev=734912&r1=734911&r2=734912&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java
Thu Jan 15 21:33:54 2009
@@ -531,7 +531,7 @@
     /**
      * @see BuildsManager#prepareBuildProjects(Map, int, int, String)
      */
-    /*public void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap,
int trigger, int projectGroupId, String projectGroupName, String scmRootAddress, int scmRootId
)
+    public void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap,
int trigger, int projectGroupId, String projectGroupName, String scmRootAddress, int scmRootId
)
         throws BuildManagerException
     {
         try
@@ -547,23 +547,6 @@
             throw new BuildManagerException( "Error occurred while creating prepare-build-project
task: " +
                 e.getMessage() );
         }
-    }*/
-
-    /**
-     * @see BuildsManager#prepareBuildProjects(Task)
-     */
-    public void prepareBuildProjects( Task prepareBuildTask )
-        throws BuildManagerException
-    {
-        try
-        {
-            prepareBuildQueue.put( prepareBuildTask );
-        }
-        catch ( TaskQueueException e )
-        {
-            throw new BuildManagerException( "Error occurred while creating prepare-build-project
task: " +
-                e.getMessage() );
-        }
     }
 
     /**
@@ -959,11 +942,7 @@
                 OverallBuildQueue overallBuildQueue = overallBuildQueues.get( key );
                 try
                 {
-                	List<Task> queuedProjects = overallBuildQueue.getProjectsInBuildQueue();
-                	if( queuedProjects != null && !queuedProjects.isEmpty() )
-                	{
-                		queuedBuilds.put( overallBuildQueue.getName(), queuedProjects );
-                	}
+                    queuedBuilds.put( overallBuildQueue.getName(), overallBuildQueue.getProjectsInBuildQueue()
);
                 }
                 catch ( TaskQueueException e )
                 {
@@ -990,11 +969,7 @@
                 OverallBuildQueue overallBuildQueue = overallBuildQueues.get( key );
                 try
                 {
-                	List<Task> queuedProjects = overallBuildQueue.getProjectsInCheckoutQueue();
-                	if( queuedProjects != null && !queuedProjects.isEmpty() )
-                	{
-                		queuedCheckouts.put( overallBuildQueue.getName(), queuedProjects );
-                	}
+                    queuedCheckouts.put( overallBuildQueue.getName(), overallBuildQueue.getProjectsInCheckoutQueue()
);
                 }
                 catch ( TaskQueueException e )
                 {
@@ -1007,22 +982,6 @@
     }
     
     /**
-     * @see BuildsManager#getTasksInPrepareBuildQueue()
-     */
-    public List<Task> getTasksInPrepareBuildQueue()
-        throws BuildManagerException
-    {
-        try
-        {
-            return prepareBuildQueue.getQueueSnapshot();
-        }
-        catch ( TaskQueueException e )
-        {
-            throw new BuildManagerException( "Error retrieving tasks in prepare-build-queue.",
e );
-        }
-    }
-    
-    /**
      * @see BuildsManager#cancelAllPrepareBuilds()
      */
     public boolean cancelAllPrepareBuilds() throws BuildManagerException

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/InitPrepareBuildProjectsTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/InitPrepareBuildProjectsTaskExecutor.java?rev=734912&r1=734911&r2=734912&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/InitPrepareBuildProjectsTaskExecutor.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/InitPrepareBuildProjectsTaskExecutor.java
Thu Jan 15 21:33:54 2009
@@ -1,114 +0,0 @@
-package org.apache.continuum.taskqueue;
-
-/*
- * 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.
- */
-
-import java.util.Map;
-
-import org.apache.continuum.buildmanager.BuildManagerException;
-import org.apache.continuum.buildmanager.BuildsManager;
-import org.apache.continuum.taskqueue.manager.TaskQueueManager;
-import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
-import org.apache.maven.continuum.configuration.ConfigurationService;
-import org.codehaus.plexus.taskqueue.Task;
-import org.codehaus.plexus.taskqueue.TaskQueueException;
-import org.codehaus.plexus.taskqueue.execution.TaskExecutionException;
-import org.codehaus.plexus.taskqueue.execution.TaskExecutor;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Executor for tasks in init-prepare-build-project queue. This executor determines where
to queue
- * the prepare-build-project task, either in the local build queues or in the distributed
build queue.
- * 
- * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
- * @version $Id$
- * @plexus.component role="org.codehaus.plexus.taskqueue.execution.TaskExecutor" role-hint="init-prepare-build-project"
- */
-public class InitPrepareBuildProjectsTaskExecutor
-    implements TaskExecutor
-{
-    private Logger log = LoggerFactory.getLogger( InitPrepareBuildProjectsTaskExecutor.class
);
-
-    /**
-     * @plexus.requirement role-hint="parallel"
-     */
-    private BuildsManager parallelBuildsManager;
-
-    /**
-     * @plexus.requirement
-     */
-    private TaskQueueManager taskQueueManager;
-
-    /**
-     * @plexus.requirement
-     */
-    private ConfigurationService configurationService;
-
-    public void executeTask( Task task )
-        throws TaskExecutionException
-    {
-        PrepareBuildProjectsTask prepareBuildTask = (PrepareBuildProjectsTask) task;
-
-        try
-        {
-            if ( configurationService.isDistributedBuildEnabled() )
-            {
-                int allowedParallelBuilds = configurationService.getNumberOfBuildsInParallel();
-                Map<String, Task> currentBuilds = parallelBuildsManager.getCurrentBuilds();
-
-                // check the number of local builds executing in parallel
-                if ( currentBuilds.size() < allowedParallelBuilds )
-                {
-                    log.info( "Enqueuing prepare-build-project task '" + prepareBuildTask.getProjectGroupName()
+
-                        "' to parallel builds queue." );
-                    parallelBuildsManager.prepareBuildProjects( task );
-                }
-                else
-                {
-                    if ( !taskQueueManager.isInDistributedBuildQueue( prepareBuildTask.getProjectGroupId(),
-                                                                      prepareBuildTask.getScmRootAddress()
) )
-                    {
-                        log.info( "Enqueuing prepare-build-project task '" + prepareBuildTask.getProjectGroupName()
+
-                            "' to distributed builds queue." );
-                        taskQueueManager.getDistributedBuildQueue().put( task );
-                    }
-                }
-            }
-            else
-            {
-                log.info( "Enqueuing prepare-build-project task '" + prepareBuildTask.getProjectGroupName()
+
-                    "' to parallel builds queue." );
-                parallelBuildsManager.prepareBuildProjects( task );
-            }
-        }
-        catch ( TaskQueueManagerException e )
-        {
-            throw new TaskExecutionException( e.getMessage() );
-        }
-        catch ( TaskQueueException e )
-        {
-            throw new TaskExecutionException( e.getMessage() );
-        }
-        catch ( BuildManagerException e )
-        {
-            throw new TaskExecutionException( e.getMessage() );
-        }
-    }
-}

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/DefaultTaskQueueManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/DefaultTaskQueueManager.java?rev=734912&r1=734911&r2=734912&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/DefaultTaskQueueManager.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/DefaultTaskQueueManager.java
Thu Jan 15 21:33:54 2009
@@ -95,11 +95,6 @@
      */
     private BuildsManager buildsManager;
     
-    /**
-     * @plexus.requirement role-hint="init-prepare-build-project"
-     */
-    private TaskQueue initPrepareBuildQueue;
-    
     private PlexusContainer container;
 
     public TaskQueue getDistributedBuildQueue()
@@ -112,66 +107,13 @@
     {
         try
         {
-            return distributedBuildQueue.getQueueSnapshot();   
+            return distributedBuildQueue.getQueueSnapshot();
         }
         catch ( TaskQueueException e )
         {
             throw new TaskQueueManagerException( "Error while getting the distributed building
queue", e );
         }
     }
-    
-    /**
-     * @see TaskQueueManager#getInitPrepareBuildQueue()
-     */
-    public TaskQueue getInitPrepareBuildQueue()
-    {
-        return initPrepareBuildQueue;
-    }
-    
-    /**
-     * @see TaskQueueManager#getTasksInInitPrepareBuildQueue()
-     */
-    public List<PrepareBuildProjectsTask> getTasksInInitPrepareBuildQueue()
-        throws TaskQueueManagerException
-    {
-        try
-        {
-            return initPrepareBuildQueue.getQueueSnapshot();
-        }
-        catch ( TaskQueueException e )
-        {
-            throw new TaskQueueManagerException( "Error while getting tasks in init-prepare-build-queue",
e );
-        }
-    }
-    
-    /**
-     * @see TaskQueueManager#isInInitPrepareBuildQueue(int, String)
-     */
-    public boolean isInInitPrepareBuildQueue( int projectGroupId, String scmRootAddress )
-        throws TaskQueueManagerException
-    {
-        try
-        {
-            List<PrepareBuildProjectsTask> queue = initPrepareBuildQueue.getQueueSnapshot();
-
-            for ( PrepareBuildProjectsTask task : queue )
-            {
-                if ( task != null )
-                {
-                    if ( task.getProjectGroupId() == projectGroupId && task.getScmRootAddress().equals(
scmRootAddress ) )
-                    {
-                        return true;
-                    }
-                }
-            }
-
-            return false;
-        }
-        catch ( TaskQueueException e )
-        {
-            throw new TaskQueueManagerException( "Error while getting the tasks in distributed
build queue", e );
-        }
-    }
 
     public TaskQueue getPurgeQueue()
     {

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=734912&r1=734911&r2=734912&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Thu Jan 15 21:33:54 2009
@@ -1017,7 +1017,6 @@
                             parallelBuildsManager.isInAnyCheckoutQueue( projectId ) ||
                             parallelBuildsManager.isInPrepareBuildQueue( projectId ) )  
        
             {
-                log.info( "Not queueing project. Project is already in prepare-build-project,
check-out-project or build-project queue." );
                 return;
             }
         }
@@ -1049,7 +1048,6 @@
                             parallelBuildsManager.isInAnyCheckoutQueue( projectId ) ||
                             parallelBuildsManager.isInPrepareBuildQueue( projectId ))
             {
-                log.info( "Not queueing project. Project is already in prepare-build-project,
check-out-project or build-project queue." );
                 return;
             }
         }
@@ -1760,6 +1758,7 @@
                 context.put( AbstractContinuumAction.KEY_BUILD_DEFINITION, defaultBuildDefinition
);
 
                 executeAction( "add-project-to-checkout-queue", context );
+
             }
         }
         catch ( BuildDefinitionServiceException e )
@@ -3545,23 +3544,33 @@
         
         try
         {
-            if( !taskQueueManager.isInInitPrepareBuildQueue( projectGroupId, scmRootAddress
) )
+            if ( configurationService.isDistributedBuildEnabled() )
             {
-                PrepareBuildProjectsTask task = new PrepareBuildProjectsTask( projectsBuildDefinitionsMap,
trigger,
-                                                                          projectGroupId,
group.getName(), 
-                                                                          scmRootAddress,
scmRootId );            
-                taskQueueManager.getInitPrepareBuildQueue().put( task );
+                if ( !taskQueueManager.isInDistributedBuildQueue( projectGroupId, scmRootAddress
) )
+                {
+                    PrepareBuildProjectsTask task = new PrepareBuildProjectsTask( projectsBuildDefinitionsMap,
trigger,
+                                                                      projectGroupId, group.getName(),

+                                                                      scmRootAddress, scmRootId
);
+                    
+                    taskQueueManager.getDistributedBuildQueue().put( task );
+                }
             }
             else
             {
-                log.info( "Project is already queued!" );
-            }
+        	    parallelBuildsManager.prepareBuildProjects(
+					projectsBuildDefinitionsMap, trigger, projectGroupId,
+					group.getName(), scmRootAddress, scmRootId );
+		    }
+        }
+        catch ( TaskQueueManagerException e )
+        {
+            throw logAndCreateException( e.getMessage(), e );
         }
         catch ( TaskQueueException e )
         {
             throw logAndCreateException( "Error while creating enqueuing object.", e );
         }
-        catch ( TaskQueueManagerException e )
+        catch( BuildManagerException e )
         {
             throw logAndCreateException( "Error while creating enqueuing object.", e );
         }

Modified: continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml?rev=734912&r1=734911&r2=734912&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml (original)
+++ continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml Thu Jan
15 21:33:54 2009
@@ -161,42 +161,6 @@
       </configuration>
     </component>
     
-    <!--
-     |
-     | Init Prepare Build Project Task Queue
-     | This queue holds all the projects to be built. The "init-prepare-build-project"
-     |     	task executor determines whether to put the PrepareBuildProjectsTask in
-     |		the distributed build queue (remote build) or in the parallel build queue (local
to server build) 
-     |
-     |-->
-     
-    <component>
-      <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
-      <role-hint>init-prepare-build-project</role-hint>
-      <implementation>org.codehaus.plexus.taskqueue.DefaultTaskQueue</implementation>
-      <lifecycle-handler>plexus-configurable</lifecycle-handler>
-      <instantiation-strategy>singleton</instantiation-strategy>
-    </component>
-    
-    <component>
-      <role>org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor</role>
-      <role-hint>init-prepare-build-project</role-hint>
-      <implementation>org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor</implementation>
-      <instantiation-strategy>singleton</instantiation-strategy>
-      <requirements>
-        <requirement>
-          <role>org.codehaus.plexus.taskqueue.execution.TaskExecutor</role>
-          <role-hint>init-prepare-build-project</role-hint>
-        </requirement>
-        <requirement>
-          <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
-          <role-hint>init-prepare-build-project</role-hint>
-        </requirement>
-      </requirements>
-      <configuration>
-        <name>init-prepare-build-project</name>
-      </configuration>
-    </component>
     
   </components>
 </component-set>

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java?rev=734912&r1=734911&r2=734912&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java
Thu Jan 15 21:33:54 2009
@@ -82,10 +82,6 @@
 
         DistributedBuildManager distributedBuildManager = (DistributedBuildManager) wac.getBean(
PlexusToSpringUtils
             .buildSpringId( DistributedBuildManager.class ) );
-        
-        TaskQueueExecutor initPrepareBuildProject =
-            (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils.buildSpringId( TaskQueueExecutor.class,
-                                                                                "init-prepare-build-project"
) );
     }
 
 }

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=734912&r1=734911&r2=734912&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
Thu Jan 15 21:33:54 2009
@@ -197,7 +197,7 @@
 	public String display()
 	    throws Exception
 	{
-	    /*if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )	    
+	    if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )
         {
             distributedBuildSummary = new ArrayList<DistributedBuildSummary>();
 
@@ -234,7 +234,7 @@
             return DISTRIBUTED_BUILD_SUCCESS;
         }
         else
-        {*/
+        {
 	        try
 	        {
 	            // current builds
@@ -312,7 +312,7 @@
 	            addActionError( e.getMessage() );
 	            return ERROR;
 	        }
-	   // }
+	    }
 
 	    return SUCCESS;
 	}

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=734912&r1=734911&r2=734912&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
Thu Jan 15 21:33:54 2009
@@ -136,7 +136,66 @@
           </div>
         </c:if> 
         
-                
+        <%--           
+        <div id="h3">
+          <h3>
+            <s:text name="buildQueue.section.title"/>
+          </h3>  
+            <c:if test="${not empty buildsInQueue}">
+              <ec:table items="buildsInQueue.values"
+                        var="buildProjectTask"
+                        showExports="false"
+                        showPagination="false"
+                        showStatusBar="false"
+                        sortable="false"
+                        filterable="false">
+                <ec:row highlightRow="true">
+                  <redback:ifAuthorized permission="continuum-manage-queues">
+                  <ec:column alias="selectedBuildTaskHashCodes" title="&nbsp;" style="width:5px"
filterable="false" sortable="false" width="1%" headerCell="selectAll">
+                    <input type="checkbox" name="selectedBuildTaskHashCodes" value="${buildProjectTask.hashCode}"
/>
+                  </ec:column>              
+                  </redback:ifAuthorized>
+                  <ec:column property="projectName" title="buildQueue.currentTask.projectName"
style="white-space: nowrap" width="49%"/>
+                  <ec:column property="buildDefinitionLabel" title="buildQueue.currentTask.buildDefinition"
style="white-space: nowrap" width="49%"/>
+                  <ec:column property="cancelEntry" title="&nbsp;" width="1%">
+                    <redback:ifAuthorized permission="continuum-manage-queues">
+                    <s:url id="cancelUrl" action="removeBuildQueueEntry" method="remove"
namespace="/">
+                      <s:param name="projectId">${pageScope.buildProjectTask.projectId}</s:param>
+                      <s:param name="buildDefinitionId">${pageScope.buildProjectTask.buildDefinitionId}</s:param>
+                      <s:param name="trigger">${pageScope.buildProjectTask.trigger}</s:param>
+                      <s:param name="projectName">${pageScope.buildProjectTask.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>    
+                  </ec:column>             
+                </ec:row>
+              </ec:table>
+            </c:if>
+            <c:if test="${empty buildsInQueue}">
+              <s:text name="buildQueue.empty"/>
+            </c:if>
+        </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>        
+        
+        --%>
+        
+        
         <!-- checkout queue -->
         <div id="h3">
           <h3>
@@ -237,7 +296,70 @@
             </table>
           </div>
         </c:if>
-                
+        
+        <%--
+        <div id="h3">
+          <h3>
+            <s:text name="checkoutQueue.section.title"/>
+          </h3>  
+          
+          
+          <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"
+                        showStatusBar="false"
+                        sortable="false"
+                        filterable="false">
+                <ec:row highlightRow="true">
+                  <redback:ifAuthorized permission="continuum-manage-queues">
+                  <ec:column alias="selectedCheckOutTaskHashCodes" title="&nbsp;"
style="width:5px" filterable="false" sortable="false" width="1%" headerCell="selectAll">
+                    <input type="checkbox" name="selectedCheckOutTaskHashCodes" value="${currentCheckOutTask.hashCode}"
/>
+                  </ec:column>              
+                  </redback:ifAuthorized>
+                  <ec:column property="projectName" title="Project Name" style="white-space:
nowrap" width="98%"/>
+                  <ec:column property="cancelEntry" title="&nbsp;" width="1%">
+                  <redback:ifAuthorized permission="continuum-manage-queues">
+                    <s:url id="cancelUrl" action="removeCheckoutQueueEntry" method="removeCheckout">
+                      <s:param name="projectId">${pageScope.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>
+                  </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>    
+                  </ec:column>             
+                </ec:row>
+              </ec:table>
+            </c:if>
+            <c:if test="${empty checkoutsInQueue}">
+              <s:text name="checkoutQueue.empty"/>
+            </c:if>
+          </c:forEach>   
+        </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>
+        --%>
+        
       </s:form>
     </body>
   </s:i18n>



Mime
View raw message