continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r775729 [1/5] - in /continuum/trunk: continuum-api/src/main/java/org/apache/continuum/builder/distributed/ continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/ continuum-api/src/main/java/org/apache/continuum/buildm...
Date Sun, 17 May 2009 18:21:36 GMT
Author: ctan
Date: Sun May 17 18:21:35 2009
New Revision: 775729

URL: http://svn.apache.org/viewvc?rev=775729&view=rev
Log:
[CONTINUUM-2218] fixed build order of unrelated but inter-dependent projects in the same group
[CONTINUUM-2174] show current task and queues when distributed build is enabled

merge -r 775692:775726 from 1.3.x branch 

Added:
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/DistributedBuildService.java   (with props)
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallDistributedBuildQueue.java   (with props)
    continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/taskqueue/
    continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/taskqueue/DefaultOverallDistributedBuildQueue.java   (with props)
    continuum/trunk/continuum-builder/src/main/resources/META-INF/spring-context.xml   (with props)
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/DefaultDistributedBuildService.java   (with props)
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/util/
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/util/DistributedBuildUtil.java   (with props)
Removed:
    continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/deferred/
    continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/overall/
Modified:
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/BuildProjectTask.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallBuildQueue.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-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CreateBuildProjectTaskAction.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/BuildContextManager.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/DefaultBuildContextManager.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/pom.xml
    continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java
    continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java
    continuum/trunk/continuum-builder/src/main/resources/META-INF/plexus/components.xml
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.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/DefaultOverallBuildQueue.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java
    continuum/trunk/continuum-core/src/test/java/org/apache/continuum/buildmanager/ParallelBuildsManagerTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueueTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
    continuum/trunk/continuum-distributed/continuum-distributed-master/continuum-distributed-master-server/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportServer.java
    continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java
    continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java
    continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java
    continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
    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/mdo/view-models.mdo
    continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
    continuum/trunk/continuum-webapp/src/main/resources/struts.xml
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/applicationContext.xml
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/viewDistributedBuilds.jsp

Added: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/DistributedBuildService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/DistributedBuildService.java?rev=775729&view=auto
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/DistributedBuildService.java (added)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/DistributedBuildService.java Sun May 17 18:21:35 2009
@@ -0,0 +1,30 @@
+package org.apache.continuum.builder.distributed;
+
+import java.util.Map;
+
+import org.apache.maven.continuum.ContinuumException;
+
+public interface DistributedBuildService
+{
+    String ROLE = DistributedBuildService.class.getName();
+
+    void prepareBuildFinished( Map<String, Object> context )
+        throws ContinuumException;
+
+    boolean shouldBuild( Map<String, Object> context );
+
+    void startPrepareBuild( Map<String, Object> context )
+        throws ContinuumException;
+
+    void startProjectBuild( int projectId )
+        throws ContinuumException;
+    
+    void updateBuildResult( Map<String, Object> context )
+        throws ContinuumException;
+
+    void updateProject( Map<String, Object> context )
+        throws ContinuumException;
+
+    Map<String, String> getEnvironments( int buildDefinitionId, String installationType )
+        throws ContinuumException;
+}

Propchange: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/DistributedBuildService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/DistributedBuildService.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java?rev=775729&r1=775728&r2=775729&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java (original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java Sun May 17 18:21:35 2009
@@ -22,7 +22,7 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.continuum.builder.distributed.executor.DistributedBuildTaskQueueExecutor;
+import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.system.Installation;
@@ -31,25 +31,13 @@
 {
     String ROLE = DistributedBuildManager.class.getName();
 
-    void cancelDistributedBuild( String buildAgentUrl, int projectGroupId, String scmRootAddress )
-        throws ContinuumException;
-
-    void updateBuildResult( Map<String, Object> context )
-        throws ContinuumException;
-
-    void prepareBuildFinished( Map<String, Object> context )
-        throws ContinuumException;
-
-    void startProjectBuild( int projectId )
-        throws ContinuumException;
-
-    void startPrepareBuild( Map<String, Object> context )
+    void cancelDistributedBuild( String buildAgentUrl, int projectGroupId, int scmRootId )
         throws ContinuumException;
 
     void reload()
         throws ContinuumException;
 
-    void removeAgentFromTaskQueueExecutor( String buildAgentUrl )
+    void removeDistributedBuildQueueOfAgent( String buildAgentUrl )
         throws ContinuumException;
 
     boolean isBuildAgentBusy( String buildAgentUrl );
@@ -57,24 +45,34 @@
     List<Installation> getAvailableInstallations( String buildAgentUrl )
         throws ContinuumException;
 
-    Map<String, PrepareBuildProjectsTask> getDistributedBuildProjects();
-
-    Map<String, Object> getBuildResult( int projectId )
+    Map<String, List<PrepareBuildProjectsTask>> getProjectsInPrepareBuildQueue()
         throws ContinuumException;
 
-    Map<String, String> getEnvironments( int buildDefinitionId, String installationType )
+    Map<String, List<BuildProjectTask>> getProjectsInBuildQueue()
         throws ContinuumException;
 
-    void updateProject( Map<String, Object> context )
+    Map<String, Object> getBuildResult( int projectId )
         throws ContinuumException;
 
-    boolean shouldBuild( Map<String, Object> context );
-
-    Map<String, DistributedBuildTaskQueueExecutor> getTaskQueueExecutors();
-
     String generateWorkingCopyContent( int projectId, String directory, String baseUrl, String imagesBaseUrl )
         throws ContinuumException;
 
     String getFileContent( int projectId, String directory, String filename )
         throws ContinuumException;
-}
+
+    void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, int trigger, int projectGroupId, 
+                               String projectGroupName, String scmRootAddress, int scmRootId )
+        throws ContinuumException;
+ 
+    void removeFromDistributedBuildQueue( int projectGroupId, int scmRootId )
+        throws ContinuumException;
+ 
+    void removeFromDistributedBuildQueue( int[] hashCodes )
+        throws ContinuumException;
+ 
+    Map<String, PrepareBuildProjectsTask> getProjectsCurrentlyPreparingBuild()
+        throws ContinuumException;
+
+    Map<String, BuildProjectTask> getProjectsCurrentlyBuilding()
+        throws ContinuumException;
+}
\ No newline at end of file

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=775729&r1=775728&r2=775729&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 Sun May 17 18:21:35 2009
@@ -45,10 +45,11 @@
      * @param projectsBuildDefinitionsMap
      * @param trigger
      * @param scmResultMap                TODO
