continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r726638 [1/2] - in /continuum/branches/continuum-distributed-builds: ./ continuum-builder/src/test/java/org/apache/continuum/builder/distributed/manager/ continuum-distributed-build/continuum-buildagent/ continuum-distributed-build/continuu...
Date Mon, 15 Dec 2008 07:48:40 GMT
Author: ctan
Date: Sun Dec 14 23:48:38 2008
New Revision: 726638

URL: http://svn.apache.org/viewvc?rev=726638&view=rev
Log:
- added build executions
- updated transport pom.xml

Added:
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/.classpath
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/.project
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/.settings/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/.settings/org.eclipse.jdt.core.prefs
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/pom.xml
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/java/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/java/org/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentException.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/mdo/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/mdo/continuum-buildagent.xml
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/.classpath
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/.project
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/.settings/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/.settings/org.eclipse.jdt.core.prefs
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/pom.xml
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CheckWorkingDirectoryAction.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CheckoutProjectAction.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CleanWorkingDirectoryAction.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/ExecuteBuilderAction.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/BuildContextManager.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/DefaultBuildContextManager.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ConfigurationService.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ContinuumBuildAgentConfiguration.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ContinuumConfiguration.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ContinuumConfigurationException.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultConfigurationService.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultContinuumConfiguration.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildTaskExecutor.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/TaskQueueManager.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/BuildContextToBuildDefinition.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/BuildContextToProject.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/resources/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/resources/META-INF/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/resources/META-INF/plexus/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/resources/META-INF/plexus/components.xml
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/test/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/test/java/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/test/java/org/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/
Removed:
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/src/
Modified:
    continuum/branches/continuum-distributed-builds/continuum-builder/src/test/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManagerTest.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/pom.xml
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-common/pom.xml
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-common/src/main/java/org/apache/continuum/distributed/transport/SlaveBuildAgentTransportService.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/pom.xml
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/src/main/java/org/apache/continuum/distributed/transport/master/DefaultMasterBuildAgentTransportService.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-master/src/main/java/org/apache/continuum/distributed/transport/master/ProxySlaveAgentTransportService.java
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-slave/pom.xml
    continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-distributed-build-transport/continuum-distributed-build-transport-slave/src/main/java/org/apache/continuum/distributed/transport/slave/DefaultSlaveBuildAgentTransportService.java
    continuum/branches/continuum-distributed-builds/pom.xml

Modified: continuum/branches/continuum-distributed-builds/continuum-builder/src/test/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManagerTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-builder/src/test/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManagerTest.java?rev=726638&r1=726637&r2=726638&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-builder/src/test/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManagerTest.java (original)
+++ continuum/branches/continuum-distributed-builds/continuum-builder/src/test/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManagerTest.java Sun Dec 14 23:48:38 2008
@@ -47,15 +47,13 @@
 
         Map context = new HashMap();
         context.put( "project-id", project.getId() );
-        context.put( "project-group-id", project.getProjectGroup().getId() );
-        context.put( "scm-root-address", scmRoot.getScmRootAddress() );
         context.put( "scm-command-line", null );
         context.put( "scm-command-output", null );
         context.put( "scm-exception", null );
         context.put( "scm-provider-message", null );
-        context.put( "prepare-build-finished", true );
+        context.put( "scm-success", true );
 
