continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r775693 [4/5] - in /continuum/branches/continuum-1.3.x: 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/apac...
Date Sun, 17 May 2009 16:14:24 GMT
Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java Sun May 17 16:14:22 2009
@@ -31,6 +31,7 @@
 import org.apache.continuum.buildqueue.BuildQueueService;
 import org.apache.continuum.buildqueue.BuildQueueServiceException;
 import org.apache.continuum.dao.BuildDefinitionDao;
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.CheckOutTask;
 import org.apache.continuum.taskqueue.OverallBuildQueue;
@@ -80,6 +81,9 @@
     @Resource
     private BuildDefinitionDao buildDefinitionDao;
 
+    @Resource
+    private ProjectDao projectDao;
+
     private TaskQueue prepareBuildQueue;
 
     @Resource
@@ -91,10 +95,10 @@
     private PlexusContainer container;
 
     /**
-     * @see BuildsManager#buildProject(int, BuildDefinition, String, int, ScmResult)
+     * @see BuildsManager#buildProject(int, BuildDefinition, String, int, ScmResult, int)
      */
     public void buildProject( int projectId, BuildDefinition buildDefinition, String projectName, int trigger,
-                              ScmResult scmResult )
+                              ScmResult scmResult, int projectGroupId )
         throws BuildManagerException
     {
         try
@@ -111,8 +115,12 @@
                 "Error occurred while checking if the project is already in queue: " + e.getMessage() );
         }
 
-        OverallBuildQueue overallBuildQueue =
-            getOverallBuildQueue( BUILD_QUEUE, buildDefinition.getSchedule().getBuildQueues() );
+        OverallBuildQueue overallBuildQueue = getOverallBuildQueueWhereProjectsInGroupAreQueued( projectGroupId );
+
+        if ( overallBuildQueue == null )
+        {
+            overallBuildQueue = getOverallBuildQueue( BUILD_QUEUE, buildDefinition.getSchedule().getBuildQueues() );
+        }
 
         String buildDefinitionLabel = buildDefinition.getDescription();
         if ( StringUtils.isEmpty( buildDefinitionLabel ) )
@@ -122,7 +130,7 @@
 
         BuildProjectTask buildTask =
             new BuildProjectTask( projectId, buildDefinition.getId(), trigger, projectName, buildDefinitionLabel,
-                                  scmResult );
+                                  scmResult, projectGroupId );
         try
         {
             log.info(
@@ -136,10 +144,10 @@
     }
 
     /**
-     * @see BuildsManager#buildProjects(List, Map, int, Map)
+     * @see BuildsManager#buildProjects(List, Map, int, Map, int)
      */
     public void buildProjects( List<Project> projects, Map<Integer, BuildDefinition> projectsBuildDefinitionsMap,
-                               int trigger, Map<Integer, ScmResult> scmResultMap )
+                               int trigger, Map<Integer, ScmResult> scmResultMap, int projectGroupId )
         throws BuildManagerException
     {
         int firstProjectId = 0;
@@ -163,8 +171,12 @@
         if ( firstProjectId != 0 )
         {
             BuildDefinition buildDef = projectsBuildDefinitionsMap.get( firstProjectId );
-            OverallBuildQueue overallBuildQueue =
-                getOverallBuildQueue( BUILD_QUEUE, buildDef.getSchedule().getBuildQueues() );
+            OverallBuildQueue overallBuildQueue = getOverallBuildQueueWhereProjectsInGroupAreQueued( projectGroupId );
+
+            if ( overallBuildQueue == null )
+            {
+                overallBuildQueue = getOverallBuildQueue( BUILD_QUEUE, buildDef.getSchedule().getBuildQueues() );
+            }
 
             if ( overallBuildQueue != null )
             {
@@ -196,7 +208,7 @@
                     ScmResult scmResult = scmResultMap.get( project.getId() );
                     BuildProjectTask buildTask =
                         new BuildProjectTask( project.getId(), buildDefinition.getId(), trigger, project.getName(),
-                                              buildDefinitionLabel, scmResult );
+                                              buildDefinitionLabel, scmResult, projectGroupId );
                     buildTask.setMaxExecutionTime( buildDefinition.getSchedule().getMaxJobExecutionTime() * 1000 );
 
                     try
@@ -592,7 +604,8 @@
     /**
      * @see BuildsManager#removeProjectFromBuildQueue(int, int, int, String)
      */
-    public void removeProjectFromBuildQueue( int projectId, int buildDefinitionId, int trigger, String projectName )
+    public void removeProjectFromBuildQueue( int projectId, int buildDefinitionId, int trigger, String projectName,
+                                             int projectGroupId )
         throws BuildManagerException
     {
         try
@@ -600,7 +613,8 @@
             OverallBuildQueue overallBuildQueue = getOverallBuildQueueWhereProjectIsQueued( projectId, BUILD_QUEUE );
             if ( overallBuildQueue != null )
             {
-                overallBuildQueue.removeProjectFromBuildQueue( projectId, buildDefinitionId, trigger, projectName );
+                overallBuildQueue.removeProjectFromBuildQueue( projectId, buildDefinitionId, trigger, projectName,
+                                                               projectGroupId );
             }
             else
             {
@@ -859,7 +873,7 @@
                     buildDefinitionDao.getBuildDefinition( buildTask.getBuildDefinitionId() );
 
                 buildProject( buildTask.getProjectId(), buildDefinition, buildTask.getProjectName(),
-                              buildTask.getTrigger(), buildTask.getScmResult() );
+                              buildTask.getTrigger(), buildTask.getScmResult(), buildTask.getProjectGroupId() );
             }
             catch ( ContinuumStoreException e )
             {
@@ -1134,25 +1148,39 @@
                         if ( overallBuildQueue != null )
                         {
                             TaskQueue taskQueue = null;
+                            TaskQueueExecutor taskQueueExecutor = null;
+                            int tempSize = 0;
                             if ( typeOfQueue == BUILD_QUEUE )
                             {
                                 taskQueue = overallBuildQueue.getBuildQueue();
+                                taskQueueExecutor = overallBuildQueue.getBuildTaskQueueExecutor();
                             }
                             else if ( typeOfQueue == CHECKOUT_QUEUE )
                             {
                                 taskQueue = overallBuildQueue.getCheckoutQueue();
+                                taskQueueExecutor = overallBuildQueue.getCheckoutTaskQueueExecutor();
+                            }
+
+                            tempSize = taskQueue.getQueueSnapshot().size();
+                            if ( taskQueueExecutor.getCurrentTask() != null )
+                            {
+                                tempSize++;
                             }
 
                             if ( idx == 0 )
                             {
-                                size = taskQueue.getQueueSnapshot().size();
                                 whereToBeQueued = overallBuildQueue;
+                                size = tempSize;
                             }
 
-                            if ( taskQueue.getQueueSnapshot().size() < size )
+                            if ( tempSize < size )
                             {
                                 whereToBeQueued = overallBuildQueue;
                                 size = taskQueue.getQueueSnapshot().size();
+                                if ( taskQueueExecutor.getCurrentTask() != null )
+                                {
+                                    size++;
+                                }
                             }
 
                             idx++;
@@ -1192,6 +1220,63 @@
         return whereToBeQueued;
     }
 
+    public OverallBuildQueue getOverallBuildQueueWhereProjectsInGroupAreQueued( int projectGroupId )
+        throws BuildManagerException
+    {
+        OverallBuildQueue whereToBeQueued = null;
+
+        try
+        {
+            List<Project> projects = projectDao.getProjectsInGroup( projectGroupId );
+
+            if ( projects != null )
+            {
+                for ( Project project : projects )
+                {
+                    whereToBeQueued = getOverallBuildQueueWhereProjectIsQueued( project.getId(), BUILD_QUEUE );
+
+                    if ( whereToBeQueued == null )
+                    {
+                        whereToBeQueued = getOverallBuildQueueWhereProjectIsBuilding( project.getId() );
+                    }
+
+                    if ( whereToBeQueued != null )
+                    {
+                        break;
+                    }
+                }
+            }
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw new BuildManagerException( "Error while retrieving overall build queue for project: " + e.getMessage() );
+        }
+        catch ( TaskQueueException e )
+        {
+            throw new BuildManagerException( "Error while retrieving overall build queue for project: " + e.getMessage() );
+        }
+
+        return whereToBeQueued;
+    }
+
+    private OverallBuildQueue getOverallBuildQueueWhereProjectIsBuilding( int projectId )
+    {
+        synchronized ( overallBuildQueues )
+        {
+            for ( Integer key : overallBuildQueues.keySet() )
+            {
+                OverallBuildQueue overallBuildQueue = overallBuildQueues.get( key );
+                BuildProjectTask task =
+                    (BuildProjectTask) overallBuildQueue.getBuildTaskQueueExecutor().getCurrentTask();
+                if ( task != null && task.getProjectId() == projectId )
+                {
+                    return overallBuildQueue;
+                }
+            }
+            return null;
+        }
+    }
+
     public void contextualize( Context context )
         throws ContextException
     {
@@ -1272,4 +1357,9 @@
     {
         this.buildDefinitionDao = buildDefinitionDao;
     }
+
+    public void setProjectDao( ProjectDao projectDao )
+    {
+        this.projectDao = projectDao;
+    }
 }

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java Sun May 17 16:14:22 2009
@@ -323,9 +323,10 @@
     }
 
     /**
-     * @see OverallBuildQueue#removeProjectFromBuildQueue(int, int, int, String)
+     * @see OverallBuildQueue#removeProjectFromBuildQueue(int, int, int, String, int)
      */
-    public boolean removeProjectFromBuildQueue( int projectId, int buildDefinitionId, int trigger, String projectName )
+    public boolean removeProjectFromBuildQueue( int projectId, int buildDefinitionId, int trigger, String projectName,
+                                                int projectGroupId )
         throws TaskQueueException
     {
         BuildDefinition buildDefinition;
@@ -347,7 +348,8 @@
         }
 
         BuildProjectTask buildProjectTask =
-            new BuildProjectTask( projectId, buildDefinitionId, trigger, projectName, buildDefinitionLabel, null );
+            new BuildProjectTask( projectId, buildDefinitionId, trigger, projectName, 
+                                  buildDefinitionLabel, null, projectGroupId );
 
         return getBuildQueue().remove( buildProjectTask );
     }

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Sun May 17 16:14:22 2009
@@ -901,6 +901,7 @@
         }
 
         Map<ProjectScmRoot, Map<Integer, Integer>> map = new HashMap<ProjectScmRoot, Map<Integer, Integer>>();
