continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r734441 [2/3] - in /continuum/trunk: ./ continuum-api/src/main/java/org/apache/continuum/builder/ continuum-api/src/main/java/org/apache/continuum/builder/distributed/ continuum-api/src/main/java/org/apache/continuum/builder/distributed/man...
Date Wed, 14 Jan 2009 16:46:47 GMT

Propchange: continuum/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 14 08:31:04 2009
@@ -1 +1,2 @@
 /continuum/branches/continuum-1.2.x:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024,725845,726103,726239,726462
+/continuum/branches/continuum-distributed-builds:713270-734307

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=734441&r1=734440&r2=734441&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 Wed Jan 14 08:31:04 2009
@@ -71,7 +71,8 @@
      * @param scmRootAddress TODO
      * @throws BuildManagerException
      */
-    void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, int trigger, int projectGroupId, String scmRootAddress )
+    void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, int trigger, int projectGroupId, 
+                               String projectGroupName, String scmRootAddress, int scmRootId )
         throws BuildManagerException;
 
     /**

Copied: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/configuration/BuildAgentConfiguration.java (from r734307, continuum/branches/continuum-distributed-builds/continuum-api/src/main/java/org/apache/continuum/configuration/BuildAgentConfiguration.java)
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/configuration/BuildAgentConfiguration.java?p2=continuum/trunk/continuum-api/src/main/java/org/apache/continuum/configuration/BuildAgentConfiguration.java&p1=continuum/branches/continuum-distributed-builds/continuum-api/src/main/java/org/apache/continuum/configuration/BuildAgentConfiguration.java&r1=734307&r2=734441&rev=734441&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-api/src/main/java/org/apache/continuum/configuration/BuildAgentConfiguration.java (original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/configuration/BuildAgentConfiguration.java Wed Jan 14 08:31:04 2009
@@ -1,5 +1,24 @@
 package org.apache.continuum.configuration;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 public class BuildAgentConfiguration
 {
     private String url;

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/configuration/GeneralConfiguration.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/configuration/GeneralConfiguration.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/continuum/configuration/GeneralConfiguration.java (original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/configuration/GeneralConfiguration.java Wed Jan 14 08:31:04 2009
@@ -22,6 +22,7 @@
 import org.apache.commons.lang.builder.ReflectionToStringBuilder;
 
 import java.io.File;
+import java.util.List;
 
 /**
  * @author <a href="mailto:olamy@apache.org">olamy</a>
@@ -44,6 +45,8 @@
     
     private int numberOfBuildsInParallel = 1;
 
+    private List<BuildAgentConfiguration> buildAgents;
+
     public GeneralConfiguration()
     {
         // nothing here
@@ -124,4 +127,14 @@
     {
         this.numberOfBuildsInParallel = numberOfBuildsInParallel;
     }
+
+    public List<BuildAgentConfiguration> getBuildAgents()
+    {
+        return buildAgents;
+    }
+
+    public void setBuildAgents( List<BuildAgentConfiguration> buildAgents )
+    {
+        this.buildAgents = buildAgents;
+    }
 }

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/ProjectDao.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/ProjectDao.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/ProjectDao.java (original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/ProjectDao.java Wed Jan 14 08:31:04 2009
@@ -79,4 +79,7 @@
 
     ProjectGroup getProjectGroupByProjectId( int projectId )
         throws ContinuumObjectNotFoundException;
+
+    Project getProjectWithDependencies( int projectId )
+        throws ContinuumStoreException;
 }

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=734441&r1=734440&r2=734441&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 Wed Jan 14 08:31:04 2009
@@ -19,17 +19,28 @@
  * under the License.
  */
 
+import java.util.List;
+
+import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
 import org.codehaus.plexus.taskqueue.TaskQueue;;
 
 /**
  * @author <a href="mailto:ctan@apache.org">Maria Catherine Tan</a>
  */
 public interface TaskQueueManager