+     * @param projectGroupId
      * @throws BuildManagerException
      */
     void buildProjects( List<Project> projects, Map<Integer, BuildDefinition> projectsBuildDefinitionsMap, int trigger,
-                        Map<Integer, ScmResult> scmResultMap )
+                        Map<Integer, ScmResult> scmResultMap, int projectGroupId )
         throws BuildManagerException;
 
     /**
@@ -61,10 +62,11 @@
      * @param projectName
      * @param trigger
      * @param scmResult       TODO
+     * @param projectGroupId
      * @throws BuildManagerException
      */
     void buildProject( int projectId, BuildDefinition buildDefinition, String projectName, int trigger,
-                       ScmResult scmResult )
+                       ScmResult scmResult, int projectGroupId )
         throws BuildManagerException;
 
     /**
@@ -161,9 +163,11 @@
      * @param buildDefinitionId
      * @param trigger
      * @param projectName
+     * @param projectGroupId
      * @throws BuildManagerException
      */
-    void removeProjectFromBuildQueue( int projectId, int buildDefinitionId, int trigger, String projectName )
+    void removeProjectFromBuildQueue( int projectId, int buildDefinitionId, int trigger, String projectName,
+                                      int projectGroupId )
         throws BuildManagerException;
 
     // TODO: should we throw an exception when one of the projects cannot be removed?

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/BuildProjectTask.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/BuildProjectTask.java?rev=775729&r1=775728&r2=775729&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/BuildProjectTask.java (original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/BuildProjectTask.java Sun May 17 18:21:35 2009
@@ -49,8 +49,10 @@
 
     private ScmResult scmResult;
 
+    int projectGroupId;
+
     public BuildProjectTask( int projectId, int buildDefinitionId, int trigger, String projectName,
-                             String buildDefinitionLabel, ScmResult scmResult )
+                             String buildDefinitionLabel, ScmResult scmResult, int projectGroupId )
     {
         this.projectId = projectId;
 
@@ -65,6 +67,8 @@
         this.buildDefinitionLabel = buildDefinitionLabel;
 
         this.scmResult = scmResult;
+
+        this.projectGroupId = projectGroupId;
     }
 
     public int getProjectId()
@@ -112,6 +116,11 @@
         return scmResult;
     }
 
+    public int getProjectGroupId()
+    {
+        return projectGroupId;
+    }
+
     public boolean equals( Object obj )
     {
         if ( obj == null )

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallBuildQueue.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallBuildQueue.java?rev=775729&r1=775728&r2=775729&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallBuildQueue.java (original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallBuildQueue.java Sun May 17 18:21:35 2009
@@ -215,10 +215,12 @@
      * @param buildDefinitionId
      * @param trigger
      * @param projectName
+     * @param projectGroupId
      * @return
      * @throws TaskQueueException TODO
      */
-    boolean removeProjectFromBuildQueue( int projectId, int buildDefinitionId, int trigger, String projectName )
+    boolean removeProjectFromBuildQueue( int projectId, int buildDefinitionId, int trigger, String projectName,
+                                         int projectGroupId )
         throws TaskQueueException;
 
     /**

Added: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallDistributedBuildQueue.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallDistributedBuildQueue.java?rev=775729&view=auto
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallDistributedBuildQueue.java (added)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallDistributedBuildQueue.java Sun May 17 18:21:35 2009
@@ -0,0 +1,37 @@
+package org.apache.continuum.taskqueue;
+
+import java.util.List;
+
+import org.apache.continuum.builder.distributed.executor.DistributedBuildTaskQueueExecutor;
+import org.codehaus.plexus.taskqueue.Task;
+import org.codehaus.plexus.taskqueue.TaskQueue;
+import org.codehaus.plexus.taskqueue.TaskQueueException;
+
+public interface OverallDistributedBuildQueue
+{
+    String getBuildAgentUrl();
+
+    void setBuildAgentUrl( String buildAgentUrl );
+
+    TaskQueue getDistributedBuildQueue();
+
+    void addToDistributedBuildQueue( Task distributedBuildTask )
+        throws TaskQueueException;
+
+    List<PrepareBuildProjectsTask> getProjectsInQueue()
+        throws TaskQueueException;
+
+    boolean isInDistributedBuildQueue( int projectGroupId, int scmRootId )
+        throws TaskQueueException;
+
+    void removeFromDistributedBuildQueue( int projectGroupId, int scmRootId )
+        throws TaskQueueException;
+
+    void removeFromDistributedBuildQueue( int[] hashCodes )
+        throws TaskQueueException;
+
+    void removeFromDistributedBuildQueueByHashCode( int hashCode )
+        throws TaskQueueException;
+
+    DistributedBuildTaskQueueExecutor getDistributedBuildTaskQueueExecutor();
+}

Propchange: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallDistributedBuildQueue.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallDistributedBuildQueue.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

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=775729&r1=775728&r2=775729&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 Sun May 17 18:21:35 2009
@@ -85,6 +85,11 @@
         return scmRootAddress;
     }
 
+    public int getProjectScmRootId()
+    {
+        return projectScmRootId;
+    }
+
     public int hashCode()
     {
         return this.projectGroupId + this.projectScmRootId + this.trigger;

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=775729&r1=775728&r2=775729&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 Sun May 17 18:21:35 2009
@@ -19,9 +19,6 @@
  * under the License.
  */
 
-import java.util.List;
-
-import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
 import org.codehaus.plexus.taskqueue.TaskQueue;;
 
 /**
@@ -31,16 +28,8 @@
 {
     String ROLE = TaskQueueManager.class.getName();
 
-    TaskQueue getDistributedBuildQueue();
-
-    List<PrepareBuildProjectsTask> getDistributedBuildProjectsInQueue()
-        throws TaskQueueManagerException;
-
     TaskQueue getPurgeQueue();
 
-    boolean isInDistributedBuildQueue( int projectGroupId, String scmRootAddress )
-        throws TaskQueueManagerException;
-
     boolean isInPurgeQueue( int purgeConfigurationId )
         throws TaskQueueManagerException;
 
@@ -77,9 +66,6 @@
     boolean releaseInProgress()
         throws TaskQueueManagerException;
 
-    void removeFromDistributedBuildQueue( int projectGroupId, String scmRootAddress )
-        throws TaskQueueManagerException;
-  
     /**
      * Remove local repository from the purge queue
      * 
@@ -108,7 +94,4 @@
      */
     void removeRepositoryFromPurgeQueue( int repositoryId )
         throws TaskQueueManagerException;
-
-    void removeTasksFromDistributedBuildQueueWithHashCodes( int[] hashCodes )
-        throws TaskQueueManagerException;
 }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java?rev=775729&r1=775728&r2=775729&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java Sun May 17 18:21:35 2009
@@ -33,7 +33,7 @@
     Map<String, Object> getBuildResult( int projectId )
         throws ContinuumBuildAgentException;
 
-    int getProjectCurrentlyBuilding()
+    Map<String, Object> getProjectCurrentlyBuilding()
         throws ContinuumBuildAgentException;
 
     void cancelBuild()
@@ -80,4 +80,18 @@
 
     void releaseRollback( String releaseId, int projectId )
         throws ContinuumBuildAgentException;
+
+    List<Map<String, Object>> getProjectsInPrepareBuildQueue()
+        throws ContinuumBuildAgentException;
+
+    List<Map<String, Object>> getProjectsInBuildQueue()
+        throws ContinuumBuildAgentException;
+
+    int getBuildSizeOfAgent()
+        throws ContinuumBuildAgentException;
+
+    Map<String, Object> getProjectCurrentlyPreparingBuild()
+        throws ContinuumBuildAgentException;
+
+    boolean isProjectGroupInQueue( int projectGroupId );
 }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java?rev=775729&r1=775728&r2=775729&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java Sun May 17 18:21:35 2009