+        List<ProjectScmRoot> sortedScmRoot = new ArrayList<ProjectScmRoot>();
 
         for ( Project project : projectsList )
         {
@@ -929,6 +930,11 @@
                             projectsAndBuildDefinitionsMap.put( project.getId(), buildDefId );
 
                             map.put( scmRoot, projectsAndBuildDefinitionsMap );
+
+                            if ( !sortedScmRoot.contains( scmRoot ) )
+                            {
+                                sortedScmRoot.add( scmRoot );
+                            }
                         }
                     }
                     catch ( BuildManagerException e )
@@ -939,7 +945,7 @@
             }
         }
 
-        prepareBuildProjects( map, ContinuumProjectState.TRIGGER_SCHEDULED );
+        prepareBuildProjects( map, ContinuumProjectState.TRIGGER_SCHEDULED, sortedScmRoot );
     }
 
     public void buildProject( int projectId )
@@ -3231,6 +3237,7 @@
         throws ContinuumException
     {
         Map<ProjectScmRoot, Map<Integer, Integer>> map = new HashMap<ProjectScmRoot, Map<Integer, Integer>>();
+        List<ProjectScmRoot> sortedScmRoot = new ArrayList<ProjectScmRoot>();
 
         for ( Project project : projects )
         {
@@ -3313,15 +3320,21 @@
             projectsAndBuildDefinitionsMap.put( projectId, buildDefId );
 
             map.put( scmRoot, projectsAndBuildDefinitionsMap );
+
+            if ( !sortedScmRoot.contains( scmRoot ) )
+            {
+                sortedScmRoot.add( scmRoot );
+            }
         }
 
-        prepareBuildProjects( map, trigger );
+        prepareBuildProjects( map, trigger, sortedScmRoot );
     }
 
     private void prepareBuildProjects( Collection<Project> projects, int buildDefinitionId, int trigger )
         throws ContinuumException
     {
         Map<ProjectScmRoot, Map<Integer, Integer>> map = new HashMap<ProjectScmRoot, Map<Integer, Integer>>();
+        List<ProjectScmRoot> sortedScmRoot = new ArrayList<ProjectScmRoot>();
 
         for ( Project project : projects )
         {
@@ -3353,6 +3366,11 @@
                 projectsAndBuildDefinitionsMap.put( projectId, buildDefinitionId );
 
                 map.put( scmRoot, projectsAndBuildDefinitionsMap );
+
+                if ( !sortedScmRoot.contains( scmRoot ) )
+                {
+                    sortedScmRoot.add( scmRoot );
+                }
             }
             catch ( BuildManagerException e )
             {
@@ -3360,13 +3378,14 @@
             }
         }
 
-        prepareBuildProjects( map, trigger );
+        prepareBuildProjects( map, trigger, sortedScmRoot );
     }
 
-    private void prepareBuildProjects( Map<ProjectScmRoot, Map<Integer, Integer>> map, int trigger )
+    private void prepareBuildProjects( Map<ProjectScmRoot, Map<Integer, Integer>> map, int trigger,
+                                       List<ProjectScmRoot> scmRoots )
         throws ContinuumException
     {
-        for ( ProjectScmRoot scmRoot : map.keySet() )
+        for ( ProjectScmRoot scmRoot : scmRoots )
         {
             prepareBuildProjects( map.get( scmRoot ), trigger, scmRoot.getScmRootAddress(),
                                   scmRoot.getProjectGroup().getId(), scmRoot.getId() );
@@ -3383,14 +3402,8 @@
         {
             if ( configurationService.isDistributedBuildEnabled() )
             {
-                if ( !taskQueueManager.isInDistributedBuildQueue( projectGroupId, scmRootAddress ) )
-                {
-                    PrepareBuildProjectsTask task =
-                        new PrepareBuildProjectsTask( projectsBuildDefinitionsMap, trigger, projectGroupId,
-                                                      group.getName(), scmRootAddress, scmRootId );
-
-                    taskQueueManager.getDistributedBuildQueue().put( task );
-                }
+                distributedBuildManager.prepareBuildProjects( projectsBuildDefinitionsMap, trigger, projectGroupId, 
+                                                              group.getName(), scmRootAddress, scmRootId );
             }
             else
             {
@@ -3398,14 +3411,6 @@
                                                             group.getName(), scmRootAddress, scmRootId );
             }
         }
-        catch ( TaskQueueManagerException e )
-        {
-            throw logAndCreateException( e.getMessage(), e );
-        }
-        catch ( TaskQueueException e )
-        {
-            throw logAndCreateException( "Error while creating enqueuing object.", e );
-        }
         catch ( BuildManagerException e )
         {
             throw logAndCreateException( "Error while creating enqueuing object.", e );

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java Sun May 17 16:14:22 2009
@@ -65,6 +65,7 @@
         Map<Integer, ScmResult> scmResultMap = AbstractContinuumAction.getScmResultMap( context );
         List<Project> projectsToBeBuilt = new ArrayList<Project>();
         int trigger = AbstractContinuumAction.getTrigger( context );
+        int projectGroupId = AbstractContinuumAction.getProjectGroupId( context );
 
         // update state of each project first
         for ( Project project : projects )
@@ -127,6 +128,7 @@
             }
         }
 