-{            
+{
     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;
 
@@ -65,7 +76,10 @@
     
     boolean releaseInProgress()
         throws TaskQueueManagerException;
-    
+
+    boolean removeFromDistributedBuildQueue( int projectGroupId, String scmRootAddress )
+        throws TaskQueueManagerException;
+  
     /**
      * Remove local repository from the purge queue
      * 
@@ -94,4 +108,7 @@
      */
     void removeRepositoryFromPurgeQueue( int repositoryId )
         throws TaskQueueManagerException;
+
+    void removeTasksFromDistributedBuildQueueWithHashCodes( int[] hashCodes )
+        throws TaskQueueManagerException;
 }

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java (original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java Wed Jan 14 08:31:04 2009
@@ -625,6 +625,9 @@
     ProjectScmRoot getProjectScmRootByProject( int projectId )
         throws ContinuumException;
 
+    ProjectScmRoot getProjectScmRootByProjectGroupAndScmRootAddress( int projectGroupId, String scmRootAddress )
+        throws ContinuumException;
+
     // ----------------------------------------------------------------------
     // Task Queue Manager
     // ----------------------------------------------------------------------

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java (original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java Wed Jan 14 08:31:04 2009
@@ -20,12 +20,14 @@
  */
 
 import org.apache.continuum.buildqueue.BuildQueueServiceException;
+import org.apache.continuum.configuration.BuildAgentConfiguration;
 import org.apache.continuum.configuration.ContinuumConfigurationException;
 import org.apache.maven.continuum.model.project.BuildQueue;
 import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 
 import java.io.File;
+import java.util.List;
 
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
@@ -36,7 +38,7 @@
     String ROLE = ConfigurationService.class.getName();
 
     public static final String DEFAULT_SCHEDULE_NAME = "DEFAULT_SCHEDULE";
-    
+
     public static final String DEFAULT_BUILD_QUEUE_NAME = "DEFAULT_BUILD_QUEUE";
 
     // ----------------------------------------------------------------------
@@ -95,6 +97,19 @@
     BuildQueue getDefaultBuildQueue()
         throws BuildQueueServiceException;
 
+    List<BuildAgentConfiguration> getBuildAgents();
+
+    void addBuildAgent( BuildAgentConfiguration buildAgent )
+        throws ConfigurationException;
+
+    void removeBuildAgent( BuildAgentConfiguration buildAgent );
+
+    void updateBuildAgent( BuildAgentConfiguration buildAgent );
+
+    boolean isDistributedBuildEnabled();
+
+    void setDistributedBuildEnabled( boolean distributedBuildEnabled );
+
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------

Modified: continuum/trunk/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java (original)
+++ continuum/trunk/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java Wed Jan 14 08:31:04 2009
@@ -24,6 +24,8 @@
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.continuum.configuration.model.ContinuumConfigurationModel;
@@ -41,13 +43,13 @@
  */
 public class DefaultContinuumConfiguration
     implements ContinuumConfiguration
-{ 
+{
     private Logger log = LoggerFactory.getLogger( getClass() );
 
     private File configurationFile;
 
     private GeneralConfiguration generalConfiguration;
-    
+
     public static final String CONFIGURATION_FILE = "continuum.xml";
 
     //----------------------------------------------------
@@ -120,7 +122,7 @@
                 .read( new InputStreamReader( new FileInputStream( file ) ) );
 
             this.generalConfiguration = new GeneralConfiguration();
-            
+
             this.generalConfiguration.setNumberOfBuildsInParallel( configuration.getNumberOfBuildsInParallel() );
             this.generalConfiguration.setBaseUrl( configuration.getBaseUrl() );
             if ( StringUtils.isNotEmpty( configuration.getBuildOutputDirectory() ) )
@@ -154,7 +156,21 @@
                 this.generalConfiguration.setReleaseOutputDirectory( new File( configuration
                     .getReleaseOutputDirectory() ) );
             }
-            
+            if ( configuration.getBuildAgents() != null )
+            {
+                List<BuildAgentConfiguration> buildAgents = new ArrayList<BuildAgentConfiguration>();
+
+                List<org.apache.continuum.configuration.model.BuildAgentConfiguration> agents = configuration.getBuildAgents();
+                for ( org.apache.continuum.configuration.model.BuildAgentConfiguration agent : agents )
+                {
+                    BuildAgentConfiguration buildAgent = new BuildAgentConfiguration( agent.getUrl(),
+                                                                                      agent.getDescription(),
+                                                                                      agent.isEnabled() );
+                    buildAgents.add( buildAgent );
+                }
+                
+                this.generalConfiguration.setBuildAgents( buildAgents );
+            }
         }
         catch ( IOException e )
         {
@@ -177,14 +193,13 @@
             ContinuumConfigurationModel configurationModel = new ContinuumConfigurationModel();
             configurationModel.setBaseUrl( this.generalConfiguration.getBaseUrl() );
             configurationModel.setNumberOfBuildsInParallel( this.generalConfiguration.getNumberOfBuildsInParallel() );
-                        
+
             // normally not null but NPE free is better !
             if ( this.generalConfiguration.getBuildOutputDirectory() != null )
             {
                 configurationModel.setBuildOutputDirectory( this.generalConfiguration.getBuildOutputDirectory()
-                    .getPath() );                
+                    .getPath() );
             }
-                        
             if ( this.generalConfiguration.getWorkingDirectory() != null )
             {
                 configurationModel.setWorkingDirectory( this.generalConfiguration.getWorkingDirectory().getPath() );
@@ -217,7 +232,23 @@
                 configurationModel.setReleaseOutputDirectory( this.generalConfiguration.getReleaseOutputDirectory()
                     .getPath() );
             }
-            
+            if ( this.generalConfiguration.getBuildAgents() != null )
+            {
+                List buildAgents = new ArrayList();
+
+                for ( BuildAgentConfiguration agent : this.generalConfiguration.getBuildAgents() )
+                {
+                    org.apache.continuum.configuration.model.BuildAgentConfiguration buildAgent = 
+                        new org.apache.continuum.configuration.model.BuildAgentConfiguration();
+                    buildAgent.setUrl( agent.getUrl() );
+                    buildAgent.setDescription( agent.getDescription() );
+                    buildAgent.setEnabled( agent.isEnabled() );
+                    
+                    buildAgents.add( buildAgent );
+                }
+                configurationModel.setBuildAgents( buildAgents );
+            }
+
             ContinuumConfigurationModelXpp3Writer writer = new ContinuumConfigurationModelXpp3Writer();
             FileWriter fileWriter = new FileWriter( file );
             writer.write( fileWriter, configurationModel );
@@ -234,7 +265,7 @@
     //  Spring injection
     // ----------------------------------------
 
-    
+
     public File getConfigurationFile()
     {
         return configurationFile;

Modified: continuum/trunk/continuum-base/continuum-configuration/src/main/mdo/continuum-configuration.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-base/continuum-configuration/src/main/mdo/continuum-configuration.xml?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-base/continuum-configuration/src/main/mdo/continuum-configuration.xml (original)
+++ continuum/trunk/continuum-base/continuum-configuration/src/main/mdo/continuum-configuration.xml Wed Jan 14 08:31:04 2009
@@ -65,12 +65,20 @@
           <name>releaseOutputDirectory</name>
           <version>1.1.0+</version>
           <type>String</type>
-        </field>    
+        </field>
         <field>
           <name>numberOfBuildsInParallel</name>
           <version>1.1.0+</version>
           <type>int</type>
-        </field>            
+        </field>
+        <field>
+          <name>buildAgents</name>
+          <version>1.1.0+</version>
+          <association>
+            <type>BuildAgentConfiguration</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
       </fields>
     </class>
     <class xml.tagName="proxy-configuration">
@@ -98,6 +106,27 @@
           <type>String</type>
         </field>                     
       </fields>
+    </class>
+    <class xml.tagName="buildagent-configuration">
+      <name>BuildAgentConfiguration</name>
+      <version>1.1.0+</version>
+      <fields>
+        <field>
+          <name>url</name>
+          <version>1.1.0+</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>description</name>
+          <version>1.1.0+</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>enabled</name>
+          <version>1.1.0+</version>
+          <type>boolean</type>
+        </field>
+      </fields>
     </class>    
   </classes>
 </model>

Modified: continuum/trunk/continuum-base/continuum-configuration/src/test/java/org/apache/continuum/configuration/TestDefaultContinuumConfiguration.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-base/continuum-configuration/src/test/java/org/apache/continuum/configuration/TestDefaultContinuumConfiguration.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-base/continuum-configuration/src/test/java/org/apache/continuum/configuration/TestDefaultContinuumConfiguration.java (original)
+++ continuum/trunk/continuum-base/continuum-configuration/src/test/java/org/apache/continuum/configuration/TestDefaultContinuumConfiguration.java Wed Jan 14 08:31:04 2009
@@ -25,6 +25,8 @@
 import org.slf4j.LoggerFactory;
 
 import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * @author <a href="mailto:olamy@apache.org">olamy</a>
@@ -67,6 +69,11 @@
         assertNotNull( generalConfiguration.getBaseUrl() );
         assertEquals( "http://test", generalConfiguration.getBaseUrl() );
         assertEquals( new File( "myBuildOutputDir" ), generalConfiguration.getBuildOutputDirectory() );
+        assertNotNull( generalConfiguration.getBuildAgents() );
+        org.apache.continuum.configuration.BuildAgentConfiguration buildAgentConfig = generalConfiguration.getBuildAgents().get( 0 );
+        assertEquals( "http://buildagent/xmlrpc", buildAgentConfig.getUrl() );
+        assertEquals( "linux", buildAgentConfig.getDescription() );
+        assertTrue( buildAgentConfig.isEnabled() );
     }
 
     public void testDefaultConfiguration()
@@ -87,6 +94,13 @@
         generalConfiguration.getProxyConfiguration().setProxyPort( 8080 );
         File targetDir = new File(getBasedir(), "target");
         generalConfiguration.setBuildOutputDirectory( targetDir );
+        BuildAgentConfiguration buildAgentConfiguration = new BuildAgentConfiguration();
+        buildAgentConfiguration.setUrl( "http://buildagent/test" );
+        buildAgentConfiguration.setDescription( "windows xp" );
+        buildAgentConfiguration.setEnabled( false );
+        List<BuildAgentConfiguration> buildAgents = new ArrayList<BuildAgentConfiguration>();
+        buildAgents.add( buildAgentConfiguration );
+        generalConfiguration.setBuildAgents( buildAgents );
         configuration.setGeneralConfiguration( generalConfiguration );
         configuration.save();
 
@@ -94,12 +108,16 @@
         assertTrue( contents.indexOf( "http://test/zloug" ) > 0 );
         assertTrue( contents.indexOf( "localhost" ) > 0 );
         assertTrue( contents.indexOf( "8080" ) > 0 );
-
+        assertTrue( contents.indexOf( "http://buildagent/test" ) > 0 );
+        assertTrue( contents.indexOf( "windows xp" ) > 0 );
+        
         configuration.reload();
         assertEquals( "http://test/zloug", configuration.getGeneralConfiguration().getBaseUrl() );
         assertEquals( "localhost", configuration.getGeneralConfiguration().getProxyConfiguration().getProxyHost() );
         assertEquals( 8080, configuration.getGeneralConfiguration().getProxyConfiguration().getProxyPort() );
         assertEquals(targetDir.getPath(), configuration.getGeneralConfiguration().getBuildOutputDirectory().getPath());
+        assertEquals( "http://buildagent/test", configuration.getGeneralConfiguration().getBuildAgents().get( 0 ).getUrl() );
+        assertFalse( configuration.getGeneralConfiguration().getBuildAgents().get( 0 ).isEnabled() );
         log.info( "generalConfiguration " + configuration.getGeneralConfiguration().toString() );
     }
 }

Modified: continuum/trunk/continuum-base/continuum-configuration/src/test/resources/conf/continuum.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-base/continuum-configuration/src/test/resources/conf/continuum.xml?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-base/continuum-configuration/src/test/resources/conf/continuum.xml (original)
+++ continuum/trunk/continuum-base/continuum-configuration/src/test/resources/conf/continuum.xml Wed Jan 14 08:31:04 2009
@@ -2,4 +2,11 @@
 <continuum-configuration>
   <baseUrl>http://test</baseUrl>
   <buildOutputDirectory>myBuildOutputDir</buildOutputDirectory>
+  <buildAgents>
+    <buildAgent>
+      <url>http://buildagent/xmlrpc</url>
+      <description>linux</description>
+      <enabled>true</enabled>
+    </buildAgent>
+  </buildAgents>
 </continuum-configuration>
\ No newline at end of file

Propchange: continuum/trunk/continuum-builder/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan 14 08:31:04 2009
@@ -0,0 +1,5 @@
+.settings
+build
+target
+.classpath
+.project

Modified: continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java (original)
+++ continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java Wed Jan 14 08:31:04 2009
@@ -21,6 +21,7 @@
 
 import org.apache.continuum.buildqueue.BuildQueueService;
 import org.apache.continuum.buildqueue.BuildQueueServiceException;
+import org.apache.continuum.configuration.BuildAgentConfiguration;
 import org.apache.continuum.configuration.ContinuumConfiguration;
 import org.apache.continuum.configuration.ContinuumConfigurationException;
 import org.apache.continuum.configuration.GeneralConfiguration;
@@ -37,6 +38,8 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 import javax.annotation.Resource;
 
@@ -287,6 +290,77 @@
         generalConfiguration.setReleaseOutputDirectory( f );
     }
 