-        distributedBuildManager.updateProjectScmRoot( context );
+        distributedBuildManager.updateScmResult( context );
 
         project = getProjectDao().getProjectWithScmDetails( project.getId() );
 

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/.classpath
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/.classpath?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/.classpath (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/.classpath Sun Dec 14 23:48:38 2008
@@ -0,0 +1,12 @@
+<classpath>
+  <classpathentry kind="src" path="src/main/java"/>
+  <classpathentry kind="src" path="src/test/java"/>
+  <classpathentry kind="src" path="target/generated-sources/modello"/>
+  <classpathentry kind="src" path="target/maven-shared-archive-resources" excluding="**/*.java"/>
+  <classpathentry kind="output" path="build"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-utils/1.5.4/plexus-utils-1.5.4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/net/java/dev/stax-utils/stax-utils/20060502/stax-utils-20060502.jar" sourcepath="M2_REPO/net/java/dev/stax-utils/stax-utils/20060502/stax-utils-20060502-sources.jar"/>
+</classpath>
\ No newline at end of file

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/.project
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/.project?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/.project (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/.project Sun Dec 14 23:48:38 2008
@@ -0,0 +1,13 @@
+<projectDescription>
+  <name>continuum-buildagent-api</name>
+  <comment>Continuum is a continuous integration server for building maven1/2 projects, ant projects and shell projects.</comment>
+  <projects/>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/.settings/org.eclipse.jdt.core.prefs?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/.settings/org.eclipse.jdt.core.prefs (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/.settings/org.eclipse.jdt.core.prefs Sun Dec 14 23:48:38 2008
@@ -0,0 +1,5 @@
+#Mon Dec 15 07:38:55 PHT 2008
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/pom.xml?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/pom.xml (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/pom.xml Sun Dec 14 23:48:38 2008
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.continuum</groupId>
+    <artifactId>continuum-buildagent</artifactId>
+    <version>1.3.1-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.apache.continuum</groupId>
+  <artifactId>continuum-buildagent-api</artifactId>
+  <packaging>jar</packaging>
+  <name>Continuum :: Distributed Build :: Build Agent API</name>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.modello</groupId>
+        <artifactId>modello-maven-plugin</artifactId>
+        <configuration>
+          <models>
+            <model>src/main/mdo/continuum-buildagent.xml</model>
+          </models>
+          <version>1.0.0</version>
+        </configuration>
+        <executions>
+          <execution>
+            <id>continuum-modello</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>java</goal>
+              <goal>xpp3-reader</goal>
+              <goal>xpp3-writer</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>site-docs</id>
+            <phase>pre-site</phase>
+            <goals>
+              <goal>xdoc</goal>
+              <goal>xsd</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>generate-xsd</id>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>xsd</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${project.build.outputDirectory}/META-INF/continuum/xsd</outputDirectory>
+            </configuration>
+          </execution>                    
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>net.java.dev.stax-utils</groupId>
+      <artifactId>stax-utils</artifactId>
+      <version>20060502</version>
+      <exclusions>
+        <exclusion>
+          <groupId>com.bea.xml</groupId>
+          <artifactId>jsr173-ri</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>stax</groupId>
+      <artifactId>stax-api</artifactId>
+      <version>1.0.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+    </dependency>
+  </dependencies>
+</project>

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentException.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentException.java?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentException.java (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentException.java Sun Dec 14 23:48:38 2008
@@ -0,0 +1,20 @@
+package org.apache.continuum.buildagent;
+
+public class ContinuumBuildAgentException
+    extends Exception
+{
+    public ContinuumBuildAgentException( String message )
+    {
+        super( message );
+    }
+
+    public ContinuumBuildAgentException( Throwable cause )
+    {
+        super( cause );
+    }
+
+    public ContinuumBuildAgentException( String message, Throwable cause )
+    {
+        super( message, cause );
+    }
+}

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java Sun Dec 14 23:48:38 2008
@@ -0,0 +1,26 @@
+package org.apache.continuum.buildagent;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.continuum.buildagent.model.Installation;
+
+public interface ContinuumBuildAgentService
+{
+    void buildProjects( List<Map> projectsBuildContext )
+        throws ContinuumBuildAgentException;
+    
+    List<Installation> getAvailableInstallations()
+        throws ContinuumBuildAgentException;
+    
+    boolean isBusy()
+        throws ContinuumBuildAgentException;
+    
+    Map getBuildResult( int projectId )
+        throws ContinuumBuildAgentException;
+    
+    int getProjectCurrentlyBuilding();
+    
+    void cancelBuild()
+        throws ContinuumBuildAgentException;
+}

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/mdo/continuum-buildagent.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/mdo/continuum-buildagent.xml?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/mdo/continuum-buildagent.xml (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-api/src/main/mdo/continuum-buildagent.xml Sun Dec 14 23:48:38 2008
@@ -0,0 +1,87 @@
+<!--
+  ~ 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.
+  -->
+<model>
+  <id>continuum-buildagent</id>
+  <name>ContinuumBuildAgentConfigurationModel</name>
+  <description>Continuum Build Agent object model.</description>
+  <defaults>
+    <default>
+      <key>package</key>
+      <value>org.apache.continuum.buildagent.model</value>
+    </default>
+  </defaults>
+
+  <classes>
+    <class rootElement="true" xml.tagName="continuum-buildagent-configuration">
+      <name>ContinuumBuildAgentConfigurationModel</name>
+      <version>1.0.0+</version>
+      <fields>
+        <field>
+          <name>buildOutputDirectory</name>
+          <version>1.0.0+</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>workingDirectory</name>
+          <version>1.0.0+</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>continuumServerUrl</name>
+          <version>1.0.0+</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>installations</name>
+          <version>1.0.0+</version>
+          <association>
+            <type>Installation</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+      </fields>
+    </class>
+    <class xml.tagName="buildagent-installation">
+      <name>Installation</name>
+      <version>1.0.0+</version>
+      <fields>
+        <field>
+          <name>type</name>
+          <version>1.0.0+</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>varValue</name>
+          <version>1.0.0+</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>varName</name>
+          <version>1.0.0+</version>
+          <type>String</type>
+        </field>   
+        <field>
+          <name>name</name>
+          <version>1.0.0+</version>
+          <type>String</type>
+        </field>                     
+      </fields>
+    </class>
+  </classes>
+</model>
\ No newline at end of file

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/.classpath
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/.classpath?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/.classpath (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/.classpath Sun Dec 14 23:48:38 2008
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="src" path="src/test/java"/>
+	<classpathentry excluding="**/*.java" kind="src" path="target/maven-shared-archive-resources"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="var" path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" sourcepath="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/backport-util-concurrent/backport-util-concurrent/3.0/backport-util-concurrent-3.0.jar" sourcepath="M2_REPO/backport-util-concurrent/backport-util-concurrent/3.0/backport-util-concurrent-3.0-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/bcel/bcel/5.2/bcel-5.2.jar"/>
+	<classpathentry kind="var" path="M2_REPO/commons-io/commons-io/1.4/commons-io-1.4.jar" sourcepath="M2_REPO/commons-io/commons-io/1.4/commons-io-1.4-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4.jar"/>
+	<classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/continuum/continuum-api/1.3.1-SNAPSHOT/continuum-api-1.3.1-SNAPSHOT.jar"/>
+	<classpathentry kind="src" path="/continuum-buildagent-api"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/continuum/continuum-commons/1.3.1-SNAPSHOT/continuum-commons-1.3.1-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/continuum/continuum-configuration/1.3.1-SNAPSHOT/continuum-configuration-1.3.1-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/continuum/continuum-model/1.3.1-SNAPSHOT/continuum-model-1.3.1-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/continuum/continuum-scm/1.3.1-SNAPSHOT/continuum-scm-1.3.1-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/continuum/continuum-store/1.3.1-SNAPSHOT/continuum-store-1.3.1-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/netbeans/lib/cvsclient/20060125/cvsclient-20060125.jar"/>
+	<classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/shared/file-management/1.1/file-management-1.1.jar" sourcepath="M2_REPO/org/apache/maven/shared/file-management/1.1/file-management-1.1-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/ch/ethz/ganymed/ganymed-ssh2/build210/ganymed-ssh2-build210.jar" sourcepath="M2_REPO/ch/ethz/ganymed/ganymed-ssh2/build210/ganymed-ssh2-build210-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/geronimo-spec/geronimo-spec-jta/1.0.1B-rc2/geronimo-spec-jta-1.0.1B-rc2.jar"/>
+	<classpathentry kind="var" path="M2_REPO/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar"/>
+	<classpathentry kind="var" path="M2_REPO/jaxen/jaxen/1.1-beta-8/jaxen-1.1-beta-8.jar" sourcepath="M2_REPO/jaxen/jaxen/1.1-beta-8/jaxen-1.1-beta-8-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/javax/jdo/jdo2-api/2.0/jdo2-api-2.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/jdom/jdom/1.0/jdom-1.0.jar" sourcepath="M2_REPO/jdom/jdom/1.0/jdom-1.0-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.12/log4j-1.2.12.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-artifact/2.0.9/maven-artifact-2.0.9.jar" sourcepath="M2_REPO/org/apache/maven/maven-artifact/2.0.9/maven-artifact-2.0.9-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-artifact-manager/2.0.9/maven-artifact-manager-2.0.9.jar" sourcepath="M2_REPO/org/apache/maven/maven-artifact-manager/2.0.9/maven-artifact-manager-2.0.9-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-model/2.0.9/maven-model-2.0.9.jar" sourcepath="M2_REPO/org/apache/maven/maven-model/2.0.9/maven-model-2.0.9-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-api/2.0/maven-plugin-api-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-plugin-api/2.0/maven-plugin-api-2.0-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-registry/2.0.9/maven-plugin-registry-2.0.9.jar" sourcepath="M2_REPO/org/apache/maven/maven-plugin-registry/2.0.9/maven-plugin-registry-2.0.9-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-profile/2.0.9/maven-profile-2.0.9.jar" sourcepath="M2_REPO/org/apache/maven/maven-profile/2.0.9/maven-profile-2.0.9-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-project/2.0.9/maven-project-2.0.9.jar" sourcepath="M2_REPO/org/apache/maven/maven-project/2.0.9/maven-project-2.0.9-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/release/maven-release-manager/1.0-alpha-3/maven-release-manager-1.0-alpha-3.jar" sourcepath="M2_REPO/org/apache/maven/release/maven-release-manager/1.0-alpha-3/maven-release-manager-1.0-alpha-3-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-repository-metadata/2.0.9/maven-repository-metadata-2.0.9.jar" sourcepath="M2_REPO/org/apache/maven/maven-repository-metadata/2.0.9/maven-repository-metadata-2.0.9-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/scm/maven-scm-api/1.1/maven-scm-api-1.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/scm/maven-scm-manager-plexus/1.1/maven-scm-manager-plexus-1.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/scm/maven-scm-provider-bazaar/1.0/maven-scm-provider-bazaar-1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/scm/maven-scm-provider-clearcase/1.0/maven-scm-provider-clearcase-1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/scm/maven-scm-provider-cvs-commons/1.1/maven-scm-provider-cvs-commons-1.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/scm/maven-scm-provider-cvsexe/1.0/maven-scm-provider-cvsexe-1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/scm/maven-scm-provider-cvsjava/1.0/maven-scm-provider-cvsjava-1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/scm/maven-scm-provider-hg/1.0/maven-scm-provider-hg-1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/scm/maven-scm-provider-perforce/1.0/maven-scm-provider-perforce-1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/scm/maven-scm-provider-starteam/1.0/maven-scm-provider-starteam-1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/scm/maven-scm-provider-svn-commons/1.1/maven-scm-provider-svn-commons-1.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/scm/maven-scm-provider-svnexe/1.0/maven-scm-provider-svnexe-1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/scm/maven-scm-provider-synergy/1.0/maven-scm-provider-synergy-1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-settings/2.0.9/maven-settings-2.0.9.jar" sourcepath="M2_REPO/org/apache/maven/maven-settings/2.0.9/maven-settings-2.0.9-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/shared/maven-shared-io/1.0/maven-shared-io-1.0.jar" sourcepath="M2_REPO/org/apache/maven/shared/maven-shared-io/1.0/maven-shared-io-1.0-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-classworlds/1.2-alpha-7/plexus-classworlds-1.2-alpha-7.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-classworlds/1.2-alpha-7/plexus-classworlds-1.2-alpha-7-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-component-api/1.0-alpha-20/plexus-component-api-1.0-alpha-20.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-component-api/1.0-alpha-20/plexus-component-api-1.0-alpha-20-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-6/plexus-interactivity-api-1.0-alpha-6.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-6/plexus-interactivity-api-1.0-alpha-6-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-jdo2/1.0-alpha-8/plexus-jdo2-1.0-alpha-8.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-jdo2/1.0-alpha-8/plexus-jdo2-1.0-alpha-8-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-spring/1.2/plexus-spring-1.2.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-taskqueue/1.0-alpha-8/plexus-taskqueue-1.0-alpha-8.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-taskqueue/1.0-alpha-8/plexus-taskqueue-1.0-alpha-8-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-utils/1.5.4/plexus-utils-1.5.4.jar"/>
+	<classpathentry kind="var" path="M2_REPO/regexp/regexp/1.3/regexp-1.3.jar" sourcepath="M2_REPO/regexp/regexp/1.3/regexp-1.3-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.5.0/slf4j-api-1.5.0.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.5.0/slf4j-api-1.5.0-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.5.0/slf4j-log4j12-1.5.0.jar" sourcepath="M2_REPO/org/slf4j/slf4j-log4j12/1.5.0/slf4j-log4j12-1.5.0-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/springframework/spring-beans/2.5.4/spring-beans-2.5.4.jar" sourcepath="M2_REPO/org/springframework/spring-beans/2.5.4/spring-beans-2.5.4-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/springframework/spring-context/2.5.4/spring-context-2.5.4.jar" sourcepath="M2_REPO/org/springframework/spring-context/2.5.4/spring-context-2.5.4-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/springframework/spring-core/2.5.4/spring-core-2.5.4.jar" sourcepath="M2_REPO/org/springframework/spring-core/2.5.4/spring-core-2.5.4-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/net/java/dev/stax-utils/stax-utils/20060502/stax-utils-20060502.jar" sourcepath="M2_REPO/net/java/dev/stax-utils/stax-utils/20060502/stax-utils-20060502-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-provider-api/1.0-beta-2/wagon-provider-api-1.0-beta-2.jar" sourcepath="M2_REPO/org/apache/maven/wagon/wagon-provider-api/1.0-beta-2/wagon-provider-api-1.0-beta-2-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar" sourcepath="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-action/1.0-alpha-6/plexus-action-1.0-alpha-6.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-action/1.0-alpha-6/plexus-action-1.0-alpha-6-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-command-line/1.0-alpha-2/plexus-command-line-1.0-alpha-2.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-command-line/1.0-alpha-2/plexus-command-line-1.0-alpha-2-sources.jar"/>
+	<classpathentry kind="output" path="build"/>
+</classpath>

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/.project
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/.project?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/.project (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/.project Sun Dec 14 23:48:38 2008
@@ -0,0 +1,15 @@
+<projectDescription>
+  <name>continuum-buildagent-core</name>
+  <comment>Continuum is a continuous integration server for building maven1/2 projects, ant projects and shell projects.</comment>
+  <projects>
+    <project>continuum-buildagent-api</project>
+  </projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/.settings/org.eclipse.jdt.core.prefs?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/.settings/org.eclipse.jdt.core.prefs (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/.settings/org.eclipse.jdt.core.prefs Sun Dec 14 23:48:38 2008
@@ -0,0 +1,5 @@
+#Mon Dec 15 07:57:41 PHT 2008
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/pom.xml?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/pom.xml (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/pom.xml Sun Dec 14 23:48:38 2008
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.continuum</groupId>
+    <artifactId>continuum-buildagent</artifactId>
+    <version>1.3.1-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.apache.continuum</groupId>
+  <artifactId>continuum-buildagent-core</artifactId>
+  <packaging>jar</packaging>
+  <name>Continuum :: Distributed Build :: Build Agent Core</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.continuum</groupId>
+      <artifactId>continuum-buildagent-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.continuum</groupId>
+      <artifactId>continuum-api</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.archiva</groupId>
+          <artifactId>archiva-common</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.archiva</groupId>
+          <artifactId>archiva-repository-layer</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.continuum</groupId>
+      <artifactId>continuum-commons</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.continuum</groupId>
+      <artifactId>continuum-scm</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>file-management</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-taskqueue</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-action</artifactId>
+      <version>1.0-alpha-6</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.codehaus.plexus</groupId>
+          <artifactId>plexus-container-default</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-command-line</artifactId>
+      <version>1.0-alpha-2</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.codehaus.plexus</groupId>
+          <artifactId>plexus-container-default</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-artifact</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-core</artifactId>
+      <version>${spring.version}</version>
+    </dependency> 
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>      
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java Sun Dec 14 23:48:38 2008
@@ -0,0 +1,101 @@
+package org.apache.continuum.buildagent;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.continuum.buildagent.buildcontext.BuildContext;
+import org.apache.continuum.buildagent.configuration.ConfigurationService;
+import org.apache.continuum.buildagent.model.Installation;
+import org.apache.continuum.buildagent.utils.ContinuumBuildAgentUtil;
+
+public class ContinuumBuildAgentServiceImpl
+    implements ContinuumBuildAgentService
+{
+    /**
+     * @plexus.requirement
+     */
+    private ConfigurationService configurationService;
+
+    public void buildProjects( List<Map> projectsBuildContext )
+        throws ContinuumBuildAgentException
+    {
+        List<BuildContext> buildContext = initializeBuildContext( projectsBuildContext );
+
+        try
+        {
+            Thread.sleep( 60000 );
+        }
+        catch ( InterruptedException e )
+        {
+        }
+    }
+
+    public List<Installation> getAvailableInstallations()
+        throws ContinuumBuildAgentException
+    {
+        return configurationService.getAvailableInstallations();
+    }
+
+    public Map getBuildResult( int projectId )
+        throws ContinuumBuildAgentException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public boolean isBusy()
+        throws ContinuumBuildAgentException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    public int getProjectCurrentlyBuilding()
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    public void cancelBuild()
+        throws ContinuumBuildAgentException
+    {
+        
+    }
+
+    private List<BuildContext> initializeBuildContext( List<Map> projectsBuildContext )
+    {
+        List<BuildContext> buildContext = new ArrayList<BuildContext>();
+        
+        for ( Map map : projectsBuildContext )
+        {
+            BuildContext context = new BuildContext();
+            context.setProjectId( ContinuumBuildAgentUtil.getProjectId( map ) );
+            context.setBuildDefinitionId( ContinuumBuildAgentUtil.getBuildDefinitionId( map ) );
+            context.setBuildFile( ContinuumBuildAgentUtil.getBuildFile( map ) );
+            context.setExecutorId( ContinuumBuildAgentUtil.getExecutorId( map ) );
+            context.setGoals( ContinuumBuildAgentUtil.getGoals( map ) );
+            context.setArguments( ContinuumBuildAgentUtil.getArguments( map ) );
+            context.setScmUrl( ContinuumBuildAgentUtil.getScmUrl( map ) );
+            context.setScmUsername( ContinuumBuildAgentUtil.getScmUsername( map ) );
+            context.setScmPassword( ContinuumBuildAgentUtil.getScmPassword( map ) );
+            context.setBuildFresh( ContinuumBuildAgentUtil.isBuildFresh( map ) );
+            context.setProjectGroupId( ContinuumBuildAgentUtil.getProjectGroupId( map ) );
+            context.setScmRootAddress( ContinuumBuildAgentUtil.getScmRootAddress( map ) );
+            
+            buildContext.add( context );
+        }
+
+        return buildContext;
+    }
+
+    public ConfigurationService getConfigurationService()
+    {
+        return configurationService;
+    }
+
+    public void setConfigurationService( ConfigurationService configurationService )
+    {
+        this.configurationService = configurationService;
+    }
+}

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CheckWorkingDirectoryAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CheckWorkingDirectoryAction.java?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CheckWorkingDirectoryAction.java (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CheckWorkingDirectoryAction.java Sun Dec 14 23:48:38 2008
@@ -0,0 +1,41 @@
+package org.apache.continuum.buildagent.action;
+
+import java.io.File;
+import java.util.Map;
+
+import org.apache.continuum.buildagent.configuration.ConfigurationService;
+import org.apache.continuum.buildagent.utils.ContinuumBuildAgentUtil;
+import org.apache.maven.continuum.model.project.Project;
+import org.codehaus.plexus.action.AbstractAction;
+
+/**
+ * @plexus.component role="org.codehaus.plexus.action.Action" role-hint="check-agent-working-directory"
+ */
+public class CheckWorkingDirectoryAction
+    extends AbstractAction
+{
+    /**
+     * @plexus.requirement
+     */    
+    ConfigurationService configurationService;
+    
+    public void execute( Map context )
+        throws Exception
+    {
+        Project project = ContinuumBuildAgentUtil.getProject( context );
+
+        File workingDirectory = configurationService.getWorkingDirectory( project.getId() );
+
+        if ( !workingDirectory.exists() )
+        {
+            context.put( ContinuumBuildAgentUtil.KEY_WORKING_DIRECTORY_EXISTS, Boolean.FALSE );
+
+            return;
+        }
+
+        File[] files = workingDirectory.listFiles();
+
+        context.put( ContinuumBuildAgentUtil.KEY_WORKING_DIRECTORY_EXISTS, Boolean.valueOf( files.length > 0 ) );
+    }
+
+}

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CheckoutProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CheckoutProjectAction.java?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CheckoutProjectAction.java (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CheckoutProjectAction.java Sun Dec 14 23:48:38 2008
@@ -0,0 +1,219 @@
+package org.apache.continuum.buildagent.action;
+
+import java.io.File;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.continuum.buildagent.buildcontext.BuildContext;
+import org.apache.continuum.buildagent.buildcontext.manager.BuildContextManager;
+import org.apache.continuum.buildagent.configuration.ConfigurationService;
+import org.apache.continuum.buildagent.utils.BuildContextToBuildDefinition;
+import org.apache.continuum.buildagent.utils.BuildContextToProject;
+import org.apache.continuum.buildagent.utils.ContinuumBuildAgentUtil;
+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;
+import org.apache.maven.scm.ScmException;
+import org.apache.maven.scm.command.checkout.CheckOutScmResult;
+import org.apache.maven.scm.manager.NoSuchScmProviderException;
+import org.apache.maven.scm.repository.ScmRepositoryException;
+import org.codehaus.plexus.action.AbstractAction;
+
+/**
+ * @plexus.requirement role="org.codehaus.plexus.action.Action" role-hint="checkout-agent-project"
+ */
+public class CheckoutProjectAction
+    extends AbstractAction
+{
+    /**
+     * @plexus.requirement
+     */
+    private BuildContextManager buildContextManager;
+
+    /**
+     * @plexus.requirement
+     */
+    private ConfigurationService configurationService;
+
+    /**
+     * @plexus.requirement
+     */
+    private ContinuumScm scm;
+
+    public void execute( Map context )
+        throws Exception
+    {
+        BuildContext buildContext = buildContextManager.getBuildContext( ContinuumBuildAgentUtil.getProjectId( context ) );
+        
+        Project project = BuildContextToProject.getProject( buildContext );
+        BuildDefinition buildDefinition = BuildContextToBuildDefinition.getBuildDefinition( buildContext );
+
+        File workingDirectory = configurationService.getWorkingDirectory( project.getId() );
+
+        // ----------------------------------------------------------------------
+        // Check out the project
+        // ----------------------------------------------------------------------
+
+        ScmResult result;
+
+        try
+        {
+            String scmUserName = ContinuumBuildAgentUtil.getString( context, ContinuumBuildAgentUtil.KEY_SCM_USERNAME, "" );
+            String scmPassword = ContinuumBuildAgentUtil.getString( context, ContinuumBuildAgentUtil.KEY_SCM_PASSWORD, "" );
+
+            ContinuumScmConfiguration config =
+                createScmConfiguration( project, workingDirectory, scmUserName, scmPassword );
+
+            String tag = config.getTag();
+            getLogger().info( "Checking out project: '" + project.getName() + "', id: '" + project.getId() + "' " +
+                "to '" + workingDirectory + "'" + ( tag != null ? " with branch/tag " + tag + "." : "." ) );
+
+            CheckOutScmResult checkoutResult = scm.checkout( config );
+            //if ( StringUtils.isNotEmpty( checkoutResult.getRelativePathProjectDirectory() ) )
+            //{
+            //    context.put( AbstractContinuumAction.KEY_PROJECT_RELATIVE_PATH,
+            //                 checkoutResult.getRelativePathProjectDirectory() );
+            //}
+
+            if ( !checkoutResult.isSuccess() )
+            {
+                // TODO: is it more appropriate to return this in the converted result so that it can be presented to
+                // the user?
+                String msg = "Error while checking out the code for project: '" + project.getName() + "', id: '" +
+                    project.getId() + "' to '" + workingDirectory.getAbsolutePath() + "'" +
+                    ( tag != null ? " with branch/tag " + tag + "." : "." );
+                getLogger().warn( msg );
+
+                getLogger().warn( "Command output: " + checkoutResult.getCommandOutput() );
+
+                getLogger().warn( "Provider message: " + checkoutResult.getProviderMessage() );
+            }
+            else
+            {
+                getLogger().info( "Checked out " + checkoutResult.getCheckedOutFiles().size() + " files." );
+            }
+
+            result = convertScmResult( checkoutResult );
+        }
+        catch ( ScmRepositoryException e )
+        {
+            result = new ScmResult();
+
+            result.setSuccess( false );
+
+            result.setProviderMessage( e.getMessage() + ": " + getValidationMessages( e ) );
+
+            getLogger().error( e.getMessage(), e );
+        }
+        catch ( NoSuchScmProviderException e )
+        {
+            // TODO: this is not making it back into a result of any kind - log it at least. Same is probably the case for ScmException
+            result = new ScmResult();
+
+            result.setSuccess( false );
+
+            result.setProviderMessage( e.getMessage() );
+
+            getLogger().error( e.getMessage(), e );
+        }
+        catch ( ScmException e )
+        {
+            result = new ScmResult();
+
+            result.setSuccess( false );
+
+            result.setException( ContinuumUtils.throwableMessagesToString( e ) );
+
+            getLogger().error( e.getMessage(), e );
+        }
+        catch ( Throwable t )
+        {
+            // TODO: do we want this here, or should it be to the logs?
+            // TODO: what throwables do we really get here that we can cope with?
+            result = new ScmResult();
+
+            result.setSuccess( false );
+
+            result.setException( ContinuumUtils.throwableMessagesToString( t ) );
+
+            getLogger().error( t.getMessage(), t );
+        }
+
+        context.put( ContinuumBuildAgentUtil.KEY_CHECKOUT_SCM_RESULT, result );
+    }
+
+    private ContinuumScmConfiguration createScmConfiguration( Project project, File workingDirectory,
+                                                              String scmUserName, String scmPassword )
+    {
+        ContinuumScmConfiguration config = new ContinuumScmConfiguration();
+        config.setUrl( project.getScmUrl() );
+        config.setUsername( scmUserName );
+        config.setPassword( scmPassword );
+        config.setUseCredentialsCache( project.isScmUseCache() );
+        config.setWorkingDirectory( workingDirectory );
+        config.setTag( project.getScmTag() );
+        return config;
+    }
+
+    private ScmResult convertScmResult( CheckOutScmResult scmResult )
+    {
+        ScmResult result = new ScmResult();
+
+        result.setSuccess( scmResult.isSuccess() );
+
+        result.setCommandLine( maskPassword( scmResult.getCommandLine() ) );
+
+        result.setCommandOutput( scmResult.getCommandOutput() );
+
+        result.setProviderMessage( scmResult.getProviderMessage() );
+
+        return result;
+    }
+
+    // TODO: migrate to the SvnCommandLineUtils version (preferably properly encapsulated in the provider)
+    private String maskPassword( String commandLine )
+    {
+        String cmd = commandLine;
+
+        if ( cmd != null && cmd.startsWith( "svn" ) )
+        {
+            String pwdString = "--password";
+
+            if ( cmd.indexOf( pwdString ) > 0 )
+            {
+                int index = cmd.indexOf( pwdString ) + pwdString.length() + 1;
+
+                int nextSpace = cmd.indexOf( " ", index );
+
+                cmd = cmd.substring( 0, index ) + "********" + cmd.substring( nextSpace );
+            }
+        }
+
+        return cmd;
+    }
+
+    private String getValidationMessages( ScmRepositoryException ex )
+    {
+        List<String> messages = ex.getValidationMessages();
+
+        StringBuffer message = new StringBuffer();
+
+        if ( messages != null && !messages.isEmpty() )
+        {
+            for ( Iterator<String> i = messages.iterator(); i.hasNext(); )
+            {
+                message.append( (String) i.next() );
+
+                if ( i.hasNext() )
+                {
+                    message.append( System.getProperty( "line.separator" ) );
+                }
+            }
+        }
+        return message.toString();
+    }
+}
\ No newline at end of file

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CleanWorkingDirectoryAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CleanWorkingDirectoryAction.java?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CleanWorkingDirectoryAction.java (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CleanWorkingDirectoryAction.java Sun Dec 14 23:48:38 2008
@@ -0,0 +1,42 @@
+package org.apache.continuum.buildagent.action;
+
+import java.io.File;
+import java.util.Map;
+
+import org.apache.continuum.buildagent.configuration.ConfigurationService;
+import org.apache.continuum.buildagent.utils.ContinuumBuildAgentUtil;
+import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.shared.model.fileset.FileSet;
+import org.apache.maven.shared.model.fileset.util.FileSetManager;
+import org.codehaus.plexus.action.AbstractAction;
+
+/**
+ * @plexus.component role="org.codehaus.plexus.action.Action" role-hint="clean-agent-working-directory"
+ */
+public class CleanWorkingDirectoryAction
+    extends AbstractAction
+{
+    /**
+     * @plexus.requirement
+     */
+    private ConfigurationService configurationService;
+
+    public void execute( Map context )
+        throws Exception
+    {
+        Project project = ContinuumBuildAgentUtil.getProject( context );
+    
+        File workingDirectory = configurationService.getWorkingDirectory( project.getId() );
+    
+        if ( workingDirectory.exists() )
+        {
+            FileSetManager fileSetManager = new FileSetManager();
+            FileSet fileSet = new FileSet();
+            fileSet.setDirectory( workingDirectory.getPath() );
+            fileSet.addInclude( "**/**" );
+            // TODO : this with a configuration option somewhere ?
+            fileSet.setFollowSymlinks( false );
+            fileSetManager.delete( fileSet );
+        }
+    }
+}

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/ExecuteBuilderAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/ExecuteBuilderAction.java?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/ExecuteBuilderAction.java (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/ExecuteBuilderAction.java Sun Dec 14 23:48:38 2008
@@ -0,0 +1,102 @@
+package org.apache.continuum.buildagent.action;
+
+import java.io.File;
+import java.util.Date;
+import java.util.Map;
+
+import org.apache.continuum.buildagent.build.execution.ContinuumBuildCancelledException;
+import org.apache.continuum.buildagent.build.execution.ContinuumBuildExecutionResult;
+import org.apache.continuum.buildagent.build.execution.ContinuumBuildExecutor;
+import org.apache.continuum.buildagent.build.execution.manager.BuildExecutorManager;
+import org.apache.continuum.buildagent.configuration.ConfigurationService;
+import org.apache.continuum.buildagent.utils.ContinuumBuildAgentUtil;
+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;
+import org.apache.maven.continuum.project.ContinuumProjectState;
+import org.codehaus.plexus.action.AbstractAction;
+
+public class ExecuteBuilderAction
+    extends AbstractAction
+{
+    /**
+     * @plexus.requirement
+     */
+    private BuildExecutorManager buildExecutorManager;
+
+    /**
+     * @plexus.requirement
+     */
+    private ConfigurationService configurationService;
+
+    public void execute( Map context )
+        throws Exception
+    {
+        // ----------------------------------------------------------------------
+        // Get parameters from the context
+        // ----------------------------------------------------------------------
+        
+        Project project = ContinuumBuildAgentUtil.getProject( context );
+
+        BuildDefinition buildDefinition = ContinuumBuildAgentUtil.getBuildDefinition( context );
+
+        int trigger = ContinuumBuildAgentUtil.getTrigger( context );
+
+        ContinuumBuildExecutor buildExecutor = buildExecutorManager.getBuildExecutor( project.getExecutorId() );
+        
+        // ----------------------------------------------------------------------
+        // Make the buildResult
+        // ----------------------------------------------------------------------
+
+        BuildResult buildResult = new BuildResult();
+
+        buildResult.setStartTime( new Date().getTime() );
+
+        buildResult.setState( ContinuumProjectState.BUILDING );
+
+        buildResult.setTrigger( trigger );
+
+        buildResult.setBuildDefinition( buildDefinition );
+
+        context.put( ContinuumBuildAgentUtil.KEY_BUILD_RESULT, buildResult );
+
+        try
+        {
+            File buildOutputFile = configurationService.getBuildOutputFile( project.getId() );
+
+            ContinuumBuildExecutionResult result = buildExecutor.build( project, buildDefinition, buildOutputFile );
+
+            buildResult.setState( result.getExitCode() == 0 ? ContinuumProjectState.OK : ContinuumProjectState.FAILED );
+
+            buildResult.setExitCode( result.getExitCode() );
+        }
+        catch ( ContinuumBuildCancelledException e )
+        {
+            getLogger().info( "Cancelled build" );
+            
+            buildResult.setState( ContinuumProjectState.CANCELLED );
+            
+            context.put( ContinuumBuildAgentUtil.KEY_CANCELLED, new Boolean( true ) );
+        }
+        catch ( Throwable e )
+        {
+            getLogger().error( "Error running buildResult", e );
+
+            buildResult.setState( ContinuumProjectState.ERROR );
+
+            buildResult.setError( ContinuumUtils.throwableToString( e ) );
+        }
+        finally
+        {
+            buildResult.setEndTime( new Date().getTime() );
+
+            if ( buildResult.getState() != ContinuumProjectState.OK &&
+                 buildResult.getState() != ContinuumProjectState.FAILED &&
+                 buildResult.getState() != ContinuumProjectState.ERROR )
+            {
+                buildResult.setState( ContinuumProjectState.ERROR );
+            }
+        }
+    }
+}
\ No newline at end of file

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java Sun Dec 14 23:48:38 2008
@@ -0,0 +1,213 @@
+package org.apache.continuum.buildagent.buildcontext;
+
+import java.util.Map;
+
+import org.apache.maven.continuum.model.project.BuildResult;
+import org.apache.maven.continuum.model.scm.ScmResult;
+
+public class BuildContext
+{
+    private int projectId;
+
+    private int buildDefinitionId;
+
+    private String buildFile;
+
+    private String goals;
+
+    private String arguments;
+
+    private String executorId;
+
+    private String scmUrl;
+
+    private String scmUsername;
+
+    private String scmPassword;
+
+    private int trigger;
+
+    private boolean buildFresh;
+
+    private int projectGroupId;
+
+    private String scmRootAddress;
+
+    private Map<String, Object> actionContext;
+
+    private ScmResult scmResult;
+
+    private BuildResult buildResult;
+
+    private long buildStartTime;
+
+    public int getProjectGroupId()
+    {
+        return projectGroupId;
+    }
+
+    public void setProjectGroupId( int projectGroupId )
+    {
+        this.projectGroupId = projectGroupId;
+    }
+
+    public String getScmRootAddress()
+    {
+        return scmRootAddress;
+    }
+
+    public void setScmRootAddress( String scmRootAddress )
+    {
+        this.scmRootAddress = scmRootAddress;
+    }
+
+    public int getProjectId()
+    {
+        return projectId;
+    }
+
+    public void setProjectId( int projectId )
+    {
+        this.projectId = projectId;
+    }
+
+    public int getBuildDefinitionId()
+    {
+        return buildDefinitionId;
+    }
+
+    public void setBuildDefinitionId( int buildDefinitionId )
+    {
+        this.buildDefinitionId = buildDefinitionId;
+    }
+
+    public String getBuildFile()
+    {
+        return buildFile;
+    }
+
+    public void setBuildFile( String buildFile )
+    {
+        this.buildFile = buildFile;
+    }
+
+    public String getGoals()
+    {
+        return goals;
+    }
+
+    public void setGoals( String goals )
+    {
+        this.goals = goals;
+    }
+
+    public String getArguments()
+    {
+        return arguments;
+    }
+
+    public void setArguments( String arguments )
+    {
+        this.arguments = arguments;
+    }
+
+    public String getExecutorId()
+    {
+        return executorId;
+    }
+
+    public void setExecutorId( String executorId )
+    {
+        this.executorId = executorId;
+    }
+
+    public String getScmUrl()
+    {
+        return scmUrl;
+    }
+
+    public void setScmUrl( String scmUrl )
+    {
+        this.scmUrl = scmUrl;
+    }
+
+    public String getScmUsername()
+    {
+        return scmUsername;
+    }
+
+    public void setScmUsername( String scmUsername )
+    {
+        this.scmUsername = scmUsername;
+    }
+
+    public String getScmPassword()
+    {
+        return scmPassword;
+    }
+
+    public void setScmPassword( String scmPassword )
+    {
+        this.scmPassword = scmPassword;
+    }
+
+    public int getTrigger()
+    {
+        return trigger;
+    }
+
+    public void setTrigger( int trigger )
+    {
+        this.trigger = trigger;
+    }
+
+    public boolean isBuildFresh()
+    {
+        return buildFresh;
+    }
+
+    public void setBuildFresh( boolean buildFresh )
+    {
+        this.buildFresh = buildFresh;
+    }
+
+    public Map<String, Object> getActionContext()
+    {
+        return actionContext;
+    }
+
+    public void setActionContext( Map<String, Object> actionContext ) 
+    {
+        this.actionContext = actionContext;
+    }
+
+    public ScmResult getScmResult()
+    {
+        return scmResult;
+    }
+
+    public void setScmResult( ScmResult scmResult )
+    {
+        this.scmResult = scmResult;
+    }
+
+    public BuildResult getBuildResult()
+    {
+        return buildResult;
+    }
+
+    public void setBuildResult( BuildResult buildResult )
+    {
+        this.buildResult = buildResult;
+    }
+
+    public long getBuildStartTime()
+    {
+        return buildStartTime;
+    }
+
+    public void setBuildStartTime( long buildStartTime )
+    {
+        this.buildStartTime = buildStartTime;
+    }
+}

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/BuildContextManager.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/BuildContextManager.java?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/BuildContextManager.java (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/BuildContextManager.java Sun Dec 14 23:48:38 2008
@@ -0,0 +1,19 @@
+package org.apache.continuum.buildagent.buildcontext.manager;
+
+import java.util.List;
+
+import org.apache.continuum.buildagent.buildcontext.BuildContext;
+
+/**
+ * @author Jan Stevens Ancajas
+ */
+public interface BuildContextManager
+{
+    String ROLE = BuildContextManager.class.getName();
+    
+    public void setBuildContextList(List<BuildContext> buildContext);
+    
+    public List<BuildContext> getBuildContextList();
+    
+    public BuildContext getBuildContext(int projectId);
+}
\ No newline at end of file

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/DefaultBuildContextManager.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/DefaultBuildContextManager.java?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/DefaultBuildContextManager.java (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/DefaultBuildContextManager.java Sun Dec 14 23:48:38 2008
@@ -0,0 +1,44 @@
+package org.apache.continuum.buildagent.buildcontext.manager;
+
+import java.util.List;
+
+import org.apache.continuum.buildagent.buildcontext.BuildContext;
+
+/**
+ * @author Jan Steven Ancajas
+ * @plexus.component role="org.apache.continuum.buildagent.buildcontext.manager.BuildContextManager"
+ */
+public class DefaultBuildContextManager
+    implements BuildContextManager
+{
+    public List<BuildContext> buildContexts;
+
+    public BuildContext getBuildContext( int projectId )
+    {
+        BuildContext context = null;
+
+        if (buildContexts!= null)
+        {
+            for ( BuildContext item : buildContexts )
+            {
+                if (item.getProjectId() == projectId)
+                {
+                    context = item;
+                    break;
+                }
+            }
+        }
+
+        return context;
+    }
+
+    public List<BuildContext> getBuildContextList()
+    {
+        return buildContexts;
+    }
+
+    public void setBuildContextList( List<BuildContext> buildContexts )
+    {
+        this.buildContexts = buildContexts;
+    }
+}
\ No newline at end of file

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ConfigurationService.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ConfigurationService.java?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ConfigurationService.java (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ConfigurationService.java Sun Dec 14 23:48:38 2008
@@ -0,0 +1,29 @@
+package org.apache.continuum.buildagent.configuration;
+
+import java.io.File;
+import java.util.List;
+
+import org.apache.continuum.buildagent.model.Installation;
+
+public interface ConfigurationService
+{
+    String ROLE = ConfigurationService.class.getName();
+
+    File getBuildOutputDirectory();
+
+    File getBuildOutputDirectory( int projectId );
+
+    File getWorkingDirectory();
+
+    File getWorkingDirectory( int projectId );
+
+    String getContinuumServerUrl();
+
+    String getBuildOutput( int projectId )
+        throws ContinuumConfigurationException;
+
+    File getBuildOutputFile( int projectId )
+        throws ContinuumConfigurationException;
+
+    List<Installation> getAvailableInstallations();
+}

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ContinuumBuildAgentConfiguration.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ContinuumBuildAgentConfiguration.java?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ContinuumBuildAgentConfiguration.java (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ContinuumBuildAgentConfiguration.java Sun Dec 14 23:48:38 2008
@@ -0,0 +1,57 @@
+package org.apache.continuum.buildagent.configuration;
+
+import java.io.File;
+import java.util.List;
+
+import org.apache.continuum.buildagent.model.Installation;
+
+public class ContinuumBuildAgentConfiguration
+{
+    private File workingDirectory;
+
+    private File buildOutputDirectory;
+
+    private String continuumServerUrl;
+
+    private List<Installation> installations;
+
+    public File getWorkingDirectory()
+    {
+        return workingDirectory;
+    }
+
+    public void setWorkingDirectory( File workingDirectory )
+    {
+        this.workingDirectory = workingDirectory;
+    }
+
+    public File getBuildOutputDirectory()
+    {
+        return buildOutputDirectory;
+    }
+
+    public void setBuildOutputDirectory( File buildOutputDirectory )
+    {
+        this.buildOutputDirectory = buildOutputDirectory;
+    }
+
+    public String getContinuumServerUrl()
+    {
+        return continuumServerUrl;
+    }
+
+    public void setContinuumServerUrl( String continuumServerUrl )
+    {
+        this.continuumServerUrl = continuumServerUrl;
+    }
+
+    public List<Installation> getInstallations()
+    {
+        return installations;
+    }
+
+    public void setInstallations( List<Installation> installations )
+    {
+        this.installations = installations;
+    }
+}

Added: continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ContinuumConfiguration.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ContinuumConfiguration.java?rev=726638&view=auto
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ContinuumConfiguration.java (added)
+++ continuum/branches/continuum-distributed-builds/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ContinuumConfiguration.java Sun Dec 14 23:48:38 2008
@@ -0,0 +1,45 @@
+package org.apache.continuum.buildagent.configuration;
+
+import java.io.File;
+
+/*
+ * 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 interface ContinuumConfiguration
+{
+    String ROLE = ContinuumConfiguration.class.getName();
+
+    ContinuumBuildAgentConfiguration getContinuumBuildAgentConfiguration()
+        throws ContinuumConfigurationException;
+
+    void setContinuumBuildAgentConfiguration( ContinuumBuildAgentConfiguration configuration )
+        throws ContinuumConfigurationException;
+
+    void save()
+        throws ContinuumConfigurationException;
+    
+    void save( File file )
+        throws ContinuumConfigurationException;
+    
+    void reload( )
+        throws ContinuumConfigurationException;    
+    
+    void reload( File file )
+        throws ContinuumConfigurationException;
+}



Mime
View raw message