-        parallelBuildsManager.buildProjects( projectsToBeBuilt, projectsBuildDefinitionsMap, trigger, scmResultMap );
+        parallelBuildsManager.buildProjects( projectsToBeBuilt, projectsBuildDefinitionsMap, 
+                                             trigger, scmResultMap, projectGroupId );
     }
 }

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java Sun May 17 16:14:22 2009
@@ -562,6 +562,7 @@
             AbstractContinuumAction.setProjectsBuildDefinitionsMap( context, projectsBuildDefinitionsMap );
             AbstractContinuumAction.setTrigger( context, trigger );
             AbstractContinuumAction.setScmResultMap( context, scmResultMap );
+            AbstractContinuumAction.setProjectGroupId( context, projectGroupId );
 
             log.info( "Performing action create-build-project-task" );
             actionManager.lookup( "create-build-project-task" ).execute( context );

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/continuum/buildmanager/ParallelBuildsManagerTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/continuum/buildmanager/ParallelBuildsManagerTest.java?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/continuum/buildmanager/ParallelBuildsManagerTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/continuum/buildmanager/ParallelBuildsManagerTest.java Sun May 17 16:14:22 2009
@@ -28,6 +28,7 @@
 
 import org.apache.continuum.buildqueue.BuildQueueService;
 import org.apache.continuum.dao.BuildDefinitionDao;
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.CheckOutTask;
 import org.apache.continuum.taskqueue.OverallBuildQueue;
@@ -35,7 +36,9 @@
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildQueue;
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.Schedule;
+import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 import org.codehaus.plexus.taskqueue.Task;
 import org.codehaus.plexus.taskqueue.TaskQueue;
@@ -60,6 +63,8 @@
 
     private BuildDefinitionDao buildDefinitionDao;
 
+    private ProjectDao projectDao;
+
     private ConfigurationService configurationService;
 
     private OverallBuildQueue overallBuildQueue;
@@ -68,6 +73,8 @@
 
     private TaskQueue checkoutQueue;
 
+    private List<Project> projects;
+
     @Override
     public void setUp()
         throws Exception
@@ -98,6 +105,10 @@
         buildQueue = context.mock( TaskQueue.class, "build-queue" );
 
         checkoutQueue = context.mock( TaskQueue.class, "checkout-queue" );
+
+        projectDao = context.mock( ProjectDao.class );
+
+        buildsManager.setProjectDao( projectDao );
     }
 
     @Override
@@ -159,7 +170,7 @@
 
     // build project recordings
     private void recordStartOfBuildProjectSequence()
-        throws TaskQueueException
+        throws TaskQueueException, ContinuumStoreException
     {
         context.checking( new Expectations()
         {
@@ -167,6 +178,9 @@
                 exactly( 5 ).of( overallBuildQueue ).isInBuildQueue( with( any( int.class ) ) );
                 will( returnValue( false ) );
 
+                one( projectDao ).getProjectsInGroup( with( any( int.class ) ) );
+                will( returnValue( projects ) );
+
                 one( configurationService ).getNumberOfBuildsInParallel();
                 will( returnValue( 2 ) );
 
@@ -176,7 +190,7 @@
     }
 
     private void recordBuildProjectBuildQueuesAreEmpty()
-        throws TaskQueueException
+        throws TaskQueueException, ContinuumStoreException
     {
         // shouldn't only the build queues attached to the schedule be checked?
         recordStartOfBuildProjectSequence();
@@ -276,7 +290,7 @@
 
         recordBuildProjectBuildQueuesAreEmpty();
 
-        buildsManager.buildProject( 1, buildDef, "continuum-project-test-1", 1, null );
+        buildsManager.buildProject( 1, buildDef, "continuum-project-test-1", 1, null, 1 );
 
         context.assertIsSatisfied();
     }
@@ -292,7 +306,7 @@
 
         recordBuildProjectBuildQueuesAreEmpty();
 
-        buildsManager.buildProject( 1, buildDef, "continuum-project-test-1", 1, null );
+        buildsManager.buildProject( 1, buildDef, "continuum-project-test-1", 1, null, 1 );
         context.assertIsSatisfied();
 
         //queue second project - 1st queue is not empty, 2nd queue is empty 
@@ -302,7 +316,7 @@
         final List<Task> tasks = new ArrayList<Task>();
         final List<Task> tasksOfFirstBuildQueue = new ArrayList<Task>();
         tasksOfFirstBuildQueue.add(
-            new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", buildDef.getDescription(), null ) );
+            new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", buildDef.getDescription(), null, 2 ) );
         context.checking( new Expectations()
         {
             {
@@ -319,7 +333,7 @@
 
         recordAddToBuildQueue();
 
-        buildsManager.buildProject( 2, buildDef, "continuum-project-test-2", 1, null );
+        buildsManager.buildProject( 2, buildDef, "continuum-project-test-2", 1, null, 2 );
         context.assertIsSatisfied();
 
         // queue third project - both queues have 1 task queued each
@@ -338,7 +352,7 @@
 
         recordAddToBuildQueue();
 
-        buildsManager.buildProject( 3, buildDef, "continuum-project-test-3", 1, null );
+        buildsManager.buildProject( 3, buildDef, "continuum-project-test-3", 1, null, 3 );
         context.assertIsSatisfied();
     }
 
@@ -558,7 +572,7 @@
             context.mock( TaskQueueExecutor.class, "checkout-queue-executor" );
 
         final List<Task> buildTasks = new ArrayList<Task>();
-        buildTasks.add( new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null ) );
+        buildTasks.add( new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null, 2 ) );
 
         final List<CheckOutTask> checkoutTasks = new ArrayList<CheckOutTask>();
         checkoutTasks.add(
@@ -626,6 +640,9 @@
                 exactly( 4 ).of( overallBuildQueue ).isInBuildQueue( with( any( int.class ) ) );
                 will( returnValue( false ) );
 
+                one( projectDao ).getProjectsInGroup( with( any( int.class ) ) );
+                will( returnValue( projects ) );
+
                 one( configurationService ).getNumberOfBuildsInParallel();
                 will( returnValue( 2 ) );
 
@@ -680,10 +697,10 @@
         buildDef.setSchedule( getSchedule( 1, 1, 2 ) );
 
         final TaskQueueExecutor buildQueueExecutor = context.mock( TaskQueueExecutor.class, "build-queue-executor" );
-        final Task buildTask = new BuildProjectTask( 1, 1, 1, "continuum-project-test-1", "BUILD_DEF", null );
+        final Task buildTask = new BuildProjectTask( 1, 1, 1, "continuum-project-test-1", "BUILD_DEF", null, 1 );
 
         final List<BuildProjectTask> buildTasks = new ArrayList<BuildProjectTask>();
-        buildTasks.add( new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null ) );
+        buildTasks.add( new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null, 2 ) );
 
         final List<CheckOutTask> checkoutTasks = new ArrayList<CheckOutTask>();
         checkoutTasks.add(
@@ -743,6 +760,9 @@
                 one( overallBuildQueue ).isInBuildQueue( with( any( int.class ) ) );
                 will( returnValue( false ) );
 
+                one( projectDao ).getProjectsInGroup( with( any( int.class ) ) );
+                will( returnValue( projects ) );
+
                 one( configurationService ).getNumberOfBuildsInParallel();
                 will( returnValue( 2 ) );
 
@@ -752,7 +772,7 @@
                 one( overallBuildQueue ).addToBuildQueue( with( any( BuildProjectTask.class ) ) );
             }} );
 