+    public List<BuildAgentConfiguration> getBuildAgents()
+    {
+        return generalConfiguration.getBuildAgents();
+    }
+
+    public void addBuildAgent( BuildAgentConfiguration buildAgent )
+        throws ConfigurationException
+    {
+        List<BuildAgentConfiguration> buildAgents = generalConfiguration.getBuildAgents();
+        if ( buildAgents == null )
+        {
+            buildAgents = new ArrayList<BuildAgentConfiguration>();
+        }
+
+        for ( BuildAgentConfiguration agent : buildAgents )
+        {
+            if ( agent.getUrl().equals( buildAgent.getUrl() ) )
+            {
+                throw new ConfigurationException( "Unable to add build agent: build agent already exist" );
+            }
+        }
+
+        buildAgents.add( buildAgent );
+        generalConfiguration.setBuildAgents( buildAgents );
+    }
+
+    public void removeBuildAgent( BuildAgentConfiguration buildAgent )
+    {
+        List<BuildAgentConfiguration> buildAgents = getBuildAgents();
+        if ( buildAgents != null )
+        {
+            for ( BuildAgentConfiguration agent : buildAgents )
+            {
+                if ( agent.getUrl().equals( buildAgent.getUrl() ) )
+                {
+                    buildAgents.remove( agent );
+                    break;
+                }
+            }
+            generalConfiguration.setBuildAgents( buildAgents );
+        }
+    }
+
+    public void updateBuildAgent( BuildAgentConfiguration buildAgent )
+    {
+        List<BuildAgentConfiguration> buildAgents = getBuildAgents();
+        if ( buildAgents != null )
+        {
+            for ( BuildAgentConfiguration agent : buildAgents )
+            {
+                if ( agent.getUrl().equals( buildAgent.getUrl() ) )
+                {
+                    agent.setDescription( buildAgent.getDescription() );
+                    agent.setEnabled( buildAgent.isEnabled() );
+                    
+                    return;
+                }
+            }
+        }
+    }
+
+    public boolean isDistributedBuildEnabled()
+    {
+        return systemConf.isDistributedBuildEnabled();
+    }
+
+    public void setDistributedBuildEnabled( boolean distributedBuildEnabled )
+    {
+        systemConf.setDistributedBuildEnabled( distributedBuildEnabled );
+    }
+
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------

Modified: continuum/trunk/continuum-commons/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java (original)
+++ continuum/trunk/continuum-commons/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java Wed Jan 14 08:31:04 2009
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.configuration.BuildAgentConfiguration;
 import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 import org.codehaus.plexus.util.FileUtils;
 import org.slf4j.Logger;
@@ -88,9 +89,14 @@
 
 //        assertEquals( "working-directory", service.getWorkingDirectory().getName() );
 
+        assertEquals( "check # build agents", 1, service.getBuildAgents().size() );
+        
         service.setUrl( "http://test/zloug" );
         service.setBuildOutputDirectory( new File( "testBuildOutputDir" ) );
 
+        BuildAgentConfiguration buildAgent = new BuildAgentConfiguration( "http://test/xmlrpc", "windows", false );
+        service.addBuildAgent( buildAgent );
+
         service.store();
 
         String contents = FileUtils.fileRead( conf );
@@ -99,5 +105,19 @@
         service.reload();
 
         assertEquals( "http://test/zloug", service.getUrl() );
+        assertEquals( "check # build agents", 2, service.getBuildAgents().size() );        
+        assertEquals( "http://test/xmlrpc", service.getBuildAgents().get( 1 ).getUrl() );
+        assertEquals( "windows", service.getBuildAgents().get( 1 ).getDescription() );
+        assertFalse( service.getBuildAgents().get( 1 ).isEnabled() );
+
+        assertEquals( "http://test/xmlrpc", buildAgent.getUrl() );
+        service.removeBuildAgent( buildAgent );
+        service.store();
+        service.reload();
+
+        assertEquals( "check # build agents", 1, service.getBuildAgents().size() );
+        assertEquals( "http://buildagent/xmlrpc", service.getBuildAgents().get( 0 ).getUrl() );
+        assertEquals( "linux", service.getBuildAgents().get( 0 ).getDescription() );
+        assertTrue( service.getBuildAgents().get( 0 ).isEnabled() );
     }
 }

Modified: continuum/trunk/continuum-commons/src/test/resources/conf/continuum.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/src/test/resources/conf/continuum.xml?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/src/test/resources/conf/continuum.xml (original)
+++ continuum/trunk/continuum-commons/src/test/resources/conf/continuum.xml Wed Jan 14 08:31:04 2009
@@ -2,4 +2,12 @@
 <continuum-configuration>
   <baseUrl>http://test</baseUrl>
   <buildOutputDirectory>target/myBuildOutputDir</buildOutputDirectory>