@@ -40,6 +40,7 @@
 import org.apache.continuum.buildagent.taskqueue.manager.BuildAgentTaskQueueManager;
 import org.apache.continuum.buildagent.utils.ContinuumBuildAgentUtil;
 import org.apache.continuum.buildagent.utils.WorkingCopyContentGenerator;
+import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildResult;
@@ -175,7 +176,18 @@
     {
         Map<String, Object> result = new HashMap<String, Object>();
 
-        if ( projectId == getProjectCurrentlyBuilding() )
+        int currentBuildId = 0;
+
+        try
+        {
+            currentBuildId = buildAgentTaskQueueManager.getIdOfProjectCurrentlyBuilding();
+        }
+        catch ( TaskQueueManagerException e )
+        {
+            throw new ContinuumBuildAgentException( e.getMessage(), e );
+        }
+
+        if ( projectId == currentBuildId )
         {
             BuildContext buildContext = buildContextManager.getBuildContext( projectId );
 
@@ -235,19 +247,6 @@
         return result;
     }
 
-    public int getProjectCurrentlyBuilding()
-        throws ContinuumBuildAgentException
-    {
-        try
-        {
-            return buildAgentTaskQueueManager.getCurrentProjectInBuilding();
-        }
-        catch ( TaskQueueManagerException e )
-        {
-            throw new ContinuumBuildAgentException( e.getMessage(), e );
-        }
-    }
-
     public void cancelBuild()
         throws ContinuumBuildAgentException
     {
@@ -570,6 +569,184 @@
         }
     }
 