-        buildsManager.buildProject( 1, buildDef, "continuum-project-test-1", 1, null );
+        buildsManager.buildProject( 1, buildDef, "continuum-project-test-1", 1, null, 1 );
         context.assertIsSatisfied();
     }
 
@@ -762,7 +782,7 @@
         setupMockOverallBuildQueues();
 
         final List<Task> tasks = new ArrayList<Task>();
-        tasks.add( new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null ) );
+        tasks.add( new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null, 2  ) );
 
         context.checking( new Expectations()
         {

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueueTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueueTest.java?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueueTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueueTest.java Sun May 17 16:14:22 2009
@@ -184,7 +184,7 @@
         throws Exception
     {
         final BuildProjectTask buildTask =
-            new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null );
+            new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null, 2 );
         final TaskQueue buildQueue = context.mock( TaskQueue.class, "build-queue" );
 
         context.checking( new Expectations()
@@ -205,7 +205,7 @@
     {
         final TaskQueue buildQueue = context.mock( TaskQueue.class, "build-queue" );
         final List<Task> tasks = new ArrayList<Task>();
-        tasks.add( new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null ) );
+        tasks.add( new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null, 2 ) );
 
         context.checking( new Expectations()
         {
@@ -229,7 +229,7 @@
     {
         final TaskQueue buildQueue = context.mock( TaskQueue.class, "build-queue" );
         final List<Task> tasks = new ArrayList<Task>();
-        tasks.add( new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null ) );
+        tasks.add( new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null, 2 ) );
 
         context.checking( new Expectations()
         {
@@ -248,7 +248,7 @@
     public void testCancelBuildTask()
         throws Exception
     {
-        final Task buildTask = new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null );
+        final Task buildTask = new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null, 2 );
 
         context.checking( new Expectations()
         {
@@ -266,7 +266,7 @@
     public void testCancelCurrentBuild()
         throws Exception
     {
-        final Task buildTask = new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null );
+        final Task buildTask = new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null, 2 );
 
         context.checking( new Expectations()
         {
@@ -302,14 +302,14 @@
                 one( buildQueue ).remove( with( any( Task.class ) ) );
             }} );
 
-        overallQueue.removeProjectFromBuildQueue( 1, 1, 1, "continuum-project-test-1" );
+        overallQueue.removeProjectFromBuildQueue( 1, 1, 1, "continuum-project-test-1", 1 );
         context.assertIsSatisfied();
     }
 
     public void testRemoveProjectFromBuildQueue()
         throws Exception
     {
-        final Task buildTask = new BuildProjectTask( 1, 1, 1, "continuum-project-test-2", "BUILD_DEF", null );
+        final Task buildTask = new BuildProjectTask( 1, 1, 1, "continuum-project-test-2", "BUILD_DEF", null, 1 );
 
         final TaskQueue buildQueue = context.mock( TaskQueue.class, "build-queue" );
         final List<Task> tasks = new ArrayList<Task>();

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java Sun May 17 16:14:22 2009
@@ -246,7 +246,7 @@
         // projectGroup = continuumStore.addProjectGroup( projectGroup );
 
         BuildProjectTask task = new BuildProjectTask( project.getId(), buildDefinition.getId(), 0, project.getName(),
-                                                      buildDefinition.getDescription(), null );
+                                                      buildDefinition.getDescription(), null, projectGroupId );
 
         task.setMaxExecutionTime( maxRunTime );
 

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java Sun May 17 16:14:22 2009
@@ -22,6 +22,7 @@
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.maven.continuum.AbstractContinuumTest;
 import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.taskqueue.Task;
 import org.codehaus.plexus.taskqueue.TaskQueue;
@@ -131,7 +132,8 @@
     private void buildProject( int projectId, int trigger )
         throws Exception
     {
-        buildQueue.put( new BuildProjectTask( projectId, 0, trigger, null, null, null ) );
+        ProjectGroup group = getDefaultProjectGroup();
+        buildQueue.put( new BuildProjectTask( projectId, 0, trigger, null, null, null, group.getId() ) );
     }
 
     private void assertNextBuildIs( int expectedProjectId )

Modified: continuum/branches/continuum-1.3.x/continuum-distributed/continuum-distributed-master/continuum-distributed-master-server/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportServer.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-distributed/continuum-distributed-master/continuum-distributed-master-server/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportServer.java?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-distributed/continuum-distributed-master/continuum-distributed-master-server/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportServer.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-distributed/continuum-distributed-master/continuum-distributed-master-server/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportServer.java Sun May 17 16:14:22 2009
@@ -21,7 +21,7 @@
 
 import java.util.Map;
 
-import org.apache.continuum.builder.distributed.manager.DistributedBuildManager;
+import org.apache.continuum.builder.distributed.DistributedBuildService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -33,18 +33,18 @@
 {
     private static final Logger log = LoggerFactory.getLogger( MasterBuildAgentTransportServer.class );
 
-    private final DistributedBuildManager distributedBuildManager;
+    private final DistributedBuildService distributedBuildService;
 
-    public MasterBuildAgentTransportServer( DistributedBuildManager distributedBuildManager )
+    public MasterBuildAgentTransportServer( DistributedBuildService distributedBuildService )
     {
-        this.distributedBuildManager = distributedBuildManager;
+        this.distributedBuildService = distributedBuildService;
     }
 
     public Boolean returnBuildResult( Map<String, Object> buildResult )
         throws Exception
     {
         log.info( "Build result returned." );
-        distributedBuildManager.updateBuildResult( buildResult );
+        distributedBuildService.updateBuildResult( buildResult );
         return Boolean.TRUE;
     }
 
@@ -60,7 +60,7 @@
         throws Exception
     {
         log.info( "Prepare build finished." );
-        distributedBuildManager.prepareBuildFinished( prepareBuildResult );
+        distributedBuildService.prepareBuildFinished( prepareBuildResult );
         return Boolean.TRUE;
     }
 
@@ -68,7 +68,7 @@
         throws Exception
     {
         log.info( "Start project build." );
-        distributedBuildManager.startProjectBuild( projectId );
+        distributedBuildService.startProjectBuild( projectId );
         return Boolean.TRUE;
     }
 
@@ -76,7 +76,7 @@
         throws Exception
     {
         log.info( "Start prepare build." );
-        distributedBuildManager.startPrepareBuild( prepareBuildResult );
+        distributedBuildService.startPrepareBuild( prepareBuildResult );
         return Boolean.TRUE;
     }
 
@@ -84,14 +84,14 @@
         throws Exception
     {
         log.info( "Retrieving environments" );
-        return distributedBuildManager.getEnvironments( buildDefinitionId, installationType );
+        return distributedBuildService.getEnvironments( buildDefinitionId, installationType );
     }
 
     public Boolean updateProject( Map<String, Object> project )
         throws Exception
     {
         log.info( "Start updating project" );
-        distributedBuildManager.updateProject( project );
+        distributedBuildService.updateProject( project );
         return Boolean.TRUE;
     }
 
@@ -99,6 +99,6 @@
         throws Exception
     {
         log.info( "Checking if project should build" );
-        return distributedBuildManager.shouldBuild( context );
+        return distributedBuildService.shouldBuild( context );
     }
 }

Modified: continuum/branches/continuum-1.3.x/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java Sun May 17 16:14:22 2009
@@ -36,7 +36,7 @@
     public Map<String, Object> getBuildResult( int projectId )
         throws Exception;
 
-    public Integer getProjectCurrentlyBuilding()
+    public Map<String, Object> getProjectCurrentlyBuilding()
         throws Exception;
 
     public List<Map<String, String>> getAvailableInstallations()
@@ -90,4 +90,19 @@
 
     public Boolean releaseRollback( String releaseId, int projectId )
         throws Exception;
+
+    public Integer getBuildSizeOfAgent()
+        throws Exception;
+
+    public List<Map<String, Object>> getProjectsInPrepareBuildQueue()
+        throws Exception;
+
+    public List<Map<String, Object>> getProjectsInBuildQueue()
+        throws Exception;
+
+    public Map<String, Object> getProjectCurrentlyPreparingBuild()
+        throws Exception;
+
+    public Boolean isProjectGroupInQueue( int projectGroupId )
+        throws Exception;
 }

Modified: continuum/branches/continuum-1.3.x/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java Sun May 17 16:14:22 2009
@@ -125,15 +125,15 @@
         return buildResult;
     }
 