+  <buildAgents>
+    <buildAgent>
+      <url>http://buildagent/xmlrpc</url>
+      <description>linux</description>
+      <enabled>true</enabled>
+    </buildAgent>
+  </buildAgents>
+  <distributedBuildEnabled>true</distributedBuildEnabled>
 </continuum-configuration>
\ No newline at end of file

Modified: continuum/trunk/continuum-core/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/pom.xml?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-core/pom.xml (original)
+++ continuum/trunk/continuum-core/pom.xml Wed Jan 14 08:31:04 2009
@@ -176,6 +176,10 @@
       <artifactId>mail</artifactId>
       <version>1.4</version>
       <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.continuum</groupId>
+      <artifactId>continuum-builder</artifactId>
     </dependency>    
     <!-- === Testing Dependencies === -->
     <dependency>

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java Wed Jan 14 08:31:04 2009
@@ -31,15 +31,15 @@
 import org.apache.continuum.buildqueue.BuildQueueService;
 import org.apache.continuum.buildqueue.BuildQueueServiceException;
 import org.apache.continuum.dao.BuildDefinitionDao;
+import org.apache.continuum.taskqueue.CheckOutTask;
+import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.OverallBuildQueue;
+import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
 import org.apache.continuum.taskqueueexecutor.ParallelBuildsThreadedTaskQueueExecutor;
-import org.apache.maven.continuum.buildqueue.BuildProjectTask;
 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.scm.queue.CheckOutTask;
-import org.apache.maven.continuum.scm.queue.PrepareBuildProjectsTask;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
@@ -531,13 +531,13 @@
     /**
      * @see BuildsManager#prepareBuildProjects(Map, int, int, String)
      */
-    public void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, int trigger, int projectGroupId, String scmRootAddress )
+    public void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, int trigger, int projectGroupId, String projectGroupName, String scmRootAddress, int scmRootId )
         throws BuildManagerException
     {
         try
         {            
             PrepareBuildProjectsTask task =
-                new PrepareBuildProjectsTask( projectsBuildDefinitionsMap, trigger, projectGroupId, scmRootAddress );
+                new PrepareBuildProjectsTask( projectsBuildDefinitionsMap, trigger, projectGroupId, projectGroupName, scmRootAddress, scmRootId );
             
             log.info( "Queueing prepare-build-project task '" + task + "' to prepare-build queue." );
             prepareBuildQueue.put( task );

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java Wed Jan 14 08:31:04 2009
@@ -27,9 +27,9 @@
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.taskqueueexecutor.ParallelBuildsThreadedTaskQueueExecutor;
-import org.apache.maven.continuum.buildqueue.BuildProjectTask;
+import org.apache.continuum.taskqueue.BuildProjectTask;
+import org.apache.continuum.taskqueue.CheckOutTask;
 import org.apache.maven.continuum.model.project.BuildDefinition;
-import org.apache.maven.continuum.scm.queue.CheckOutTask;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.taskqueue.Task;
 import org.codehaus.plexus.taskqueue.TaskQueue;

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/DefaultTaskQueueManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/DefaultTaskQueueManager.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/DefaultTaskQueueManager.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/DefaultTaskQueueManager.java Wed Jan 14 08:31:04 2009
@@ -32,7 +32,8 @@
 import org.apache.continuum.model.repository.RepositoryPurgeConfiguration;
 import org.apache.continuum.purge.PurgeConfigurationService;
 import org.apache.continuum.purge.task.PurgeTask;
-import org.apache.maven.continuum.buildqueue.BuildProjectTask;
+import org.apache.continuum.taskqueue.BuildProjectTask;
+import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.release.tasks.PerformReleaseProjectTask;
 import org.apache.maven.continuum.release.tasks.PrepareReleaseProjectTask;
@@ -60,10 +61,15 @@
 	private Logger log = LoggerFactory.getLogger( DefaultTaskQueueManager.class );
 
     /**
+     * @plexus.requirement role-hint="distributed-build-project"
+     */
+     private TaskQueue distributedBuildQueue;
+
+    /**
      * @plexus.requirement role-hint="purge"
      */
     private TaskQueue purgeQueue;
-    
+
     /**
      * @plexus.requirement role-hint="prepare-release"
      */
@@ -91,10 +97,54 @@
     
     private PlexusContainer container;
 
+    public TaskQueue getDistributedBuildQueue()
+    {
+        return distributedBuildQueue;
+    }
+
+    public List<PrepareBuildProjectsTask> getDistributedBuildProjectsInQueue()
+        throws TaskQueueManagerException
+    {
+        try
+        {
+            return distributedBuildQueue.getQueueSnapshot();
+        }
+        catch ( TaskQueueException e )
+        {
+            throw new TaskQueueManagerException( "Error while getting the distributed building queue", e );
+        }
+    }
+
     public TaskQueue getPurgeQueue()
     {
         return purgeQueue;
-    }    
+    }
+
+    public boolean isInDistributedBuildQueue( int projectGroupId, String scmRootAddress )
+        throws TaskQueueManagerException
+    {
+        try
+        {
+            List<PrepareBuildProjectsTask> queue = distributedBuildQueue.getQueueSnapshot();
+
+            for ( PrepareBuildProjectsTask task : queue )
+            {
+                if ( task != null )
+                {
+                    if ( task.getProjectGroupId() == projectGroupId && task.getScmRootAddress().equals( scmRootAddress ) )
+                    {
+                        return true;
+                    }
+                }
+            }
+
+            return false;
+        }
+        catch ( TaskQueueException e )
+        {
+            throw new TaskQueueManagerException( "Error while getting the tasks in distributed build queue", e );
+        }
+    }
     
     public boolean isInPurgeQueue( int purgeConfigId )
         throws TaskQueueManagerException
@@ -241,6 +291,21 @@
         return false;
     }
 
+    public boolean removeFromDistributedBuildQueue( int projectGroupId, String scmRootAddress )
+        throws TaskQueueManagerException
+    {
+        List<PrepareBuildProjectsTask> queue = getDistributedBuildProjectsInQueue();
+
+        for ( PrepareBuildProjectsTask task : queue )
+        {
+            if ( task != null && task.getProjectGroupId() == projectGroupId && task.getScmRootAddress().equals( scmRootAddress ) )
+            {
+                return distributedBuildQueue.remove( task );
+            }
+        }
+        return false;
+    }
+
     public boolean removeFromPurgeQueue( int purgeConfigId )
         throws TaskQueueManagerException
     {
@@ -303,6 +368,20 @@
             removeFromPurgeQueue( repoPurge.getId() );
         }
     }
+
+    public void removeTasksFromDistributedBuildQueueWithHashCodes( int[] hashCodes )
+        throws TaskQueueManagerException
+    {
+        List<PrepareBuildProjectsTask> queue = getDistributedBuildProjectsInQueue();
+        
+        for ( PrepareBuildProjectsTask task : queue )
+        {
+            if ( ArrayUtils.contains( hashCodes, task.hashCode() ) )
+            {
+                distributedBuildQueue.remove( task );
+            }
+        }
+    }
     
     public void contextualize( Context context )
         throws ContextException

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Wed Jan 14 08:31:04 2009
@@ -52,8 +52,10 @@
 import org.apache.continuum.purge.ContinuumPurgeManager;
 import org.apache.continuum.purge.PurgeConfigurationService;
 import org.apache.continuum.repository.RepositoryService;