+    public int getBuildSizeOfAgent()
+    {
+        int size = 0;
+        
+        try
+        {
+            if ( buildAgentTaskQueueManager.getCurrentProjectInBuilding() != null )
+            {
+                size++;
+            }
+
+            if ( buildAgentTaskQueueManager.getCurrentProjectInPrepareBuild() != null )
+            {
+                size++;
+            }
+
+            size = size + buildAgentTaskQueueManager.getProjectsInBuildQueue().size();
+
+            size = size + buildAgentTaskQueueManager.getProjectsInPrepareBuildQueue().size();
+        }
+        catch ( TaskQueueManagerException e )
+        {
+            log.error( "Error occurred while getting build size of agent" );
+        }
+
+        return size;
+    }
+
+    public List<Map<String, Object>> getProjectsInPrepareBuildQueue()
+        throws ContinuumBuildAgentException
+    {
+        try
+        {
+            List<Map<String, Object>> projects = new ArrayList<Map<String, Object>>();
+
+            for ( PrepareBuildProjectsTask task : buildAgentTaskQueueManager.getProjectsInPrepareBuildQueue() )
+            {
+                Map<String, Object> map = new HashMap<String, Object>();
+                map.put( ContinuumBuildAgentUtil.KEY_PROJECT_GROUP_ID, new Integer( task.getProjectGroupId() ) );
+                map.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ID, new Integer( task.getScmRootId() ) );
+                map.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ADDRESS, task.getScmRootAddress() );
+                map.put( ContinuumBuildAgentUtil.KEY_TRIGGER, new Integer( task.getTrigger() ) );
+
+                projects.add( map );
+            }
+
+            return projects;
+        }
+        catch( TaskQueueManagerException e )
+        {
+            log.error( "Error occurred while retrieving projects in prepare build queue", e );
+            throw new ContinuumBuildAgentException( "Error occurred while retrieving projects in prepare build queue", e );
+        }
+    }
+
+    public List<Map<String, Object>> getProjectsInBuildQueue()
+        throws ContinuumBuildAgentException
+    {
+        try
+        {
+            List<Map<String, Object>> projects = new ArrayList<Map<String, Object>>();
+
+            for ( BuildProjectTask task : buildAgentTaskQueueManager.getProjectsInBuildQueue() )
+            {
+                Map<String, Object> map = new HashMap<String, Object>();
+                map.put( ContinuumBuildAgentUtil.KEY_PROJECT_ID, new Integer( task.getProjectId() ) );
+                map.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, new Integer( task.getBuildDefinitionId() ) );
+                map.put( ContinuumBuildAgentUtil.KEY_TRIGGER, new Integer( task.getTrigger() ) );
+                map.put( ContinuumBuildAgentUtil.KEY_PROJECT_GROUP_ID, new Integer( task.getProjectGroupId() ) );
+                map.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_LABEL, task.getBuildDefinitionLabel() );
+
+                projects.add( map );
+            }
+
+            return projects;
+        }
+        catch( TaskQueueManagerException e )
+        {
+            log.error( "Error occurred while retrieving projects in build queue", e );
+            throw new ContinuumBuildAgentException( "Error occurred while retrieving projects in build queue", e );
+        }
+    }
+
+    public Map<String, Object> getProjectCurrentlyPreparingBuild()
+        throws ContinuumBuildAgentException
+    {
+        try
+        {
+            Map<String, Object> project = new HashMap<String, Object>();
+
+            PrepareBuildProjectsTask task = buildAgentTaskQueueManager.getCurrentProjectInPrepareBuild();
+
+            if ( task != null )
+            {
+                project.put( ContinuumBuildAgentUtil.KEY_PROJECT_GROUP_ID, new Integer( task.getProjectGroupId() ) );
+                project.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ID, new Integer( task.getScmRootId() ) );
+                project.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ADDRESS, task.getScmRootAddress() );
+                project.put( ContinuumBuildAgentUtil.KEY_TRIGGER, task.getTrigger() );
+            }
+
+            return project;
+        }
+        catch ( TaskQueueManagerException e )
+        {
+            log.error( "Error occurred while retrieving current project in prepare build", e );
+            throw new ContinuumBuildAgentException( "Error occurred while retrieving current project in prepare build", e );
+        }
+    }
+
+    public Map<String, Object> getProjectCurrentlyBuilding()
+        throws ContinuumBuildAgentException
+    {
+        try
+        {
+            Map<String, Object> project = new HashMap<String, Object>();
+
+            BuildProjectTask task = buildAgentTaskQueueManager.getCurrentProjectInBuilding();
+
+            if ( task != null )
+            {
+                project.put( ContinuumBuildAgentUtil.KEY_PROJECT_ID, new Integer( task.getProjectId() ) );
+                project.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, new Integer( task.getBuildDefinitionId() ) );
+                project.put( ContinuumBuildAgentUtil.KEY_TRIGGER, new Integer( task.getTrigger() ) );
+                project.put( ContinuumBuildAgentUtil.KEY_PROJECT_GROUP_ID, new Integer( task.getProjectGroupId() ) );
+                project.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_LABEL, task.getBuildDefinitionLabel() );
+            }
+
+            return project;
+        }
+        catch ( TaskQueueManagerException e )
+        {
+            log.error( "Error occurred while retrieving current project in building", e );
+            throw new ContinuumBuildAgentException( "Error occurred while retrieving current project in building", e );
+        }
+    }
+
+    public boolean isProjectGroupInQueue( int projectGroupId )
+    {
+        try
+        {
+            PrepareBuildProjectsTask currentPrepareBuildTask = buildAgentTaskQueueManager.getCurrentProjectInPrepareBuild();
+
+            if ( currentPrepareBuildTask != null && currentPrepareBuildTask.getProjectGroupId() == projectGroupId )
+            {
+                return true;
+            }
+
+            BuildProjectTask currentBuildTask = buildAgentTaskQueueManager.getCurrentProjectInBuilding();
+
+            if ( currentBuildTask != null && currentBuildTask.getProjectGroupId() == projectGroupId )
+            {
+                return true;
+            }
+
+            for ( PrepareBuildProjectsTask task : buildAgentTaskQueueManager.getProjectsInPrepareBuildQueue() )
+            {
+                if ( task.getProjectGroupId() == projectGroupId )
+                {
+                    return true;
+                }
+            }
+
+            for ( BuildProjectTask task : buildAgentTaskQueueManager.getProjectsInBuildQueue() )
+            {
+                if ( task.getProjectGroupId() == projectGroupId )
+                {
+                    return true;
+                }
+            }
+        }
+        catch ( TaskQueueManagerException e )
+        {
+            log.error( "Error while checking if project group " + projectGroupId + " is queued in agent", e);
+        }
+
+        return false;
+    }
+
     private void processProject( String workingDirectory, String pomFilename, boolean autoVersionSubmodules,
                                  List<Map<String, String>> projects )
         throws Exception
@@ -641,6 +818,7 @@
             context.setProjectGroupId( ContinuumBuildAgentUtil.getProjectGroupId( map ) );
             context.setProjectGroupName( ContinuumBuildAgentUtil.getProjectGroupName( map ) );
             context.setScmRootAddress( ContinuumBuildAgentUtil.getScmRootAddress( map ) );
+            context.setScmRootId( ContinuumBuildAgentUtil.getScmRootId( map ) );
             context.setProjectName( ContinuumBuildAgentUtil.getProjectName( map ) );
             context.setProjectState( ContinuumBuildAgentUtil.getProjectState( map ) );
             context.setTrigger( ContinuumBuildAgentUtil.getTrigger( map ) );
@@ -650,11 +828,12 @@
             context.setLatestUpdateDate( ContinuumBuildAgentUtil.getLatestUpdateDate( map ) );
             context.setBuildAgentUrl( ContinuumBuildAgentUtil.getBuildAgentUrl( map ) );
             context.setMaxExecutionTime( ContinuumBuildAgentUtil.getMaxExecutionTime( map ) );
+            context.setBuildDefinitionLabel( ContinuumBuildAgentUtil.getBuildDefinitionLabel( map ) );
 
             buildContext.add( context );
         }
 
-        buildContextManager.setBuildContextList( buildContext );
+        buildContextManager.addBuildContexts( buildContext );
 
         return buildContext;
     }
@@ -726,7 +905,7 @@
         {
             BuildContext context = buildContexts.get( 0 );
             return new PrepareBuildProjectsTask( buildContexts, context.getTrigger(), context.getProjectGroupId(),
-                                                 context.getScmRootAddress() );
+                                                 context.getScmRootAddress(), context.getScmRootId() );
         }
         else
         {

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CreateBuildProjectTaskAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CreateBuildProjectTaskAction.java?rev=775729&r1=775728&r2=775729&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CreateBuildProjectTaskAction.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CreateBuildProjectTaskAction.java Sun May 17 18:21:35 2009
@@ -55,8 +55,8 @@
         {
             BuildProjectTask buildProjectTask =
                 new BuildProjectTask( buildContext.getProjectId(), buildContext.getBuildDefinitionId(),
-                                      buildContext.getTrigger(), buildContext.getProjectName(), "",
-                                      buildContext.getScmResult() );
+                                      buildContext.getTrigger(), buildContext.getProjectName(), buildContext.getBuildDefinitionLabel(),
+                                      buildContext.getScmResult(), buildContext.getProjectGroupId() );
             buildProjectTask.setMaxExecutionTime( buildContext.getMaxExecutionTime() * 1000 );
 
             try
@@ -79,23 +79,6 @@
                     "Error while checking if project " + buildContext.getProjectId() + " is in build queue", e );
             }
         }