-    public Integer getProjectCurrentlyBuilding()
+    public Map<String, Object> getProjectCurrentlyBuilding()
         throws Exception
     {
-        Integer projectId;
+        Map map;
 
         try
         {
-            projectId = slave.getProjectCurrentlyBuilding();
-            log.info( "Currently building project " + projectId );
+            map = slave.getProjectCurrentlyBuilding();
+            log.info( "Retrieving currently building project" );
         }
         catch ( Exception e )
         {
@@ -141,7 +141,7 @@
             throw new Exception( "Failed to get the currently building project", e );
         }
 
-        return projectId;
+        return map;
     }
 
     public Boolean ping()
@@ -436,4 +436,99 @@
 
         return result;
     }
+
+    public Integer getBuildSizeOfAgent()
+        throws Exception
+    {
+        Integer size;
+
+        try
+        {
+            size = slave.getBuildSizeOfAgent();
+            log.info( "Retrieving build size of agent" );
+        }
+        catch ( Exception e )
+        {
+            log.error( "Failed to retrieve build size of agent", e );
+            throw new Exception( "Failed to retrieve build size of agent", e );
+        }
+
+        return size;
+    }
+
+    public Map<String, Object> getProjectCurrentlyPreparingBuild()
+        throws Exception
+    {
+        Map<String, Object> projects;
+
+        try
+        {
+            projects = slave.getProjectCurrentlyPreparingBuild();
+            log.info( "Retrieving projects currently preparing build" );
+        }
+        catch ( Exception e )
+        {
+            log.error( "Failed to retrieve projects currently preparing build", e );
+            throw new Exception( "Failed to retrieve projects currently preparing build", e );
+        }
+
+        return projects;
+    }
+
+    public List<Map<String, Object>> getProjectsInBuildQueue()
+        throws Exception
+    {
+        List<Map<String, Object>> projects;
+
+        try
+        {
+            projects = slave.getProjectsInBuildQueue();
+            log.info( "Retrieving projects in build queue" );
+        }
+        catch ( Exception e )
+        {
+            log.error( "Failed to retrieve projects in build queue", e );
+            throw new Exception( "Failed to retrieve projects in build queue", e );
+        }
+
+        return projects;
+    }
+
+    public List<Map<String, Object>> getProjectsInPrepareBuildQueue()
+        throws Exception
+    {
+        List<Map<String, Object>> projects;
+
+        try
+        {
+            projects = slave.getProjectsInPrepareBuildQueue();
+            log.info( "Retrieving projects in prepare build queue" );
+        }
+        catch ( Exception e )
+        {
+            log.error( "Failed to retrieve projects in prepare build queue", e );
+            throw new Exception( "Failed to retrieve projects in prepare build queue", e );
+        }
+
+        return projects;
+    }
+
+    public Boolean isProjectGroupInQueue( int projectGroupId )
+        throws Exception
+    {
+        Boolean result;
+
+        try
+        {
+            result = slave.isProjectGroupInQueue( projectGroupId );
+            log.info( "Checking if project group is in queue" );
+        }
+        catch ( Exception e )
+        {
+            log.error( "Failed to check if project group is in queue", e );
+            throw new Exception( "Failed to check if project group is in queue", e );
+        }
+
+        return result;
+    }
 }

Modified: continuum/branches/continuum-1.3.x/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java Sun May 17 16:14:22 2009
@@ -101,14 +101,14 @@
         return buildResult;
     }
 
-    public Integer getProjectCurrentlyBuilding()
+    public Map<String, Object> getProjectCurrentlyBuilding()
         throws Exception
     {
-        Integer projectId = continuumBuildAgentService.getProjectCurrentlyBuilding();
+        Map<String, Object> project = continuumBuildAgentService.getProjectCurrentlyBuilding();
 
-        log.info( "Currently building project " + projectId );
+        log.info( "Retrieving currently building project");
 
-        return projectId;
+        return project;
     }
 
     public Boolean ping()
@@ -343,4 +343,66 @@
 
         return result;
     }
+
+    public Integer getBuildSizeOfAgent()
+        throws Exception
+    {
+        try
+        {
+            return continuumBuildAgentService.getBuildSizeOfAgent();
+        }
+        catch ( ContinuumBuildAgentException e )
+        {
+            log.error( "Failed to retrieve build size of agent", e );
+            throw e;
+        }
+    }
+
+    public Map<String, Object> getProjectCurrentlyPreparingBuild()
+        throws Exception
+    {
+        try
+        {
+            return continuumBuildAgentService.getProjectCurrentlyPreparingBuild();
+        }
+        catch ( ContinuumBuildAgentException e )
+        {
+            log.error( "Failed to retrieve projects currently preparing build", e );
+            throw e;
+        }
+    }
+
+    public List<Map<String, Object>> getProjectsInBuildQueue()
+        throws Exception
+    {
+        try
+        {
+            return continuumBuildAgentService.getProjectsInBuildQueue();
+        }
+        catch ( ContinuumBuildAgentException e )
+        {
+            log.error( "Failed to retrieve projects in build queue", e );
+            throw e;
+        }
+    }
+
+    public List<Map<String, Object>> getProjectsInPrepareBuildQueue()
+        throws Exception
+    {
+        try
+        {
+            return continuumBuildAgentService.getProjectsInPrepareBuildQueue();
+        }
+        catch ( ContinuumBuildAgentException e )
+        {
+            log.error( "Failed to retrieve projects in prepare build queue", e );
+            throw e;
+        }
+    }
+
+    public Boolean isProjectGroupInQueue( int projectGroupId )
+        throws Exception
+    {
+        return continuumBuildAgentService.isProjectGroupInQueue( projectGroupId );
+    }
 }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java Sun May 17 16:14:22 2009