+import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
 import org.apache.continuum.taskqueue.manager.TaskQueueManager;
 import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
+import org.apache.continuum.utils.ProjectSorter;
 import org.apache.maven.continuum.build.settings.SchedulesActivationException;
 import org.apache.maven.continuum.build.settings.SchedulesActivator;
 import org.apache.maven.continuum.builddefinition.BuildDefinitionService;
@@ -87,7 +89,6 @@
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.apache.maven.continuum.utils.ContinuumUrlValidator;
-import org.apache.maven.continuum.utils.ProjectSorter;
 import org.apache.maven.continuum.utils.WorkingDirectoryService;
 import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
@@ -102,6 +103,7 @@
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.StoppingException;
+import org.codehaus.plexus.taskqueue.TaskQueueException;
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.dag.CycleDetectedException;
@@ -916,7 +918,7 @@
         Collection<Project> projectsList;
 
         Map projectsMap = null;
-        
+
         try
         {
             projectsMap = daoUtils.getAggregatedProjectIdsAndBuildDefinitionIdsBySchedule( schedule.getId() );
@@ -957,7 +959,7 @@
                                 !parallelBuildsManager.isInAnyCheckoutQueue( project.getId() ) && !parallelBuildsManager.isInPrepareBuildQueue( project.getId() ) )
                         {
                             ProjectScmRoot scmRoot = getProjectScmRootByProject( project.getId() );
-                            
+
                             Map<Integer, Integer> projectsAndBuildDefinitionsMap = map.get( scmRoot );
                             
                             if ( projectsAndBuildDefinitionsMap == null )
@@ -1001,7 +1003,7 @@
         {
             throw new ContinuumException( "Project (id=" + projectId + ") is currently in release stage." );
         }
-            
+
         BuildDefinition buildDef = getDefaultBuildDefinition( projectId );
 
         if ( buildDef == null )
@@ -1027,7 +1029,8 @@
         projectsBuildDefinitionsMap.put( projectId, buildDef.getId() );
         
         ProjectScmRoot scmRoot = getProjectScmRootByProject( projectId );
-        prepareBuildProjects( projectsBuildDefinitionsMap, trigger, scmRoot.getScmRootAddress(), scmRoot.getProjectGroup().getId() );
+        prepareBuildProjects( projectsBuildDefinitionsMap, trigger, scmRoot.getScmRootAddress(), 
+                              scmRoot.getProjectGroup().getId(), scmRoot.getId() );
     }
 
     public void buildProject( int projectId, int buildDefinitionId, int trigger )
@@ -1057,7 +1060,8 @@
         projectsBuildDefinitionsMap.put( projectId, buildDefinitionId );
 
         ProjectScmRoot scmRoot = getProjectScmRootByProject( projectId );
-        prepareBuildProjects( projectsBuildDefinitionsMap, trigger, scmRoot.getScmRootAddress(), scmRoot.getProjectGroup().getId() );
+        prepareBuildProjects( projectsBuildDefinitionsMap, trigger, scmRoot.getScmRootAddress(), 
+                              scmRoot.getProjectGroup().getId(), scmRoot.getId() );
     }
 
     public BuildResult getBuildResult( int buildId )
@@ -1502,7 +1506,10 @@
 
         executeAction( "store-project", context );
 
-        executeAction( "add-project-to-checkout-queue", context );
+        if ( !configurationService.isDistributedBuildEnabled() )
+        {
+            executeAction( "add-project-to-checkout-queue", context );
+        }
 
         executeAction( "add-assignable-roles", context );
 
@@ -1658,7 +1665,7 @@
 
             String url = (String) context.get( CreateProjectsFromMetadataAction.KEY_URL );
             
-            projectScmRoot = projectScmRootDao.getProjectScmRootByProjectGroupAndScmRootAddress( projectGroup.getId(), url );
+            projectScmRoot = getProjectScmRootByProjectGroupAndScmRootAddress( projectGroup.getId(), url );
             
             if ( projectScmRoot == null )
             {
@@ -1752,8 +1759,11 @@
                     
                 // used by BuildManager to determine on which build queue will the project be put
                 context.put( AbstractContinuumAction.KEY_BUILD_DEFINITION, defaultBuildDefinition );
-                
-                executeAction( "add-project-to-checkout-queue", context );
+
+                if ( !configurationService.isDistributedBuildEnabled() )
+                {
+                    executeAction( "add-project-to-checkout-queue", context );
+                }
             }
         }
         catch ( BuildDefinitionServiceException e )
@@ -3300,7 +3310,20 @@
         }
         return null;
     }
-    
+
+    public ProjectScmRoot getProjectScmRootByProjectGroupAndScmRootAddress( int projectGroupId, String scmRootAddress )
+        throws ContinuumException
+    {
+        try
+        {
+            return projectScmRootDao.getProjectScmRootByProjectGroupAndScmRootAddress( projectGroupId, scmRootAddress );
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw new ContinuumException( "Error while retrieving project scm root for " + projectGroupId, e );
+        }
+    }
+
     public BuildQueue addBuildQueue( BuildQueue buildQueue ) throws ContinuumException
     {
         try
@@ -3487,7 +3510,7 @@
                 }
                 
                 ProjectScmRoot scmRoot = getProjectScmRootByProject( projectId );
-                
+
                 Map<Integer, Integer> projectsAndBuildDefinitionsMap = map.get( scmRoot );
                 
                 if ( projectsAndBuildDefinitionsMap == null )
@@ -3513,19 +3536,44 @@
     {
         for ( ProjectScmRoot scmRoot : map.keySet() )
         {
-            prepareBuildProjects( map.get( scmRoot ), trigger, scmRoot.getScmRootAddress(), scmRoot.getProjectGroup().getId() );
+            prepareBuildProjects( map.get( scmRoot ), trigger, scmRoot.getScmRootAddress(),
+                                  scmRoot.getProjectGroup().getId(), scmRoot.getId() );
         }
     }
 
     private void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, int trigger, 