-
-        try
-        {
-            boolean stop = false;
-            while ( !stop )
-            {
-                if ( buildAgentTaskQueueManager.getCurrentProjectInBuilding() <= 0 &&
-                    !buildAgentTaskQueueManager.hasBuildTaskInQueue() )
-                {
-                    stop = true;
-                }
-            }
-        }
-        catch ( TaskQueueManagerException e )
-        {
-            throw new ContinuumException( e.getMessage(), e );
-        }
     }
 
 }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java?rev=775729&r1=775728&r2=775729&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java Sun May 17 18:21:35 2009
@@ -39,6 +39,8 @@
 
     private int buildDefinitionId;
 
+    private String buildDefinitionLabel;
+
     private String buildFile;
 
     private String goals;
@@ -63,6 +65,8 @@
 
     private String scmRootAddress;
 
+    private int scmRootId;
+
     private Map<String, Object> actionContext;
 
     private ScmResult scmResult;
@@ -350,4 +354,24 @@
     {
         return maxExecutionTime;
     }
+
+    public void setScmRootId( int scmRootId )
+    {
+        this.scmRootId = scmRootId;
+    }
+
+    public int getScmRootId()
+    {
+        return scmRootId;
+    }
+
+    public void setBuildDefinitionLabel( String buildDefinitionLabel )
+    {
+        this.buildDefinitionLabel = buildDefinitionLabel;
+    }
+
+    public String getBuildDefinitionLabel()
+    {
+        return buildDefinitionLabel;
+    }
 }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/BuildContextManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/BuildContextManager.java?rev=775729&r1=775728&r2=775729&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/BuildContextManager.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/BuildContextManager.java Sun May 17 18:21:35 2009
@@ -30,9 +30,11 @@
 {
     String ROLE = BuildContextManager.class.getName();
 
-    public void setBuildContextList( List<BuildContext> buildContext );
+    public void addBuildContexts( List<BuildContext> buildContextList );
 
-    public List<BuildContext> getBuildContextList();
+    public List<BuildContext> getBuildContexts();
 
     public BuildContext getBuildContext( int projectId );
+
+    public void removeBuildContext( int projectId );
 }
\ No newline at end of file

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/DefaultBuildContextManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/DefaultBuildContextManager.java?rev=775729&r1=775728&r2=775729&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/DefaultBuildContextManager.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/DefaultBuildContextManager.java Sun May 17 18:21:35 2009
@@ -19,7 +19,10 @@
  * under the License.
  */
 
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.continuum.buildagent.buildcontext.BuildContext;
 
@@ -30,34 +33,50 @@
 public class DefaultBuildContextManager
     implements BuildContextManager
 {
-    public List<BuildContext> buildContexts;
+    public Map<Integer, BuildContext> buildContexts;
 
     public BuildContext getBuildContext( int projectId )
     {
-        BuildContext context = null;
+        if ( buildContexts != null )
+        {
+            return buildContexts.get( projectId );
+        }
+
+        return null;
+    }
+
+    public List<BuildContext> getBuildContexts()
+    {
+        List<BuildContext> bContexts = new ArrayList<BuildContext>();
 
         if ( buildContexts != null )
         {
-            for ( BuildContext item : buildContexts )
-            {
-                if (item.getProjectId() == projectId)
-                {
-                    context = item;
-                    break;
-                }
-            }
+            bContexts.addAll( buildContexts.values() );
         }
 
-        return context;
+        return bContexts;
     }
 
-    public List<BuildContext> getBuildContextList()
+    public void addBuildContexts( List<BuildContext> buildContextList )
     {
-        return buildContexts;
+        if ( buildContexts == null )
+        {
+            buildContexts = new HashMap<Integer, BuildContext>();
+        }
+
+        for ( BuildContext buildContext : buildContextList )
+        {
+            buildContexts.put( buildContext.getProjectId(), buildContext );
+        }
     }
 
-    public void setBuildContextList( List<BuildContext> buildContexts )
+    public void removeBuildContext( int projectId )
     {
-        this.buildContexts = buildContexts;
+        BuildContext buildContext = getBuildContext( projectId );
+
+        if ( buildContext != null )
+        {
+            buildContexts.remove( buildContext );
+        }
     }
 }
\ No newline at end of file

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java?rev=775729&r1=775728&r2=775729&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java Sun May 17 18:21:35 2009
@@ -35,13 +35,16 @@
 
     private final String scmRootAddress;
 
+    private final int scmRootId;
+
     public PrepareBuildProjectsTask( List<BuildContext> buildContexts, int trigger, int projectGroupId,
-                                     String scmRootAddress )
+                                     String scmRootAddress, int scmRootId )
     {
         this.buildContexts = buildContexts;
         this.trigger = trigger;
         this.projectGroupId = projectGroupId;
         this.scmRootAddress = scmRootAddress;
+        this.scmRootId = scmRootId;
     }
 
     public long getMaxExecutionTime()
@@ -69,4 +72,14 @@
     {
         return scmRootAddress;
     }
+
+    public int getScmRootId()
+    {
+        return scmRootId;
+    }
+
+    public int getHashCode()
+    {
+        return projectGroupId + scmRootId + trigger;
+    }
 }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java?rev=775729&r1=775728&r2=775729&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java Sun May 17 18:21:35 2009
@@ -239,6 +239,7 @@
         try
         {
             buildAgentManager.returnBuildResult( result );
+            buildContextManager.removeBuildContext( buildContext.getProjectId() );
         }
         catch ( ContinuumException e )
         {

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java?rev=775729&r1=775728&r2=775729&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java Sun May 17 18:21:35 2009
@@ -19,6 +19,10 @@
  * under the License.
  */
 
+import java.util.List;
+
+import org.apache.continuum.buildagent.taskqueue.PrepareBuildProjectsTask;
+import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
 import org.codehaus.plexus.taskqueue.TaskQueue;
 
@@ -33,9 +37,15 @@
     void cancelBuild()
         throws TaskQueueManagerException;
 
-    int getCurrentProjectInBuilding()
+    int getIdOfProjectCurrentlyBuilding()
+        throws TaskQueueManagerException;
+
+    BuildProjectTask getCurrentProjectInBuilding()
         throws TaskQueueManagerException;
 
+    PrepareBuildProjectsTask getCurrentProjectInPrepareBuild()
+        throws TaskQueueManagerException;
+    
     boolean hasBuildTaskInQueue()
         throws TaskQueueManagerException;
 
@@ -44,4 +54,12 @@
 
     boolean isInPrepareBuildQueue( int projectGroupId, int trigger, String scmRootAddress )
         throws TaskQueueManagerException;
+
+    List<PrepareBuildProjectsTask> getProjectsInPrepareBuildQueue()
+        throws TaskQueueManagerException;
+
+    List<BuildProjectTask> getProjectsInBuildQueue()
+        throws TaskQueueManagerException;
+
+    //removeProjectFrom
 }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java?rev=775729&r1=775728&r2=775729&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java Sun May 17 18:21:35 2009