@@ -52,11 +52,6 @@
 {
     private static final Logger logger = LoggerFactory.getLogger( BuildAgentAction.class );
 
-    /**
-     * @plexus.requirement
-     */
-    private DistributedBuildManager distributedBuildManager;
-
     private List<BuildAgentConfiguration> buildAgents;
 
     private BuildAgentConfiguration buildAgent;
@@ -139,7 +134,7 @@
 
                 try
                 {
-                    installations = distributedBuildManager.getAvailableInstallations( buildAgent.getUrl() );
+                    installations = getContinuum().getDistributedBuildManager().getAvailableInstallations( buildAgent.getUrl() );
                 }
                 catch ( ContinuumException e )
                 {
@@ -188,7 +183,7 @@
             }
         }
 
-        distributedBuildManager.reload();
+        getContinuum().getDistributedBuildManager().reload();
 
         return SUCCESS;
     }
@@ -201,33 +196,39 @@
             return CONFIRM;
         }
 
-        if ( distributedBuildManager.isBuildAgentBusy( buildAgent.getUrl() ) )
+        if ( getContinuum().getDistributedBuildManager().isBuildAgentBusy( buildAgent.getUrl() ) )
         {
             message = getText( "buildAgent.error.delete.busy" );
             return ERROR;
         }
         else
         {
-            distributedBuildManager.removeAgentFromTaskQueueExecutor( buildAgent.getUrl() );
+            getContinuum().getDistributedBuildManager().removeDistributedBuildQueueOfAgent( buildAgent.getUrl() );
         }
 
         ConfigurationService configuration = getContinuum().getConfiguration();
 
-        for ( BuildAgentGroupConfiguration buildAgentGroup : configuration.getBuildAgentGroups() )
-        {
-            if ( configuration.containsBuildAgentUrl( buildAgent.getUrl(), buildAgentGroup ) )
+        if ( configuration.getBuildAgentGroups() != null )
+        {   
+            for ( BuildAgentGroupConfiguration buildAgentGroup : configuration.getBuildAgentGroups() )
             {
-                message = getText( "buildAgent.error.remove.in.use" );
-                return ERROR;
+                if ( configuration.containsBuildAgentUrl( buildAgent.getUrl(), buildAgentGroup ) )
+                {
+                    message = getText( "buildAgent.error.remove.in.use" );
+                    return ERROR;
+                }
             }
         }
 
-        for ( BuildAgentConfiguration agent : configuration.getBuildAgents() )
+        if ( configuration.getBuildAgents() != null )
         {
-            if ( buildAgent.getUrl().equals( agent.getUrl() ) )
+            for ( BuildAgentConfiguration agent : configuration.getBuildAgents() )
             {
-                configuration.removeBuildAgent( agent );
-                return SUCCESS;
+                if ( buildAgent.getUrl().equals( agent.getUrl() ) )
+                {
+                    configuration.removeBuildAgent( agent );
+                    return SUCCESS;
+                }
             }
         }
 
@@ -324,7 +325,7 @@
             }
         }
 
-        distributedBuildManager.reload();
+        getContinuum().getDistributedBuildManager().reload();
 
         return SUCCESS;
     }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java Sun May 17 16:14:22 2009
@@ -82,12 +82,5 @@
 
         DistributedBuildManager distributedBuildManager = (DistributedBuildManager) wac.getBean( PlexusToSpringUtils
             .buildSpringId( DistributedBuildManager.class ) );
-
-        TaskQueueExecutor distributedBuildProjectOverall = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
-            .buildSpringId( TaskQueueExecutor.class, "distributed-build-project-overall" ) );
-
-        TaskQueueExecutor distributedBuildProjectDeferred = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
-            .buildSpringId( TaskQueueExecutor.class, "distributed-build-project-deferred" ) );
     }
-
 }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java Sun May 17 16:14:22 2009
@@ -33,6 +33,7 @@
 import org.apache.continuum.taskqueue.CheckOutTask;
 import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
 import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
+import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.project.ContinuumProjectState;
@@ -43,6 +44,7 @@
 import org.apache.maven.continuum.web.exception.AuthenticationRequiredException;
 import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
 import org.apache.maven.continuum.web.model.DistributedBuildSummary;
+import org.apache.maven.continuum.web.model.DistributedPrepareBuildSummary;
 import org.codehaus.plexus.redback.rbac.Resource;
 import org.codehaus.plexus.taskqueue.TaskQueueException;
 import org.codehaus.redback.integration.interceptor.SecureAction;
@@ -85,23 +87,23 @@
 
     private List<CheckoutQueue> checkoutsInQueue = new ArrayList<CheckoutQueue>();
 
-    /**
-     * @plexus.requirement
-     */
-    DistributedBuildManager distributedBuildManager;
+    private List<DistributedPrepareBuildSummary> currentDistributedPrepareBuilds = new ArrayList<DistributedPrepareBuildSummary>();
 
-    private List<DistributedBuildSummary> distributedBuildSummary;
+    private List<DistributedPrepareBuildSummary> distributedPrepareBuildQueues = new ArrayList<DistributedPrepareBuildSummary>();
 
-    private List<PrepareBuildProjectsTask> distributedBuildQueues;
+    private List<DistributedBuildSummary> currentDistributedBuilds = new ArrayList<DistributedBuildSummary>();
 
+    private List<DistributedBuildSummary> distributedBuildQueues = new ArrayList<DistributedBuildSummary>();
     private String buildAgentUrl;
 
     private int projectGroupId;
 
-    private String scmRootAddress;
+    private int scmRootId;
 
     private List<String> selectedDistributedBuildTaskHashCodes;
 
+    private List<String> selectedDistributedPrepareBuildTaskHashCodes;
+
     // -----------------------------------------------------
     //  webwork
     // -----------------------------------------------------