-                                       String scmRootAddress, int projectGroupId )
+                                       String scmRootAddress, int projectGroupId, int scmRootId )
         throws ContinuumException
     {
+        ProjectGroup group = getProjectGroup( projectGroupId );
+        
         try
-        {     
-        	parallelBuildsManager.prepareBuildProjects(
+        {
+            if ( configurationService.isDistributedBuildEnabled() )
+            {
+                if ( !taskQueueManager.isInDistributedBuildQueue( projectGroupId, scmRootAddress ) )
+                {
+                    PrepareBuildProjectsTask task = new PrepareBuildProjectsTask( projectsBuildDefinitionsMap, trigger,
+                                                                      projectGroupId, group.getName(), 
+                                                                      scmRootAddress, scmRootId );
+                    
+                    taskQueueManager.getDistributedBuildQueue().put( task );
+                }
+            }
+            else
+            {
+        	    parallelBuildsManager.prepareBuildProjects(
 					projectsBuildDefinitionsMap, trigger, projectGroupId,
-					scmRootAddress);
+					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 )
         {

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java Wed Jan 14 08:31:04 2009
@@ -19,7 +19,7 @@
  * under the License.
  */
 
-import org.apache.maven.continuum.buildqueue.BuildProjectTask;
+import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.codehaus.plexus.taskqueue.Task;
 import org.codehaus.plexus.taskqueue.execution.TaskExecutionException;
 import org.codehaus.plexus.taskqueue.execution.TaskExecutor;

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java Wed Jan 14 08:31:04 2009
@@ -25,6 +25,7 @@
 import org.apache.continuum.dao.ProjectGroupDao;
 import org.apache.continuum.dao.ProjectScmRootDao;
 import org.apache.continuum.model.project.ProjectScmRoot;
+import org.apache.continuum.utils.ContinuumUtils;
 import org.apache.maven.continuum.core.action.AbstractContinuumAction;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorConstants;
@@ -39,7 +40,6 @@
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
 import org.apache.maven.continuum.store.ContinuumStoreException;
-import org.apache.maven.continuum.utils.ContinuumUtils;
 import org.apache.maven.continuum.utils.WorkingDirectoryService;
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.repository.ScmRepositoryException;

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java Wed Jan 14 08:31:04 2009
@@ -19,7 +19,7 @@
  * under the License.
  */
 
-import org.apache.maven.continuum.buildqueue.BuildProjectTask;
+import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.taskqueue.TaskViabilityEvaluator;
 

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java Wed Jan 14 08:31:04 2009
@@ -23,6 +23,7 @@
 import org.apache.continuum.dao.ProjectDao;
 import org.apache.continuum.scm.ContinuumScm;
 import org.apache.continuum.scm.ContinuumScmConfiguration;
+import org.apache.continuum.utils.ContinuumUtils;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.scm.ScmResult;
@@ -30,7 +31,6 @@
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
 import org.apache.maven.continuum.store.ContinuumStoreException;
-import org.apache.maven.continuum.utils.ContinuumUtils;
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.command.checkout.CheckOutScmResult;
 import org.apache.maven.scm.manager.NoSuchScmProviderException;

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java Wed Jan 14 08:31:04 2009
@@ -21,6 +21,7 @@
 
 import org.apache.continuum.dao.BuildResultDao;
 import org.apache.continuum.dao.ProjectDao;
+import org.apache.continuum.utils.ContinuumUtils;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.execution.ContinuumBuildCancelledException;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutionResult;
@@ -32,7 +33,6 @@
 //import org.apache.maven.continuum.model.scm.ScmResult;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.project.ContinuumProjectState;
-import org.apache.maven.continuum.utils.ContinuumUtils;
 
 import java.io.File;
 import java.util.Date;

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java Wed Jan 14 08:31:04 2009
@@ -23,6 +23,7 @@
 import org.apache.continuum.dao.ProjectDao;
 import org.apache.continuum.scm.ContinuumScm;
 import org.apache.continuum.scm.ContinuumScmConfiguration;
+import org.apache.continuum.utils.ContinuumUtils;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
@@ -30,10 +31,8 @@
 import org.apache.maven.continuum.model.scm.ChangeSet;
 import org.apache.maven.continuum.model.scm.ScmResult;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
-import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
 import org.apache.maven.continuum.store.ContinuumStoreException;
-import org.apache.maven.continuum.utils.ContinuumUtils;
 import org.apache.maven.continuum.utils.WorkingDirectoryService;
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFile;
@@ -88,11 +87,13 @@
 
         BuildDefinition buildDefinition = getBuildDefinition( context );
 
-        int state = project.getState();
+        // do not set state of project to updating
 
-        project.setState( ContinuumProjectState.UPDATING );
+        //int state = project.getState();
 
-        projectDao.updateProject( project );
+        //project.setState( ContinuumProjectState.UPDATING );
+
+        //projectDao.updateProject( project );
 
         UpdateScmResult scmResult;
 
@@ -175,19 +176,19 @@
         {
             // set back to the original state
             // TODO: transient states!
-            try
-            {
-                project = projectDao.getProject( project.getId() );
-
-                project.setState( state );
-
-                projectDao.updateProject( project );
-            }
-            catch ( Exception e )
-            {
+            //try
+            //{
+            //    project = projectDao.getProject( project.getId() );
+
+            //    project.setState( state );
+
+            //    projectDao.updateProject( project );
+            //}
+            //catch ( Exception e )
+            //{
                 // nasty nasty, but we're in finally, so just sacrifice the state to keep the original exception
-                getLogger().error( e.getMessage(), e );
-            }
+            //    getLogger().error( e.getMessage(), e );
+            //}
 
             notifier.checkoutComplete( project, buildDefinition );
         }

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java Wed Jan 14 08:31:04 2009
@@ -161,7 +161,7 @@
         LocalRepository repository = project.getProjectGroup().getLocalRepository();
         if ( repository != null )
         {
-            arguments.append( "\"-Dmaven.repo.local=" ).append( StringUtils.clean(repository.getLocation() ) ).append( "\" " );
+            arguments.append( "\"-Dmaven.repo.local=" ).append( StringUtils.clean( repository.getLocation() ) ).append( "\" " );
         }
         
         arguments.append( StringUtils.clean( buildDefinition.getGoals() ) );

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java Wed Jan 14 08:31:04 2009
@@ -20,6 +20,7 @@
  */
 
 import org.apache.continuum.dao.ProjectDao;
+import org.apache.continuum.taskqueue.CheckOutTask;
 import org.apache.maven.continuum.core.action.AbstractContinuumAction;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.store.ContinuumStoreException;

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java Wed Jan 14 08:31:04 2009
@@ -29,6 +29,9 @@
 import org.apache.continuum.dao.ProjectDao;
 import org.apache.continuum.dao.ProjectScmRootDao;
 import org.apache.continuum.model.project.ProjectScmRoot;
+import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
+import org.apache.continuum.utils.ContinuumUtils;
+import org.apache.continuum.utils.ProjectSorter;
 import org.apache.maven.continuum.core.action.AbstractContinuumAction;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Project;
@@ -38,8 +41,6 @@
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.store.ContinuumStoreException;
-import org.apache.maven.continuum.utils.ContinuumUtils;
-import org.apache.maven.continuum.utils.ProjectSorter;
 import org.apache.maven.continuum.utils.WorkingDirectoryService;
 import org.codehaus.plexus.action.ActionManager;
 import org.codehaus.plexus.action.ActionNotFoundException;
@@ -468,7 +469,7 @@
 
         List<Project> projectsToBeBuilt = new ArrayList<Project>();
         Map<Integer, BuildDefinition> projectsBuildDefinitionsMap = new HashMap<Integer, BuildDefinition>();
-        
+
         for ( Project project : projectList )
         {
             //boolean shouldBuild = false;

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/continuum/buildmanager/ParallelBuildsManagerTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/continuum/buildmanager/ParallelBuildsManagerTest.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/continuum/buildmanager/ParallelBuildsManagerTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/continuum/buildmanager/ParallelBuildsManagerTest.java Wed Jan 14 08:31:04 2009
@@ -30,12 +30,12 @@
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.taskqueue.OverallBuildQueue;
 import org.apache.continuum.taskqueueexecutor.ParallelBuildsThreadedTaskQueueExecutor;
-import org.apache.maven.continuum.buildqueue.BuildProjectTask;
+import org.apache.continuum.taskqueue.BuildProjectTask;
+import org.apache.continuum.taskqueue.CheckOutTask;
 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.Schedule;
-import org.apache.maven.continuum.scm.queue.CheckOutTask;
 import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 import org.codehaus.plexus.taskqueue.Task;
 import org.codehaus.plexus.taskqueue.TaskQueue;

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueueTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueueTest.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueueTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueueTest.java Wed Jan 14 08:31:04 2009
@@ -25,9 +25,9 @@
 
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.taskqueueexecutor.ParallelBuildsThreadedTaskQueueExecutor;
-import org.apache.maven.continuum.buildqueue.BuildProjectTask;
+import org.apache.continuum.taskqueue.BuildProjectTask;
+import org.apache.continuum.taskqueue.CheckOutTask;
 import org.apache.maven.continuum.model.project.BuildDefinition;
-import org.apache.maven.continuum.scm.queue.CheckOutTask;
 import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 import org.codehaus.plexus.taskqueue.Task;
 import org.codehaus.plexus.taskqueue.TaskQueue;

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java Wed Jan 14 08:31:04 2009
@@ -19,8 +19,8 @@
  * under the License.
  */
 
+import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.maven.continuum.AbstractContinuumTest;
-import org.apache.maven.continuum.buildqueue.BuildProjectTask;
 import org.apache.maven.continuum.core.action.AbstractContinuumAction;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Project;

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java Wed Jan 14 08:31:04 2009
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+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.project.ContinuumProjectState;

Propchange: continuum/trunk/continuum-distributed-build/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan 14 08:31:04 2009
@@ -0,0 +1,2 @@
+target
+*.iml

Propchange: continuum/trunk/continuum-distributed-build/continuum-buildagent/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan 14 08:31:04 2009
@@ -0,0 +1,7 @@
+.settings
+build
+target
+.classpath
+.project
+*.iml
+bin

Propchange: continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan 14 08:31:04 2009
@@ -0,0 +1,7 @@
+.settings
+build
+target
+.classpath
+.project
+*.iml
+bin

Propchange: continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan 14 08:31:04 2009
@@ -0,0 +1,7 @@
+.settings
+build
+target
+.classpath
+.project
+*.iml
+bin

Propchange: continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m1/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Wed Jan 14 08:31:04 2009
@@ -0,0 +1,2 @@
+/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m1:713270-734307
+/continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m1:724671-733412

Propchange: continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-jetty/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan 14 08:31:04 2009
@@ -0,0 +1,4 @@
+bin
+target
+.classpath
+.project

Propchange: continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-webapp/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan 14 08:31:04 2009
@@ -0,0 +1,6 @@
+.settings
+build
+target
+.classpath
+.project
+*.iml

Propchange: continuum/trunk/continuum-distributed-build/continuum-distributed-build-transport/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan 14 08:31:04 2009
@@ -0,0 +1,2 @@
+target
+*.iml

Propchange: continuum/trunk/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan 14 08:31:04 2009
@@ -0,0 +1,3 @@
+target
+*.iml
+bin

Propchange: continuum/trunk/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/continuum-distributed-build-transport-master-api/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan 14 08:31:04 2009
@@ -0,0 +1,6 @@
+.settings
+target
+.classpath
+.project
+build
+*.iml

Propchange: continuum/trunk/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/continuum-distributed-build-transport-master-client/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan 14 08:31:04 2009
@@ -0,0 +1,6 @@
+.settings
+target
+.classpath
+.project
+build
+*.iml

Propchange: continuum/trunk/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/continuum-distributed-build-transport-master-server/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan 14 08:31:04 2009
@@ -0,0 +1,6 @@
+.settings
+target
+.classpath
+.project
+build
+*.iml

Propchange: continuum/trunk/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-slave/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan 14 08:31:04 2009
@@ -0,0 +1,3 @@
+target
+*.iml
+bin

Propchange: continuum/trunk/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-slave/continuum-distributed-build-transport-slave-api/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan 14 08:31:04 2009
@@ -0,0 +1,6 @@
+.settings
+target
+.classpath
+.project
+build
+*.iml

Propchange: continuum/trunk/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-slave/continuum-distributed-build-transport-slave-client/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan 14 08:31:04 2009
@@ -0,0 +1,6 @@
+.settings
+build
+target
+.classpath
+.project
+*.iml

Propchange: continuum/trunk/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-slave/continuum-distributed-build-transport-slave-server/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan 14 08:31:04 2009
@@ -0,0 +1,5 @@
+.settings
+build
+target
+.classpath
+.project

Propchange: continuum/trunk/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-tests/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan 14 08:31:04 2009
@@ -0,0 +1,6 @@
+.settings
+build
+target
+.classpath
+.project
+bin

Modified: continuum/trunk/continuum-docs/src/site/apt/administrator_guides/configuration.apt
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-docs/src/site/apt/administrator_guides/configuration.apt?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-docs/src/site/apt/administrator_guides/configuration.apt (original)
+++ continuum/trunk/continuum-docs/src/site/apt/administrator_guides/configuration.apt Wed Jan 14 08:31:04 2009
@@ -23,10 +23,17 @@
 *---------------------------------+------------------------------------------------------+
 | Number of Allowed Builds in Parallel | The number of build queues that will be utilized to build projects. This allows concurrent checkouts and builds of multiple projects. Available since version 1.3.1. |
 *---------------------------------+------------------------------------------------------+
+| Enable Distributed Builds       | When checked, this Continuum instance will delegate all builds to configured agents. |
+*---------------------------------+------------------------------------------------------+
 
     You can modify values or keep defaults then save. 
 
-    You'll can modify values at a later time with the following steps:
+    Although Continuum defaults to storing its data within the installation, it is a best practice to separate the
+    installation and data directories.
+
+    These values can be pre-configured in continuum.xml.  Make sure that Continuum is not running when editing this file.
+
+    You can modify values at a later time with the following steps:
 
     [[1]] Login to Continuum with an Administrator account
 

Modified: continuum/trunk/continuum-docs/src/site/apt/administrator_guides/index.apt
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-docs/src/site/apt/administrator_guides/index.apt?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-docs/src/site/apt/administrator_guides/index.apt (original)
+++ continuum/trunk/continuum-docs/src/site/apt/administrator_guides/index.apt Wed Jan 14 08:31:04 2009
@@ -18,6 +18,8 @@
 
  * {{{profiles.html}Managing Build Environments}}
 
+ * {{{build-agents.html}Managing Build Agents}}
+
  * {{{schedules.html}Managing Schedules}}
 
  * {{{configuration.html}Managing General Configuration}}
@@ -37,3 +39,5 @@
  * {{{builddefTemplate.html}Build Definition Templates}}
 
  * {{{shutdown.html}Shutting Down Continuum}}
+
+ * {{{distributed-builds.html}Distributed Builds}}
\ No newline at end of file

Copied: continuum/trunk/continuum-docs/src/site/resources/images/build-agent-edit.png (from r734307, continuum/branches/continuum-distributed-builds/continuum-docs/src/site/resources/images/build-agent-edit.png)
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-docs/src/site/resources/images/build-agent-edit.png?p2=continuum/trunk/continuum-docs/src/site/resources/images/build-agent-edit.png&p1=continuum/branches/continuum-distributed-builds/continuum-docs/src/site/resources/images/build-agent-edit.png&r1=734307&r2=734441&rev=734441&view=diff
==============================================================================
Binary files - no diff available.

Modified: continuum/trunk/continuum-docs/src/site/resources/images/configuration.png
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-docs/src/site/resources/images/configuration.png?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
Binary files - no diff available.

Propchange: continuum/trunk/continuum-docs/src/site/xdoc/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 14 08:31:04 2009
@@ -1,2 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-docs/src/site/xdoc:698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024,725845,726103,726239,726462
+/continuum/branches/continuum-distributed-builds/continuum-docs/src/site/xdoc:713270-734307
 /continuum/trunk/continuum-docs/src/site/xdoc:690494-690520

Modified: continuum/trunk/continuum-model/src/main/mdo/continuum.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-model/src/main/mdo/continuum.xml?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-model/src/main/mdo/continuum.xml (original)
+++ continuum/trunk/continuum-model/src/main/mdo/continuum.xml Wed Jan 14 08:31:04 2009
@@ -1279,6 +1279,11 @@
           <type>int</type>
           <defaultValue>1</defaultValue>
         </field>
+        <field>
+          <name>distributedBuildEnabled</name>
+          <version>1.1.4+</version>
+          <type>boolean</type>
+        </field>
       </fields>
     </class>
 

Modified: continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java (original)
+++ continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java Wed Jan 14 08:31:04 2009
@@ -121,4 +121,6 @@
     public static final String CONTINUUM_MANAGE_REPOSITORIES = "continuum-manage-repositories";
     
     public static final String CONTINUUM_MANAGE_PURGING = "continuum-manage-purging";
+
+    public static final String CONTINUUM_MANAGE_DISTRIBUTED_BUILDS = "continuum-manage-distributed-builds";
 }

Modified: continuum/trunk/continuum-security/src/main/resources/META-INF/redback/redback.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-security/src/main/resources/META-INF/redback/redback.xml?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-security/src/main/resources/META-INF/redback/redback.xml (original)
+++ continuum/trunk/continuum-security/src/main/resources/META-INF/redback/redback.xml Wed Jan 14 08:31:04 2009
@@ -185,6 +185,11 @@
           <name>continuum-manage-purging</name>
           <description>Continuum Manage Purging</description>
         </operation>
+        <operation>
+          <id>continuum-manage-distributed-builds</id>
+          <name>continuum-manage-distributed-builds</name>
+          <description>Continuum Manage Distributed Builds</description>
+        </operation>
       </operations>
       <roles>
         <role>
@@ -200,6 +205,13 @@
               <operation>continuum-manage-configuration</operation>
               <resource>global</resource>
             </permission>
+            <permission>
+              <id>continuum-manage-distributed-builds</id>
+              <name>Manage Continuum Distributed Builds</name>
+              <permanent>true</permanent>
+              <operation>continuum-manage-distributed-builds</operation>
+              <resource>global</resource>
+            </permission>
           </permissions>
           <parentRoles>
             <parentRole>system-administrator</parentRole>

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectDaoImpl.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectDaoImpl.java (original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectDaoImpl.java Wed Jan 14 08:31:04 2009
@@ -298,4 +298,10 @@
 
         }
     }
+
+    public Project getProjectWithDependencies( int projectId )
+        throws ContinuumStoreException
+    {
+        return (Project) getObjectById( Project.class, projectId, PROJECT_DEPENDENCIES_FETCH_GROUP );
+    }
 }

Modified: continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/configuration/ConfigurationServiceMock.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/configuration/ConfigurationServiceMock.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/configuration/ConfigurationServiceMock.java (original)
+++ continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/configuration/ConfigurationServiceMock.java Wed Jan 14 08:31:04 2009
@@ -20,11 +20,13 @@
  */
 
 import org.apache.continuum.buildqueue.BuildQueueServiceException;
+import org.apache.continuum.configuration.BuildAgentConfiguration;
 import org.apache.maven.continuum.model.project.BuildQueue;
 import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 
 import java.io.File;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -195,7 +197,7 @@
     {
         return null;
     }
-    
+
     public Schedule getDefaultSchedule()
         throws ContinuumStoreException
     {
@@ -257,4 +259,31 @@
     {
         
     }
+
+    public void addBuildAgent( BuildAgentConfiguration buildAgent )
+        throws ConfigurationException
+    {    
+    }
+
+    public List<BuildAgentConfiguration> getBuildAgents()
+    {
+        return null;
+    }
+
+    public boolean isDistributedBuildEnabled()
+    {
+        return false;
+    }
+
+    public void removeBuildAgent( BuildAgentConfiguration buildAgent )
+    {   
+    }
+
+    public void setDistributedBuildEnabled( boolean distributedBuildEnabled )
+    {
+    }
+
+    public void updateBuildAgent( BuildAgentConfiguration buildAgent )
+    {
+    }
 }

Propchange: continuum/trunk/continuum-webapp-test/src/test/selenium-ide/
------------------------------------------------------------------------------
    svn:mergeinfo = 

Modified: continuum/trunk/continuum-webapp/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/pom.xml?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/pom.xml (original)
+++ continuum/trunk/continuum-webapp/pom.xml Wed Jan 14 08:31:04 2009
@@ -461,6 +461,10 @@
     <dependency>
       <groupId>org.apache.continuum</groupId>
       <artifactId>continuum-reports</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.continuum</groupId>
+      <artifactId>continuum-distributed-build-transport-master-server</artifactId>
     </dependency>    
     <dependency>
       <groupId>org.apache.maven.wagon</groupId>

Copied: continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java (from r734307, continuum/branches/continuum-distributed-builds/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java)
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java?p2=continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java&p1=continuum/branches/continuum-distributed-builds/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java&r1=734307&r2=734441&rev=734441&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java Wed Jan 14 08:31:04 2009
@@ -21,6 +21,7 @@
 
 import org.apache.continuum.configuration.BuildAgentConfiguration;
 import org.apache.continuum.builder.distributed.manager.DistributedBuildManager;
+import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.system.Installation;
 import org.apache.maven.continuum.security.ContinuumRoleConstants;
@@ -108,7 +109,16 @@
             if ( agent.getUrl().equals( buildAgent.getUrl() ) )
             {
                 buildAgent = agent;
-                installations = distributedBuildManager.getAvailableInstallations( buildAgent.getUrl() );
+
+                try
+                {
+                    installations = distributedBuildManager.getAvailableInstallations( buildAgent.getUrl() );
+                }
+                catch ( ContinuumException e )
+                {
+                    getLogger().error( "Unable to retrieve installations of build agent '" + agent.getUrl() + "'", e );
+                }
+
                 break;
             }
         }

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java?rev=734441&r1=734440&r2=734441&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java Wed Jan 14 08:31:04 2009
@@ -23,6 +23,7 @@
 import javax.servlet.ServletContextListener;
 
 import org.apache.continuum.buildmanager.BuildsManager;
+import org.apache.continuum.builder.distributed.manager.DistributedBuildManager;
 import org.apache.maven.continuum.Continuum;
 import org.codehaus.plexus.spring.PlexusToSpringUtils;
 import org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor;
@@ -61,7 +62,7 @@
 
         // to simulate Plexus load on start with Spring
         Continuum continuum = (Continuum) wac.getBean( PlexusToSpringUtils.buildSpringId( Continuum.class ) );
-        
+
         BuildsManager buildsManager = (BuildsManager) wac.getBean( PlexusToSpringUtils.buildSpringId( BuildsManager.class, "parallel" ) );
 
         TaskQueueExecutor prepareRelease = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
@@ -78,6 +79,9 @@
 
         TaskQueueExecutor prepareBuildProject = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
             .buildSpringId( TaskQueueExecutor.class, "prepare-build-project" ) );
+
+        DistributedBuildManager distributedBuildManager = (DistributedBuildManager) wac.getBean( PlexusToSpringUtils
+            .buildSpringId( DistributedBuildManager.class ) );
     }
 
 }



Mime
View raw message