@@ -69,7 +69,7 @@
         return buildAgentBuildQueue;
     }
 
-    public int getCurrentProjectInBuilding()
+    public int getIdOfProjectCurrentlyBuilding()
         throws TaskQueueManagerException
     {
         Task task = getBuildTaskQueueExecutor().getCurrentTask();
@@ -151,6 +151,19 @@
         }
     }
 
+    public TaskQueueExecutor getPrepareBuildTaskQueueExecutor()
+        throws TaskQueueManagerException
+    {
+        try
+        {
+            return (TaskQueueExecutor) container.lookup( TaskQueueExecutor.class, "prepare-build-agent" );
+        }
+        catch ( ComponentLookupException e )
+        {
+            throw new TaskQueueManagerException( e.getMessage(), e );
+        }
+    }
+
     public boolean hasBuildTaskInQueue()
         throws TaskQueueManagerException
     {
@@ -231,9 +244,63 @@
         return false;
     }
 
+    public List<PrepareBuildProjectsTask> getProjectsInPrepareBuildQueue()
+        throws TaskQueueManagerException
+    {
+        try
+        {
+            return buildAgentPrepareBuildQueue.getQueueSnapshot();
+        }
+        catch ( TaskQueueException e )
+        {
+            log.error( "Error occurred while retrieving projects in prepare build queue", e );
+            throw new TaskQueueManagerException( "Error occurred while retrieving projects in prepare build queue", e );
+        }
+    }
+
+    public List<BuildProjectTask> getProjectsInBuildQueue()
+        throws TaskQueueManagerException
+    {
+        try
+        {
+            return buildAgentBuildQueue.getQueueSnapshot();
+        }
+        catch ( TaskQueueException e )
+        {
+            log.error( "Error occurred while retrieving projects in build queue", e );
+            throw new TaskQueueManagerException( "Error occurred while retrieving projects in build queue", e );
+        }
+    }
+
+    public PrepareBuildProjectsTask getCurrentProjectInPrepareBuild()
+        throws TaskQueueManagerException
+    {
+        Task task = getPrepareBuildTaskQueueExecutor().getCurrentTask();
+
+        if ( task != null )
+        {
+            return (PrepareBuildProjectsTask) task;
+        }
+        return null;
+    }
+
+    public BuildProjectTask getCurrentProjectInBuilding()
+        throws TaskQueueManagerException
+    {
+        Task task = getBuildTaskQueueExecutor().getCurrentTask();
+
+        if ( task != null )
+        {
+            return (BuildProjectTask) task;
+        }
+
+        return null;
+    }
+
     public void contextualize( Context context )
         throws ContextException
     {
         container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
     }
+
 }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java?rev=775729&r1=775728&r2=775729&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java Sun May 17 18:21:35 2009
@@ -51,6 +51,8 @@
 
     public static final String KEY_BUILD_DEFINITION_ID = "builddefinition-id";
 
+    public static final String KEY_BUILD_DEFINITION_LABEL = "builddefinition-label";
+
     public static final String KEY_TRIGGER = "trigger";
 
     public static final String KEY_EXECUTOR_ID = "executor-id";
@@ -95,6 +97,8 @@
 
     public static final String KEY_SCM_ROOT_ADDRESS = "scm-root-address";
 
+    public static final String KEY_SCM_ROOT_ID = "scm-root-id";
+
     public static final String KEY_SCM_ROOT_STATE = "scm-root-state";
 
     public static final String KEY_CHECKOUT_SCM_RESULT = "checkout-scm-result";
@@ -526,6 +530,16 @@
         return getString( context, KEY_LOCAL_REPOSITORY_LAYOUT, "" );
     }
 
+    public static int getScmRootId( Map<String, Object> context )
+    {
+        return getInteger( context, KEY_SCM_ROOT_ID );
+    }
+
+    public static String getBuildDefinitionLabel( Map<String, Object> context )
+    {
+        return getString( context, KEY_BUILD_DEFINITION_LABEL, "" );
+    }
+
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/pom.xml?rev=775729&r1=775728&r2=775729&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/pom.xml (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/pom.xml Sun May 17 18:21:35 2009
@@ -91,7 +91,7 @@
           <scanIntervalSeconds>10</scanIntervalSeconds>
           <contextPath>/</contextPath>
           <stopKey>stopkey</stopKey>
-          <stopPort>9192</stopPort>
+          <stopPort>9292</stopPort>
           <jettyEnvXml>${basedir}/src/jetty-env.xml</jettyEnvXml>
           <connectors>
             <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">

Modified: continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java?rev=775729&r1=775728&r2=775729&view=diff
==============================================================================
--- continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java (original)
+++ continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java Sun May 17 18:21:35 2009
@@ -106,7 +106,8 @@
             log.info( "initializing buildContext" );
             List<Map<String, Object>> buildContext =
                 initializeBuildContext( prepareBuildTask.getProjectsBuildDefinitionsMap(),
-                                        prepareBuildTask.getTrigger(), prepareBuildTask.getScmRootAddress() );
+                                        prepareBuildTask.getTrigger(), prepareBuildTask.getScmRootAddress(),
+                                        prepareBuildTask.getProjectScmRootId() );
 
             startTime = System.currentTimeMillis();
             client.buildProjects( buildContext );
@@ -126,7 +127,7 @@
     }
 
     private List<Map<String, Object>> initializeBuildContext( Map<Integer, Integer> projectsAndBuildDefinitions,
-                                                              int trigger, String scmRootAddress )
+                                                              int trigger, String scmRootAddress, int scmRootId )
         throws ContinuumException
     {
         List<Map<String, Object>> buildContext = new ArrayList<Map<String, Object>>();
@@ -152,6 +153,7 @@
 
                 context.put( ContinuumBuildConstant.KEY_PROJECT_GROUP_ID, project.getProjectGroup().getId() );
                 context.put( ContinuumBuildConstant.KEY_PROJECT_GROUP_NAME, project.getProjectGroup().getName() );
+                context.put( ContinuumBuildConstant.KEY_SCM_ROOT_ID, scmRootId );
                 context.put( ContinuumBuildConstant.KEY_SCM_ROOT_ADDRESS, scmRootAddress );
                 context.put( ContinuumBuildConstant.KEY_PROJECT_ID, project.getId() );
                 context.put( ContinuumBuildConstant.KEY_PROJECT_NAME, project.getName() );
@@ -196,6 +198,13 @@
                 }
 
                 context.put( ContinuumBuildConstant.KEY_BUILD_DEFINITION_ID, buildDefinitionId );