@@ -203,38 +205,89 @@
     {
         if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )
         {
-            distributedBuildSummary = new ArrayList<DistributedBuildSummary>();
-
-            Map<String, PrepareBuildProjectsTask> map = distributedBuildManager.getDistributedBuildProjects();
+	        // current prepare build task
+            Map<String, PrepareBuildProjectsTask> currentPrepareBuildMap = getContinuum().getDistributedBuildManager().getProjectsCurrentlyPreparingBuild();
 
-            for ( String url : map.keySet() )
+            for ( String url : currentPrepareBuildMap.keySet() )
             {
-                PrepareBuildProjectsTask task = map.get( url );
+                PrepareBuildProjectsTask task = currentPrepareBuildMap.get( url );
 
                 ProjectGroup projectGroup = getContinuum().getProjectGroup( task.getProjectGroupId() );
 
-                DistributedBuildSummary summary = new DistributedBuildSummary();
-                summary.setUrl( url );
+                DistributedPrepareBuildSummary summary = new DistributedPrepareBuildSummary();
+                summary.setBuildAgentUrl( url );
                 summary.setProjectGroupId( task.getProjectGroupId() );
                 summary.setProjectGroupName( projectGroup.getName() );
                 summary.setScmRootAddress( task.getScmRootAddress() );
+                summary.setScmRootId( task.getProjectScmRootId() );
+
+                currentDistributedPrepareBuilds.add( summary );
+            }
+
+            // current builds
+            Map<String, BuildProjectTask> currentBuildMap = getContinuum().getDistributedBuildManager().getProjectsCurrentlyBuilding();
 
-                ProjectScmRoot scmRoot =
-                    getContinuum().getProjectScmRootByProjectGroupAndScmRootAddress( task.getProjectGroupId(),
-                                                                                     task.getScmRootAddress() );
-                if ( scmRoot.getState() == ContinuumProjectState.UPDATING )
+            for ( String url : currentBuildMap.keySet() )
+            {
+                BuildProjectTask task = currentBuildMap.get( url );
+
+                Project project = getContinuum().getProject( task.getProjectId() );
+
+                DistributedBuildSummary summary = new DistributedBuildSummary();
+                summary.setProjectId( project.getId() );
+                summary.setProjectName( project.getName() );
+                summary.setProjectGroupName( project.getProjectGroup().getName() );
+                summary.setBuildDefinitionId( task.getBuildDefinitionId() );
+                summary.setBuildDefinitionLabel( task.getBuildDefinitionLabel() );
+                summary.setHashCode( task.getHashCode() );
+                summary.setBuildAgentUrl( url );
+
+                currentDistributedBuilds.add( summary );
+            }
+            
+            // prepare build queues
+            Map<String, List<PrepareBuildProjectsTask>> prepareBuildMap = getContinuum().getDistributedBuildManager().getProjectsInPrepareBuildQueue();
+
+            for ( String url : prepareBuildMap.keySet() )
+            {
+                for ( PrepareBuildProjectsTask task : prepareBuildMap.get( url ) )
                 {
-                    summary.setCancelEnabled( false );
+                    ProjectGroup projectGroup = getContinuum().getProjectGroup( task.getProjectGroupId() );
+
+                    DistributedPrepareBuildSummary summary = new DistributedPrepareBuildSummary();
+                    summary.setBuildAgentUrl( url );
+                    summary.setProjectGroupId( task.getProjectGroupId() );
+                    summary.setProjectGroupName( projectGroup.getName() );
+                    summary.setScmRootAddress( task.getScmRootAddress() );
+                    summary.setScmRootId( task.getProjectScmRootId() );
+                    summary.setHashCode( task.getHashCode() );
+
+                    distributedPrepareBuildQueues.add( summary );
                 }
-                else
+            }
+
+            // build queues
+            Map<String, List<BuildProjectTask>> buildMap = getContinuum().getDistributedBuildManager().getProjectsInBuildQueue();
+
+            for ( String url : buildMap.keySet() )
+            {
+                for ( BuildProjectTask task : buildMap.get( url ) )
                 {
-                    summary.setCancelEnabled( true );
-                }
+                    DistributedBuildSummary summary = new DistributedBuildSummary();
 
-                distributedBuildSummary.add( summary );
-            }
+                    Project project = getContinuum().getProject( task.getProjectId() );
+
+                    summary.setProjectId( project.getId() );
+                    summary.setProjectName( project.getName() );
+                    summary.setProjectGroupName( project.getProjectGroup().getName() );
+                    summary.setBuildDefinitionId( task.getBuildDefinitionId() );
+                    summary.setBuildDefinitionLabel( task.getBuildDefinitionLabel() );
+                    summary.setHashCode( task.getHashCode() );
+                    summary.setBuildAgentUrl( url );
 
-            distributedBuildQueues = aggregateQueues();
+                    distributedBuildQueues.add( summary );
+                }
+            }
 
             return DISTRIBUTED_BUILD_SUCCESS;
         }
@@ -349,7 +402,7 @@
         }
 
         getContinuum().getBuildsManager().removeProjectFromBuildQueue( projectId, buildDefinitionId, trigger,
-                                                                       projectName );
+                                                                       projectName, projectGroupId );
         Project project = getContinuum().getProject( projectId );
         project.setState( project.getOldState() );
         getContinuum().updateProject( project );
@@ -421,7 +474,7 @@
             return REQUIRES_AUTHENTICATION;
         }
 
-        distributedBuildManager.cancelDistributedBuild( buildAgentUrl, projectGroupId, scmRootAddress );
+        getContinuum().getDistributedBuildManager().cancelDistributedBuild( buildAgentUrl, projectGroupId, scmRootId );
 
         return SUCCESS;
     }
@@ -444,7 +497,7 @@
             return REQUIRES_AUTHENTICATION;
         }
 
-        getContinuum().getTaskQueueManager().removeFromDistributedBuildQueue( projectGroupId, scmRootAddress );
+        getContinuum().getDistributedBuildManager().removeFromDistributedBuildQueue( projectGroupId, scmRootId );
 
         return SUCCESS;
     }
@@ -467,7 +520,7 @@
             return REQUIRES_AUTHENTICATION;
         }
 
-        getContinuum().getTaskQueueManager().removeTasksFromDistributedBuildQueueWithHashCodes(
+        getContinuum().getDistributedBuildManager().removeFromDistributedBuildQueue(
             listToIntArray( this.getSelectedDistributedBuildTaskHashCodes() ) );
 
         return SUCCESS;
@@ -635,34 +688,34 @@
         this.checkoutsInQueue = checkoutsInQueue;
     }
 
-    public List<DistributedBuildSummary> getDistributedBuildSummary()
+    public List<DistributedPrepareBuildSummary> getCurrentDistributedPrepareBuilds()
     {
-        return distributedBuildSummary;
+        return currentDistributedPrepareBuilds;
     }
 
-    public void setDistributedBuildSummary( List<DistributedBuildSummary> distributedBuildSummary )
+    public List<DistributedBuildSummary> getCurrentDistributedBuilds()
     {
-        this.distributedBuildSummary = distributedBuildSummary;
+        return currentDistributedBuilds;
     }
 
-    public String getBuildAgentUrl()
+    public List<DistributedPrepareBuildSummary> getDistributedPrepareBuildQueues()
     {
-        return buildAgentUrl;
+        return distributedPrepareBuildQueues;
     }
 
-    public void setBuildAgentUrl( String buildAgentUrl )
+    public List<DistributedBuildSummary> getDistributedBuildQueues()
     {
-        this.buildAgentUrl = buildAgentUrl;
+        return distributedBuildQueues;
     }
-
-    public List<PrepareBuildProjectsTask> getDistributedBuildQueues()
+    
+    public String getBuildAgentUrl()
     {
-        return distributedBuildQueues;
+        return buildAgentUrl;
     }
 
-    public void setDistributedBuildQueues( List<PrepareBuildProjectsTask> distributedBuildQueues )
+    public void setBuildAgentUrl( String buildAgentUrl )
     {
-        this.distributedBuildQueues = distributedBuildQueues;
+        this.buildAgentUrl = buildAgentUrl;
     }
 
     public List<String> getSelectedDistributedBuildTaskHashCodes()
@@ -675,45 +728,23 @@
         this.selectedDistributedBuildTaskHashCodes = selectedDistributedBuildTaskHashCodes;
     }
 
-    public String getScmRootAddress()
+    public List<String> getSelectedDistributedPrepareBuildTaskHashCodes()
     {
-        return scmRootAddress;
+        return selectedDistributedPrepareBuildTaskHashCodes;
     }
 
-    public void setScmRootAddress( String scmRootAddress )
+    public void setSelectedDistributedPrepareBuildTaskHashCodes( List<String> selectedDistributedPrepareBuildTaskHashCodes )
     {
-        this.scmRootAddress = scmRootAddress;
+        this.selectedDistributedPrepareBuildTaskHashCodes = selectedDistributedPrepareBuildTaskHashCodes;
     }
 
-    private List<PrepareBuildProjectsTask> aggregateQueues()
-        throws TaskQueueManagerException
+    public void setProjectGroupId( int projectGroupId )
     {
-        List<PrepareBuildProjectsTask> aggregatedQueues = new ArrayList<PrepareBuildProjectsTask>();
-
-        List<PrepareBuildProjectsTask> overallQueues =
-            getContinuum().getTaskQueueManager().getDistributedBuildProjectsInQueue();
-
-        Map<String, DistributedBuildTaskQueueExecutor> agentTaskQueueExecutors =
-            distributedBuildManager.getTaskQueueExecutors();
-
-        for ( String url : agentTaskQueueExecutors.keySet() )
-        {
-            try
-            {
-                logger.debug( "size of each queue snapshot " + url + " : " +
-                    agentTaskQueueExecutors.get( url ).getQueue().getQueueSnapshot().size() );
-                aggregatedQueues.addAll( agentTaskQueueExecutors.get( url ).getQueue().getQueueSnapshot() );
-            }
-            catch ( TaskQueueException e )
-            {
-                //silently ignore error
-                logger.error( "Error encountered retrieving queue snapshot from queue :" + url, e );
-            }
-        }
-
-        logger.debug( "size of agg. queue " + aggregatedQueues.size() );
-        aggregatedQueues.addAll( overallQueues );
+        this.projectGroupId = projectGroupId;
+    }
 
-        return aggregatedQueues;
+    public void setScmRootId( int scmRootId )
+    {
+        this.scmRootId = scmRootId;
     }
 }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/mdo/view-models.mdo
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/mdo/view-models.mdo?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/mdo/view-models.mdo (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/mdo/view-models.mdo Sun May 17 16:14:22 2009
@@ -495,11 +495,11 @@
       </fields>
     </class>    
     <class>
-      <name>DistributedBuildSummary</name>
+      <name>DistributedPrepareBuildSummary</name>
       <version>1.0.0+</version>
       <fields>
         <field>
-          <name>url</name>
+          <name>buildAgentUrl</name>
           <version>1.0.0</version>
           <required>true</required>
           <description>URL of the build agent</description>
@@ -527,11 +527,17 @@
           <type>String</type>
         </field>
         <field>
-          <name>cancelEnabled</name>
+          <name>scmRootId</name>
           <version>1.0.0</version>
           <required>true</required>
-          <description>Determines if the cancel button is enabled</description>
-          <type>boolean</type>
+          <description>ID of the scm root</description>
+          <type>int</type>
+        </field>
+        <field>
+          <name>hashCode</name>
+          <version>1.0.0</version>
+          <required>false</required>
+          <type>int</type>
         </field>
       </fields>
     </class>
@@ -601,5 +607,53 @@
         </field>
       </fields>
     </class>
+    <class>
+      <name>DistributedBuildSummary</name>
+      <version>1.0.0+</version>
+      <fields>
+        <field>
+          <name>projectId</name>
+          <version>1.0.0</version>
+          <required>true</required>
+          <type>int</type>
+        </field>
+        <field>
+          <name>projectName</name>
+          <version>1.0.0</version>
+          <required>true</required>
+          <type>String</type>
+        </field>
+        <field>
+          <name>projectGroupName</name>
+          <version>1.0.0</version>
+          <required>true</required>
+          <type>String</type>
+        </field>
+        <field>
+          <name>buildDefinitionId</name>
+          <version>1.0.0</version>
+          <required>true</required>
+          <type>int</type>
+        </field>
+        <field>
+          <name>buildDefinitionLabel</name>
+          <version>1.0.0</version>
+          <required>true</required>
+          <type>String</type>
+        </field>
+        <field>
+          <name>buildAgentUrl</name>
+          <version>1.0.0</version>
+          <required>true</required>
+          <type>String</type>
+        </field>
+        <field>
+          <name>hashCode</name>
+          <version>1.0.0</version>
+          <required>true</required>
+          <type>int</type>
+        </field>
+      </fields>
+    </class>
   </classes>
 </model>

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/localization/Continuum.properties (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/localization/Continuum.properties Sun May 17 16:14:22 2009
@@ -1149,13 +1149,21 @@
 # Page: View Distributed Build
 # ----------------------------------------------------------------------
 distributedBuilds.page.title = Continuum - View Distributed Builds
-distributedBuilds.section.title = View Distributed Builds
-distributedBuilds.buildQueue.section.title = Build Queue
+distributedBuilds.currentPrepareBuild.section.title = Current Prepare Builds
+distributedBuilds.currentBuild.section.title = Current Builds
+distributedBuilds.prepareBuildQueue.section.title = Prepare Build Queues
+distributedBuilds.buildQueue.section.title = Build Queues
+distributedPrepareBuild.table.projectGroupName = Project Group Name
+distributedPrepareBuild.table.scmRootAddress = Scm Root Address
+distributedPrepareBuild.table.buildAgentUrl = Build Agent URL
+distributedPrepareBuilds.empty = No Prepare Builds
+distributedPrepareBuilds.removeEntries = Cancel Prepare Builds
+distributedBuild.table.projectName = Project Name
+distributedBuild.table.buildDefinitionLabel = Build Definition Label
 distributedBuild.table.projectGroupName = Project Group Name
-distributedBuild.table.scmRootAddress = Scm Root Address
-distributedBuild.table.agentUrl = Build Agent URL
-distributedBuilds.empty = No Distributed Builds
-distributedBuilds.removeEntries = Cancel Entries
+distributedBuild.table.buildAgentUrl = Build Agent URL
+distributedBuilds.empty = No Builds
+distributedBuilds.removeEntries = Cancel Builds
 
 # ----------------------------------------------------------------------
 # Page: Delete BuildAgentGroup

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/struts.xml?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/struts.xml (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/struts.xml Sun May 17 16:14:22 2009
@@ -825,6 +825,18 @@
       </result>
     </action>
 
+    <action name="removeDistributedPrepareBuildEntry" class="queues" method="removeDistributedPrepareBuildEntry">
+      <result name="success" type="redirect-action">
+        <param name="actionName">displayQueues</param>
+      </result>
+    </action>
+
+    <action name="removeDistributedPrepareBuildEntries" class="queues" method="removeDistributedPrepareBuildEntries">
+	  <result name="success" type="redirect-action">
+	    <param name="actionName">displayQueues</param>
+	  </result>
+    </action>
+
     <action name="removeDistributedBuildEntries" class="queues" method="removeDistributedBuildEntries">
       <result name="success" type="redirect-action">
         <param name="actionName">displayQueues</param>

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/applicationContext.xml?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/applicationContext.xml (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/applicationContext.xml Sun May 17 16:14:22 2009
@@ -66,7 +66,7 @@
   </bean>	
   
   <bean id="masterBuildAgentTransportServer" class="org.apache.continuum.distributed.transport.master.MasterBuildAgentTransportServer">
-    <constructor-arg ref="distributedBuildManager"/>
+    <constructor-arg ref="distributedBuildService"/>
   </bean>
   
   <bean name="xmlrpcServicesList" class="java.util.ArrayList">

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp?rev=775693&r1=775692&r2=775693&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp Sun May 17 16:14:22 2009
@@ -106,6 +106,7 @@
                       <s:param name="buildDefinitionId">${queue.task.buildDefinitionId}</s:param>
                       <s:param name="trigger">${queue.task.trigger}</s:param>
                       <s:param name="projectName">${queue.task.projectName}</s:param>
+                      <s:param name="projectGroupId">${queue.task.projectGroupId}</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>



Mime
View raw message