+                String buildDefinitionLabel = buildDef.getDescription();
+                if ( StringUtils.isEmpty( buildDefinitionLabel ) )
+                {
+                    buildDefinitionLabel = buildDef.getGoals();
+                }
+                context.put( ContinuumBuildConstant.KEY_BUILD_DEFINITION_LABEL, buildDefinitionLabel );
+                
                 context.put( ContinuumBuildConstant.KEY_BUILD_FILE, buildDef.getBuildFile() );
                 context.put( ContinuumBuildConstant.KEY_GOALS, buildDef.getGoals() );
 

Added: continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/taskqueue/DefaultOverallDistributedBuildQueue.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/taskqueue/DefaultOverallDistributedBuildQueue.java?rev=775729&view=auto
==============================================================================
--- continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/taskqueue/DefaultOverallDistributedBuildQueue.java (added)
+++ continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/taskqueue/DefaultOverallDistributedBuildQueue.java Sun May 17 18:21:35 2009
@@ -0,0 +1,139 @@
+package org.apache.continuum.builder.distributed.taskqueue;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.lang.ArrayUtils;
+import org.apache.continuum.builder.distributed.executor.DistributedBuildTaskQueueExecutor;
+import org.apache.continuum.builder.distributed.executor.ThreadedDistributedBuildTaskQueueExecutor;
+import org.apache.continuum.taskqueue.OverallDistributedBuildQueue;
+import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
+import org.codehaus.plexus.taskqueue.Task;
+import org.codehaus.plexus.taskqueue.TaskQueue;
+import org.codehaus.plexus.taskqueue.TaskQueueException;
+
+public class DefaultOverallDistributedBuildQueue
+    implements OverallDistributedBuildQueue
+{
+    private String buildAgentUrl;
+
+    private DistributedBuildTaskQueueExecutor distributedBuildTaskQueueExecutor;
+
+    public void addToDistributedBuildQueue( Task distributedBuildTask )
+        throws TaskQueueException
+    {
+        getDistributedBuildQueue().put( distributedBuildTask );
+    }
+
+    public String getBuildAgentUrl()
+    {
+        return buildAgentUrl;
+    }
+
+    public TaskQueue getDistributedBuildQueue()
+    {
+        return ( (ThreadedDistributedBuildTaskQueueExecutor) distributedBuildTaskQueueExecutor ).getQueue();
+    }
+
+    public DistributedBuildTaskQueueExecutor getDistributedBuildTaskQueueExecutor()
+    {
+        return distributedBuildTaskQueueExecutor;
+    }
+
+    public List<PrepareBuildProjectsTask> getProjectsInQueue()
+        throws TaskQueueException
+    {
+        return getDistributedBuildQueue().getQueueSnapshot();
+    }
+
+    public boolean isInDistributedBuildQueue( int projectGroupId, int scmRootId )
+        throws TaskQueueException
+    {
+        List<PrepareBuildProjectsTask> tasks = getProjectsInQueue();
+
+        for ( PrepareBuildProjectsTask task : tasks )
+        {
+            if ( task != null )
+            {
+                if ( task.getProjectGroupId() == projectGroupId && 
+                     task.getProjectScmRootId() == scmRootId )
+                {
+                    return true;
+                }
+            }
+        }
+
+        return false;
+    }
+
+    public void removeFromDistributedBuildQueue( int projectGroupId, int scmRootId )
+        throws TaskQueueException
+    {
+        List<PrepareBuildProjectsTask> tasks = getProjectsInQueue();
+
+        for ( PrepareBuildProjectsTask task : tasks )
+        {
+            if ( task != null )
+            {
+                if ( task.getProjectGroupId() == projectGroupId && 
+                     task.getProjectScmRootId() == scmRootId )
+                {
+                    getDistributedBuildQueue().remove( task );
+                    return;
+                }
+            }
+        }
+    }
+
+    public void removeFromDistributedBuildQueue( int[] hashCodes )
+        throws TaskQueueException
+    {
+        List<PrepareBuildProjectsTask> tasks = getProjectsInQueue();
+
+        List<PrepareBuildProjectsTask> tasksToRemove = new ArrayList<PrepareBuildProjectsTask>();
+
+        for ( PrepareBuildProjectsTask task : tasks )
+        {
+            if ( task != null )
+            {
+                if ( ArrayUtils.contains( hashCodes, task.getHashCode() ) )
+                {
+                    tasksToRemove.add( task );
+                }
+            }
+        }
+
+        if ( !tasksToRemove.isEmpty() )
+        {
+            getDistributedBuildQueue().removeAll( tasksToRemove );
+        }
+    }
+
+    public void removeFromDistributedBuildQueueByHashCode( int hashCode )
+        throws TaskQueueException
+    {
+        List<PrepareBuildProjectsTask> tasks = getProjectsInQueue();
+
+        for ( PrepareBuildProjectsTask task : tasks )
+        {
+            if ( task != null )
+            {
+                if ( task.getHashCode() == hashCode )
+                {
+                    getDistributedBuildQueue().remove( task );
+                    return;
+                }
+            }
+        }
+    }
+
+    public void setBuildAgentUrl( String buildAgentUrl )
+    {
+        this.buildAgentUrl = buildAgentUrl;
+    }
+
+    public void setDistributedBuildTaskQueueExecutor( DistributedBuildTaskQueueExecutor distributedBuildTaskQueueExecutor )
+    {
+        this.distributedBuildTaskQueueExecutor = distributedBuildTaskQueueExecutor;
+    }
+}

Propchange: continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/taskqueue/DefaultOverallDistributedBuildQueue.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/taskqueue/DefaultOverallDistributedBuildQueue.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java?rev=775729&r1=775728&r2=775729&view=diff
==============================================================================
--- continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java (original)
+++ continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java Sun May 17 18:21:35 2009
@@ -37,6 +37,8 @@
 
     public static final String KEY_BUILD_DEFINITION_ID = "builddefinition-id";
 
+    public static final String KEY_BUILD_DEFINITION_LABEL = "builddefinition-label";
+
     public static final String KEY_TRIGGER = "trigger";
 
     public static final String KEY_EXECUTOR_ID = "executor-id";
@@ -83,6 +85,8 @@
 
     public static final String KEY_SCM_ROOT_ADDRESS = "scm-root-address";
 
+    public static final String KEY_SCM_ROOT_ID = "scm-root-id";
+
     public static final String KEY_SCM_ERROR = "scm-error";
 
     public static final String KEY_PROJECT_NAME = "project-name";
@@ -489,6 +493,16 @@
         return getString( context, KEY_BUILD_AGENT_URL );
     }
 
+    public static int getScmRootId( Map<String, Object> context )
+    {
+        return getInteger( context, KEY_SCM_ROOT_ID );
+    }
+
+    public static String getBuildDefinitionLabel( Map<String, Object> context )
+    {
+        return getString( context, KEY_BUILD_DEFINITION_LABEL, "" );
+    }
+
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------

Modified: continuum/trunk/continuum-builder/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-builder/src/main/resources/META-INF/plexus/components.xml?rev=775729&r1=775728&r2=775729&view=diff
==============================================================================
--- continuum/trunk/continuum-builder/src/main/resources/META-INF/plexus/components.xml (original)
+++ continuum/trunk/continuum-builder/src/main/resources/META-INF/plexus/components.xml Sun May 17 18:21:35 2009
@@ -31,102 +31,10 @@
       <role-hint>distributed-build-project</role-hint>
       <implementation>org.codehaus.plexus.taskqueue.DefaultTaskQueue</implementation>
       <lifecycle-handler>plexus-configurable</lifecycle-handler>
-    </component>
-
-    <component>
-      <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
-      <role-hint>distributed-build-project-deferred</role-hint>
-      <implementation>org.codehaus.plexus.taskqueue.DefaultTaskQueue</implementation>
-      <lifecycle-handler>plexus-configurable</lifecycle-handler>
-    </component>
-
-    <component>
-      <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
-      <role-hint>distributed-build-project-per-agent</role-hint>
-      <implementation>org.codehaus.plexus.taskqueue.DefaultTaskQueue</implementation>
-      <lifecycle-handler>plexus-configurable</lifecycle-handler>
       <instantiation-strategy>per-lookup</instantiation-strategy>
     </component>
 
     <component>
-      <role>org.codehaus.plexus.taskqueue.execution.TaskExecutor</role>
-      <role-hint>distributed-build-project-overall</role-hint>
-      <implementation>org.apache.continuum.builder.distributed.executor.overall.DistributedBuildProjectTaskExecutorOverall</implementation>
-      <requirements>
-        <requirement>
-          <role>org.apache.maven.continuum.configuration.ConfigurationService</role>
-          <role-hint>default</role-hint>
-        </requirement>
-        <requirement>
-          <role>org.apache.continuum.dao.ProjectDao</role>
-        </requirement>
-        <requirement>
-          <role>org.apache.continuum.dao.BuildDefinitionDao</role>
-        </requirement>
-        <requirement>
-          <role>org.apache.continuum.builder.distributed.manager.DistributedBuildManager</role>
-        </requirement>
-        <requirement>
-          <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
-          <role-hint>distributed-build-project-deferred</role-hint>
-          <field-name>deferredTaskQueue</field-name>
-        </requirement>
-      </requirements>
-    </component>
-
-    <component>
-      <role>org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor</role>
-      <role-hint>distributed-build-project-overall</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>distributed-build-project-overall</role-hint>
-        </requirement>
-        <requirement>
-          <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
-          <role-hint>distributed-build-project</role-hint>
-        </requirement>
-      </requirements>
-      <configuration>
-        <name>distributed-build-project-overall</name>
-      </configuration>
-    </component>
-
-    <component>
-      <role>org.codehaus.plexus.taskqueue.execution.TaskExecutor</role>
-      <role-hint>distributed-build-project-deferred</role-hint>
-      <implementation>org.apache.continuum.builder.distributed.executor.deferred.DistributedBuildProjectTaskExecutorDeferred</implementation>
-      <requirements>
-        <requirement>
-          <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
-          <role-hint>distributed-build-project</role-hint>
-        </requirement>
-      </requirements>
-    </component>
-
-    <component>
-      <role>org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor</role>
-      <role-hint>distributed-build-project-deferred</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>distributed-build-project-deferred</role-hint>
-        </requirement>
-        <requirement>
-          <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
-          <role-hint>distributed-build-project-deferred</role-hint>
-        </requirement>
-      </requirements>
-      <configuration>
-        <name>distributed-build-project-deferred</name>
-      </configuration>
-    </component>    
-
-    <component>
       <role>org.apache.continuum.builder.distributed.executor.DistributedBuildTaskExecutor</role>
       <role-hint>distributed-build-project</role-hint>
       <implementation>org.apache.continuum.builder.distributed.executor.DistributedBuildProjectTaskExecutor</implementation>
@@ -155,7 +63,7 @@
 	  <requirements>
         <requirement>
           <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
-          <role-hint>distributed-build-project-per-agent</role-hint>
+          <role-hint>distributed-build-project</role-hint>
         </requirement>
         <requirement>
           <role>org.apache.continuum.builder.distributed.executor.DistributedBuildTaskExecutor</role>

Added: continuum/trunk/continuum-builder/src/main/resources/META-INF/spring-context.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-builder/src/main/resources/META-INF/spring-context.xml?rev=775729&view=auto
==============================================================================
--- continuum/trunk/continuum-builder/src/main/resources/META-INF/spring-context.xml (added)
+++ continuum/trunk/continuum-builder/src/main/resources/META-INF/spring-context.xml Sun May 17 18:21:35 2009
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:aop="http://www.springframework.org/schema/aop"
+	xmlns:util="http://www.springframework.org/schema/util"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+		http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
+		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
+
+  <bean name="overallDistributedBuildQueue" 
+  		class="org.apache.continuum.builder.distributed.taskqueue.DefaultOverallDistributedBuildQueue" scope="prototype" autowire="byName">
+     <property name="distributedBuildTaskQueueExecutor" ref="distributedBuildTaskQueueExecutor#distributed-build-project"/>
+  </bean>
+</beans>
\ No newline at end of file

Propchange: continuum/trunk/continuum-builder/src/main/resources/META-INF/spring-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/trunk/continuum-builder/src/main/resources/META-INF/spring-context.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



Mime
View raw message