continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jzurb...@apache.org
Subject svn commit: r786876 [1/2] - in /continuum/trunk: ./ continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/ continuum-api/src/main/java/org/apache/continuum/buildmanager/ continuum-api/src/main/java/org/apache/continuum/taskqueue/...
Date Sat, 20 Jun 2009 18:13:39 GMT
Author: jzurbano
Date: Sat Jun 20 18:13:37 2009
New Revision: 786876

URL: http://svn.apache.org/viewvc?rev=786876&view=rev
Log:
[CONTINUUM-565] - Forced builds should say who (which continuum user) forced the build. added BuildTrigger class and used it in place of int (trigger) when building. updated unit tests. merge -r 786862:786863 from 1.3.x branch

Added:
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/utils/build/
      - copied from r786863, continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/utils/build/
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/utils/build/BuildTrigger.java
      - copied unchanged from r786863, continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/utils/build/BuildTrigger.java
Modified:
    continuum/trunk/   (props changed)
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/BuildProjectTask.java   (contents, props changed)
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/CheckOutTask.java   (props changed)
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallBuildQueue.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/PrepareBuildProjectsTask.java   (contents, props changed)
    continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CreateBuildProjectTaskAction.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/ExecuteBuilderAction.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/manager/BuildAgentBuildExecutorManager.java   (props changed)
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/manager/DefaultBuildAgentBuildExecutorManager.java   (props changed)
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m1/   (props changed)
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m2/BuildAgentMavenBuilderHelper.java   (props changed)
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m2/DefaultBuildAgentMavenBuilderHelper.java   (props changed)
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/BuildAgentConfiguration.java   (props changed)
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/BuildAgentConfigurationException.java   (props changed)
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/BuildAgentConfigurationService.java   (props changed)
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultBuildAgentConfiguration.java   (props changed)
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultBuildAgentConfigurationService.java   (props changed)
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/GeneralBuildAgentConfiguration.java   (props changed)
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/installation/BuildAgentInstallationService.java   (props changed)
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/installation/DefaultBuildAgentInstallationService.java   (props changed)
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentManager.java   (props changed)
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentManager.java   (props changed)
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildProjectsTaskExecutor.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java   (contents, props changed)
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java   (contents, props changed)
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java
    continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java   (contents, props changed)
    continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/ThreadedDistributedBuildTaskQueueExecutor.java   (props changed)
    continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java
    continuum/trunk/continuum-commons/src/test/java/org/apache/continuum/utils/ProjectSorterTest.java   (props changed)
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/util/DistributedBuildUtil.java
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildContext.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildController.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java
    continuum/trunk/continuum-core/src/test/java/org/apache/continuum/buildmanager/ParallelBuildsManagerTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueueTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
    continuum/trunk/continuum-data-management/continuum-legacy/src/main/mdo/continuum.xml
    continuum/trunk/continuum-data-management/data-management-cli/   (props changed)
    continuum/trunk/continuum-docs/   (props changed)
    continuum/trunk/continuum-docs/src/   (props changed)
    continuum/trunk/continuum-docs/src/site/xdoc/   (props changed)
    continuum/trunk/continuum-jetty/   (props changed)
    continuum/trunk/continuum-model/src/main/mdo/continuum.xml
    continuum/trunk/continuum-model/src/main/resources/package-default.orm   (props changed)
    continuum/trunk/continuum-webapp-test/src/test/selenium-ide/   (props changed)
    continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java   (props changed)
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
    continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/confirmDeleteBuildAgent.jsp   (props changed)
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResult.jsp
    continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
    continuum/trunk/src/site/   (props changed)

Propchange: continuum/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,4 +1,4 @@
 /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-1.3.x:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/branches/continuum-distributed-builds:713270-734307
 /continuum/tags/continuum-1.2.3:733253

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java?rev=786876&r1=786875&r2=786876&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java (original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java Sat Jun 20 18:13:37 2009
@@ -24,6 +24,7 @@
 
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
+import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.system.Installation;
 
@@ -60,7 +61,7 @@
     String getFileContent( int projectId, String directory, String filename )
         throws ContinuumException;
 
-    void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, int trigger, int projectGroupId, 
+    void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, BuildTrigger buildTrigger, int projectGroupId,  
                                String projectGroupName, String scmRootAddress, int scmRootId )
         throws ContinuumException;
 

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=786876&r1=786875&r2=786876&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 Sat Jun 20 18:13:37 2009
@@ -26,6 +26,7 @@
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.CheckOutTask;
 import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
+import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildQueue;
 import org.apache.maven.continuum.model.project.Project;
@@ -44,13 +45,13 @@
      *
      * @param projects
      * @param projectsBuildDefinitionsMap
-     * @param trigger
+     * @param buildTrigger
      * @param scmResultMap                TODO
      * @param projectGroupId
      * @throws BuildManagerException
      */
-    void buildProjects( List<Project> projects, Map<Integer, BuildDefinition> projectsBuildDefinitionsMap, int trigger,
-                        Map<Integer, ScmResult> scmResultMap, int projectGroupId )
+	void buildProjects( List<Project> projects, Map<Integer, BuildDefinition> projectsBuildDefinitionsMap,
+			            BuildTrigger buildTrigger, Map<Integer, ScmResult> scmResultMap, int projectGroupId )
         throws BuildManagerException;
 
     /**
@@ -61,12 +62,12 @@
      * @param projectId
      * @param buildDefinition
      * @param projectName
-     * @param trigger
+     * @param buildTrigger
      * @param scmResult       TODO
      * @param projectGroupId
      * @throws BuildManagerException
      */
-    void buildProject( int projectId, BuildDefinition buildDefinition, String projectName, int trigger,
+	void buildProject( int projectId, BuildDefinition buildDefinition, String projectName, BuildTrigger buildTrigger,
                        ScmResult scmResult, int projectGroupId )
         throws BuildManagerException;
 
@@ -74,13 +75,14 @@
      * Adds the projects in the prepare-build-queue.
      *
      * @param projectsBuildDefinitionsMap
-     * @param trigger
+     * @param buildTrigger
      * @param projectGroupId              TODO
      * @param scmRootAddress              TODO
+     * @param scmRootId
      * @throws BuildManagerException
      */
-    void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, int trigger, int projectGroupId,
-                               String projectGroupName, String scmRootAddress, int scmRootId )
+	void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, BuildTrigger buildTrigger,
+			                   int projectGroupId, String projectGroupName, String scmRootAddress, int scmRootId )
         throws BuildManagerException;
 
     /**
@@ -162,13 +164,13 @@
      *
      * @param projectId
      * @param buildDefinitionId
-     * @param trigger
+     * @param buildTrigger
      * @param projectName
      * @param projectGroupId
      * @throws BuildManagerException
      */
-    void removeProjectFromBuildQueue( int projectId, int buildDefinitionId, int trigger, String projectName,
-                                      int projectGroupId )
+    void removeProjectFromBuildQueue( int projectId, int buildDefinitionId, BuildTrigger buildTrigger,
+    		                          String projectName, int projectGroupId )
         throws BuildManagerException;
 
     // TODO: should we throw an exception when one of the projects cannot be removed?

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/BuildProjectTask.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/BuildProjectTask.java?rev=786876&r1=786875&r2=786876&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/BuildProjectTask.java (original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/BuildProjectTask.java Sat Jun 20 18:13:37 2009
@@ -21,6 +21,7 @@
 
 import java.io.Serializable;
 
+import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.model.scm.ScmResult;
 import org.codehaus.plexus.taskqueue.Task;
 
@@ -39,7 +40,7 @@
 
     private final long timestamp;
 
-    private final int trigger;
+    private BuildTrigger buildTrigger;
 
     private long maxExecutionTime;
 
@@ -51,7 +52,7 @@
 
     int projectGroupId;
 
-    public BuildProjectTask( int projectId, int buildDefinitionId, int trigger, String projectName,
+    public BuildProjectTask( int projectId, int buildDefinitionId, BuildTrigger buildTrigger, String projectName,
                              String buildDefinitionLabel, ScmResult scmResult, int projectGroupId )
     {
         this.projectId = projectId;
@@ -60,7 +61,7 @@
 
         this.timestamp = System.currentTimeMillis();
 
-        this.trigger = trigger;
+        this.buildTrigger = buildTrigger;
 
         this.projectName = projectName;
 
@@ -86,9 +87,14 @@
         return timestamp;
     }
 
-    public int getTrigger()
+    public BuildTrigger getBuildTrigger()
     {
-        return trigger;
+    	return buildTrigger;
+    }
+    
+    public void setBuildTrigger( BuildTrigger buildTrigger )
+    {
+        this.buildTrigger = buildTrigger;
     }
 
     public void setMaxExecutionTime( long maxExecutionTime )
@@ -138,12 +144,12 @@
         BuildProjectTask buildProjectTask = (BuildProjectTask) obj;
         return buildProjectTask.getBuildDefinitionId() == this.getBuildDefinitionId() &&
             buildProjectTask.getProjectId() == this.getProjectId() &&
-            buildProjectTask.getTrigger() == this.getTrigger();
+            buildProjectTask.getBuildTrigger().getTrigger() == this.buildTrigger.getTrigger();
     }
 
     public int hashCode()
     {
-        return this.getBuildDefinitionId() + this.getProjectId() + this.getTrigger();
+    	return this.getBuildDefinitionId() + this.getProjectId() + this.buildTrigger.getTrigger();
     }
 
     public int getHashCode()

Propchange: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/BuildProjectTask.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-api/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/BuildProjectTask.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/BuildProjectTask.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java:713270-724659

Propchange: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/CheckOutTask.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTask.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/CheckOutTask.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/CheckOutTask.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTask.java:713270-724659

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallBuildQueue.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallBuildQueue.java?rev=786876&r1=786875&r2=786876&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallBuildQueue.java (original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallBuildQueue.java Sat Jun 20 18:13:37 2009
@@ -21,6 +21,7 @@
 
 import java.util.List;
 
+import org.apache.continuum.utils.build.BuildTrigger;
 import org.codehaus.plexus.taskqueue.TaskQueue;
 import org.codehaus.plexus.taskqueue.TaskQueueException;
 import org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor;
@@ -213,14 +214,14 @@
      *
      * @param projectId
      * @param buildDefinitionId
-     * @param trigger
+     * @param buildTrigger
      * @param projectName
      * @param projectGroupId
      * @return
      * @throws TaskQueueException TODO
      */
-    boolean removeProjectFromBuildQueue( int projectId, int buildDefinitionId, int trigger, String projectName,
-                                         int projectGroupId )
+    boolean removeProjectFromBuildQueue( int projectId, int buildDefinitionId, BuildTrigger buildTrigger,
+    		                             String projectName, int projectGroupId )
         throws TaskQueueException;
 
     /**

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/PrepareBuildProjectsTask.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/PrepareBuildProjectsTask.java?rev=786876&r1=786875&r2=786876&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/PrepareBuildProjectsTask.java (original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/PrepareBuildProjectsTask.java Sat Jun 20 18:13:37 2009
@@ -21,6 +21,7 @@
 
 import java.util.Map;
 
+import org.apache.continuum.utils.build.BuildTrigger;
 import org.codehaus.plexus.taskqueue.Task;
 
 public class PrepareBuildProjectsTask
@@ -28,7 +29,7 @@
 {
     private final Map<Integer, Integer> projectsBuildDefinitionsMap;
 
-    private final int trigger;
+    private BuildTrigger buildTrigger;
 
     private final int projectGroupId;
 
@@ -38,11 +39,11 @@
 
     private final int projectScmRootId;
 
-    public PrepareBuildProjectsTask( Map<Integer, Integer> projectsBuildDefinitionsMap, int trigger, int projectGroupId,
+    public PrepareBuildProjectsTask( Map<Integer, Integer> projectsBuildDefinitionsMap, BuildTrigger buildTrigger, int projectGroupId,
                                      String projectGroupName, String scmRootAddress, int projectScmRootId )
     {
         this.projectsBuildDefinitionsMap = projectsBuildDefinitionsMap;
-        this.trigger = trigger;
+        this.buildTrigger = buildTrigger;
         this.projectGroupId = projectGroupId;
         this.projectGroupName = projectGroupName;
         this.scmRootAddress = scmRootAddress;
@@ -60,9 +61,9 @@
         return projectsBuildDefinitionsMap;
     }
 
-    public int getTrigger()
+    public BuildTrigger getBuildTrigger()
     {
-        return trigger;
+    	return buildTrigger;
     }
 
     public int getHashCode()
@@ -92,6 +93,6 @@
 
     public int hashCode()
     {
-        return this.projectGroupId + this.projectScmRootId + this.trigger;
+    	return this.projectGroupId + this.projectScmRootId + this.buildTrigger.getTrigger();
     }
 }

Propchange: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/taskqueue/PrepareBuildProjectsTask.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,2 +1,2 @@
 /continuum/branches/continuum-1.2.x/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTask.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339
-/continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/PrepareBuildProjectsTask.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/PrepareBuildProjectsTask.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863

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=786876&r1=786875&r2=786876&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 Sat Jun 20 18:13:37 2009
@@ -34,6 +34,7 @@
 import org.apache.continuum.release.distributed.manager.DistributedReleaseManager;
 import org.apache.continuum.repository.RepositoryService;
 import org.apache.continuum.taskqueue.manager.TaskQueueManager;
+import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.builddefinition.BuildDefinitionService;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.installation.InstallationService;
@@ -166,7 +167,7 @@
      */
     List<Project> getProjectsInBuildOrder( Collection<Project> projects );
 
-    void buildProjects()
+    void buildProjects( String username )
         throws ContinuumException;
 
     void buildProjectsWithBuildDefinition( int buildDefinitionId )
@@ -178,31 +179,31 @@
     void buildProjectsWithBuildDefinition( List<Project> projects, int buildDefinitionId )
         throws ContinuumException;
 
-    void buildProjects( int trigger )
+    void buildProjects( BuildTrigger buildTrigger )
         throws ContinuumException;
 
-    void buildProjects( int trigger, int buildDefinitionId )
+    void buildProjects( BuildTrigger buildTrigger, int buildDefinitionId )
         throws ContinuumException;
 
     void buildProjects( Schedule schedule )
         throws ContinuumException;
 
-    void buildProject( int projectId )
+    void buildProject( int projectId, String username )
         throws ContinuumException;
 
-    void buildProject( int projectId, int trigger )
+    void buildProject( int projectId, BuildTrigger buildTrigger )
         throws ContinuumException;
 
-    void buildProjectWithBuildDefinition( int projectId, int buildDefinitionId )
+    void buildProjectWithBuildDefinition( int projectId, int buildDefinitionId, BuildTrigger buildTrigger )
         throws ContinuumException;
 
-    void buildProject( int projectId, int buildDefinitionId, int trigger )
+    void buildProject( int projectId, int buildDefinitionId, BuildTrigger buildTrigger )
         throws ContinuumException;
 
-    public void buildProjectGroup( int projectGroupId )
+    public void buildProjectGroup( int projectGroupId, BuildTrigger buildTrigger )
         throws ContinuumException;
 
-    public void buildProjectGroupWithBuildDefinition( int projectGroupId, int buildDefinitionId )
+    public void buildProjectGroupWithBuildDefinition( int projectGroupId, int buildDefinitionId, BuildTrigger buildTrigger )
         throws ContinuumException;
 
     // ----------------------------------------------------------------------

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java?rev=786876&r1=786875&r2=786876&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java Sat Jun 20 18:13:37 2009
@@ -43,6 +43,7 @@
 import org.apache.continuum.buildagent.utils.WorkingCopyContentGenerator;
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
+import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.scm.ChangeFile;
@@ -195,6 +196,7 @@
             result.put( ContinuumBuildAgentUtil.KEY_PROJECT_ID, buildContext.getProjectId() );
             result.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, buildContext.getBuildDefinitionId() );
             result.put( ContinuumBuildAgentUtil.KEY_TRIGGER, buildContext.getTrigger() );
+            result.put( ContinuumBuildAgentUtil.KEY_USERNAME, buildContext.getUsername() );
 
             BuildResult buildResult = buildContext.getBuildResult();
 
@@ -611,7 +613,8 @@
                 map.put( ContinuumBuildAgentUtil.KEY_PROJECT_GROUP_ID, new Integer( task.getProjectGroupId() ) );
                 map.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ID, new Integer( task.getScmRootId() ) );
                 map.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ADDRESS, task.getScmRootAddress() );
-                map.put( ContinuumBuildAgentUtil.KEY_TRIGGER, new Integer( task.getTrigger() ) );
+                map.put( ContinuumBuildAgentUtil.KEY_TRIGGER, task.getBuildTrigger().getTrigger() );
+                map.put( ContinuumBuildAgentUtil.KEY_USERNAME, task.getBuildTrigger().getUsername() );
 
                 projects.add( map );
             }
@@ -637,7 +640,8 @@
                 Map<String, Object> map = new HashMap<String, Object>();
                 map.put( ContinuumBuildAgentUtil.KEY_PROJECT_ID, new Integer( task.getProjectId() ) );
                 map.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, new Integer( task.getBuildDefinitionId() ) );
-                map.put( ContinuumBuildAgentUtil.KEY_TRIGGER, new Integer( task.getTrigger() ) );
+                map.put( ContinuumBuildAgentUtil.KEY_TRIGGER, task.getBuildTrigger().getTrigger() );
+                map.put( ContinuumBuildAgentUtil.KEY_USERNAME, task.getBuildTrigger().getUsername() );
                 map.put( ContinuumBuildAgentUtil.KEY_PROJECT_GROUP_ID, new Integer( task.getProjectGroupId() ) );
                 map.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_LABEL, task.getBuildDefinitionLabel() );
 
@@ -667,7 +671,8 @@
                 project.put( ContinuumBuildAgentUtil.KEY_PROJECT_GROUP_ID, new Integer( task.getProjectGroupId() ) );
                 project.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ID, new Integer( task.getScmRootId() ) );
                 project.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ADDRESS, task.getScmRootAddress() );
-                project.put( ContinuumBuildAgentUtil.KEY_TRIGGER, task.getTrigger() );
+                project.put( ContinuumBuildAgentUtil.KEY_TRIGGER, task.getBuildTrigger().getTrigger() );
+                project.put( ContinuumBuildAgentUtil.KEY_USERNAME, task.getBuildTrigger().getUsername() );
             }
 
             return project;
@@ -692,7 +697,8 @@
             {
                 project.put( ContinuumBuildAgentUtil.KEY_PROJECT_ID, new Integer( task.getProjectId() ) );
                 project.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, new Integer( task.getBuildDefinitionId() ) );
-                project.put( ContinuumBuildAgentUtil.KEY_TRIGGER, new Integer( task.getTrigger() ) );
+                project.put( ContinuumBuildAgentUtil.KEY_TRIGGER, task.getBuildTrigger().getTrigger() );
+                project.put( ContinuumBuildAgentUtil.KEY_USERNAME, task.getBuildTrigger().getUsername() );
                 project.put( ContinuumBuildAgentUtil.KEY_PROJECT_GROUP_ID, new Integer( task.getProjectGroupId() ) );
                 project.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_LABEL, task.getBuildDefinitionLabel() );
             }
@@ -923,6 +929,7 @@
             context.setProjectName( ContinuumBuildAgentUtil.getProjectName( map ) );
             context.setProjectState( ContinuumBuildAgentUtil.getProjectState( map ) );
             context.setTrigger( ContinuumBuildAgentUtil.getTrigger( map ) );
+            context.setUsername( ContinuumBuildAgentUtil.getUsername( map ) );
             context.setLocalRepository( ContinuumBuildAgentUtil.getLocalRepository( map ) );
             context.setBuildNumber( ContinuumBuildAgentUtil.getBuildNumber( map ) );
             context.setOldScmResult( getScmResult( ContinuumBuildAgentUtil.getOldScmChanges( map ) ) );
@@ -1005,8 +1012,8 @@
         if ( buildContexts != null && buildContexts.size() > 0 )
         {
             BuildContext context = buildContexts.get( 0 );
-            return new PrepareBuildProjectsTask( buildContexts, context.getTrigger(), context.getProjectGroupId(),
-                                                 context.getScmRootAddress(), context.getScmRootId() );
+            return new PrepareBuildProjectsTask( buildContexts, new BuildTrigger( context.getTrigger(), context.getUsername() ),
+            		                             context.getProjectGroupId(), context.getScmRootAddress(), context.getScmRootId() );
         }
         else
         {

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CreateBuildProjectTaskAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CreateBuildProjectTaskAction.java?rev=786876&r1=786875&r2=786876&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CreateBuildProjectTaskAction.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CreateBuildProjectTaskAction.java Sat Jun 20 18:13:37 2009
@@ -27,6 +27,7 @@
 import org.apache.continuum.buildagent.utils.ContinuumBuildAgentUtil;
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
+import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.ContinuumException;
 import org.codehaus.plexus.action.AbstractAction;
 import org.codehaus.plexus.taskqueue.TaskQueueException;
@@ -53,9 +54,11 @@
 
         for ( BuildContext buildContext : buildContexts )
         {
-            BuildProjectTask buildProjectTask =
+        	BuildTrigger buildTrigger = new BuildTrigger( buildContext.getTrigger(), buildContext.getUsername() );
+        	
+        	BuildProjectTask buildProjectTask =
                 new BuildProjectTask( buildContext.getProjectId(), buildContext.getBuildDefinitionId(),
-                                      buildContext.getTrigger(), buildContext.getProjectName(), buildContext.getBuildDefinitionLabel(),
+                		              buildTrigger, buildContext.getProjectName(), buildContext.getBuildDefinitionLabel(),
                                       buildContext.getScmResult(), buildContext.getProjectGroupId() );
             buildProjectTask.setMaxExecutionTime( buildContext.getMaxExecutionTime() * 1000 );
 

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/ExecuteBuilderAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/ExecuteBuilderAction.java?rev=786876&r1=786875&r2=786876&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/ExecuteBuilderAction.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/ExecuteBuilderAction.java Sat Jun 20 18:13:37 2009
@@ -67,6 +67,8 @@
         String localRepository = ContinuumBuildAgentUtil.getLocalRepository( context );
 
         int trigger = ContinuumBuildAgentUtil.getTrigger( context );
+        
+        String username = ContinuumBuildAgentUtil.getUsername( context );
 
         ContinuumAgentBuildExecutor buildExecutor = buildAgentBuildExecutorManager.getBuildExecutor( project.getExecutorId() );
         
@@ -81,6 +83,8 @@
         buildResult.setState( ContinuumProjectState.BUILDING );
 
         buildResult.setTrigger( trigger );
+        
+        buildResult.setUsername( username );
 
         buildResult.setBuildDefinition( buildDefinition );
 

Propchange: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/manager/BuildAgentBuildExecutorManager.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/manager/BuildExecutorManager.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/manager/BuildAgentBuildExecutorManager.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/manager/BuildAgentBuildExecutorManager.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/manager/BuildExecutorManager.java:713270-724659

Propchange: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/manager/DefaultBuildAgentBuildExecutorManager.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/manager/DefaultBuildExecutorManager.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/manager/DefaultBuildAgentBuildExecutorManager.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/manager/DefaultBuildAgentBuildExecutorManager.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/manager/DefaultBuildExecutorManager.java:713270-724659

Propchange: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m1/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
-/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m1:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m1:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /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-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m2/BuildAgentMavenBuilderHelper.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m2/MavenBuilderHelper.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m2/BuildAgentMavenBuilderHelper.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m2/BuildAgentMavenBuilderHelper.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m2/MavenBuilderHelper.java:713270-724659

Propchange: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m2/DefaultBuildAgentMavenBuilderHelper.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m2/DefaultMavenBuilderHelper.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m2/DefaultBuildAgentMavenBuilderHelper.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m2/DefaultBuildAgentMavenBuilderHelper.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/maven/m2/DefaultMavenBuilderHelper.java:713270-724659

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java?rev=786876&r1=786875&r2=786876&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java Sat Jun 20 18:13:37 2009
@@ -22,6 +22,7 @@
 import java.util.Date;
 import java.util.Map;
 
+import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.scm.ScmResult;
 
@@ -56,6 +57,8 @@
     private String scmPassword;
 
     private int trigger;
+    
+    private String username;
 
     private boolean buildFresh;
 
@@ -374,4 +377,14 @@
     {
         return buildDefinitionLabel;
     }
+    
+    public void setUsername( String username )
+    {
+         this.username = username;
+    }
+    
+    public String getUsername()
+    {
+         return username;
+    }
 }

Propchange: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/BuildAgentConfiguration.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ContinuumConfiguration.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/BuildAgentConfiguration.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/BuildAgentConfiguration.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ContinuumConfiguration.java:713270-724659

Propchange: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/BuildAgentConfigurationException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ContinuumConfigurationException.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/BuildAgentConfigurationException.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/BuildAgentConfigurationException.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ContinuumConfigurationException.java:713270-724659

Propchange: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/BuildAgentConfigurationService.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ConfigurationService.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/BuildAgentConfigurationService.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/BuildAgentConfigurationService.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ConfigurationService.java:713270-724659

Propchange: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultBuildAgentConfiguration.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultContinuumConfiguration.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultBuildAgentConfiguration.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultBuildAgentConfiguration.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultContinuumConfiguration.java:713270-724659

Propchange: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultBuildAgentConfigurationService.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultConfigurationService.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultBuildAgentConfigurationService.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultBuildAgentConfigurationService.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultConfigurationService.java:713270-724659

Propchange: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/GeneralBuildAgentConfiguration.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ContinuumBuildAgentConfiguration.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/GeneralBuildAgentConfiguration.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/GeneralBuildAgentConfiguration.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/ContinuumBuildAgentConfiguration.java:713270-724659

Propchange: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/installation/BuildAgentInstallationService.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/installation/InstallationService.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/installation/BuildAgentInstallationService.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/installation/BuildAgentInstallationService.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/installation/InstallationService.java:713270-724659

Propchange: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/installation/DefaultBuildAgentInstallationService.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/installation/DefaultInstallationService.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/installation/DefaultBuildAgentInstallationService.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/installation/DefaultBuildAgentInstallationService.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/installation/DefaultInstallationService.java:713270-724659

Propchange: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentManager.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/Continuum.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentManager.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentManager.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/Continuum.java:713270-724659

Propchange: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentManager.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/DefaultContinuum.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentManager.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentManager.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/DefaultContinuum.java:713270-724659

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java?rev=786876&r1=786875&r2=786876&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java Sat Jun 20 18:13:37 2009
@@ -22,6 +22,7 @@
 import java.util.List;
 
 import org.apache.continuum.buildagent.buildcontext.BuildContext;
+import org.apache.continuum.utils.build.BuildTrigger;
 import org.codehaus.plexus.taskqueue.Task;
 
 public class PrepareBuildProjectsTask
@@ -29,7 +30,7 @@
 {
     private final List<BuildContext> buildContexts;
 
-    private final int trigger;
+    private BuildTrigger buildTrigger;
 
     private final int projectGroupId;
 
@@ -37,11 +38,11 @@
 
     private final int scmRootId;
 
-    public PrepareBuildProjectsTask( List<BuildContext> buildContexts, int trigger, int projectGroupId,
+    public PrepareBuildProjectsTask( List<BuildContext> buildContexts, BuildTrigger buildTrigger, int projectGroupId,
                                      String scmRootAddress, int scmRootId )
     {
         this.buildContexts = buildContexts;
-        this.trigger = trigger;
+        this.buildTrigger = buildTrigger;
         this.projectGroupId = projectGroupId;
         this.scmRootAddress = scmRootAddress;
         this.scmRootId = scmRootId;
@@ -58,9 +59,9 @@
         return buildContexts;
     }
 
-    public int getTrigger()
+    public BuildTrigger getBuildTrigger()
     {
-        return trigger;
+    	return buildTrigger;
     }
 
     public int getProjectGroupId()
@@ -80,6 +81,6 @@
 
     public int getHashCode()
     {
-        return projectGroupId + scmRootId + trigger;
+    	return projectGroupId + scmRootId + buildTrigger.getTrigger();
     }
 }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java?rev=786876&r1=786875&r2=786876&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java Sat Jun 20 18:13:37 2009
@@ -164,6 +164,7 @@
                            BuildContextToBuildDefinition.getBuildDefinition( buildContext ) );
         actionContext.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, buildContext.getBuildDefinitionId() );
         actionContext.put( ContinuumBuildAgentUtil.KEY_TRIGGER, buildContext.getTrigger() );
+        actionContext.put( ContinuumBuildAgentUtil.KEY_USERNAME, buildContext.getUsername() );
         actionContext.put( ContinuumBuildAgentUtil.KEY_ENVIRONMENTS,
                            getEnvironments( buildContext.getBuildDefinitionId(),
                                             getInstallationType( buildContext ) ) );
@@ -205,6 +206,7 @@
         result.put( ContinuumBuildAgentUtil.KEY_PROJECT_ID, buildContext.getProjectId() );
         result.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, buildContext.getBuildDefinitionId() );
         result.put( ContinuumBuildAgentUtil.KEY_TRIGGER, buildContext.getTrigger() );
+        result.put( ContinuumBuildAgentUtil.KEY_USERNAME, buildContext.getUsername() );
         result.put( ContinuumBuildAgentUtil.KEY_BUILD_STATE, buildResult.getState() );
         result.put( ContinuumBuildAgentUtil.KEY_START_TIME, Long.toString( buildResult.getStartTime() ) );
         result.put( ContinuumBuildAgentUtil.KEY_END_TIME, Long.toString( buildResult.getEndTime() ) );
@@ -300,6 +302,8 @@
             build.setState( ContinuumProjectState.ERROR );
 
             build.setTrigger( context.getTrigger() );
+            
+            build.setUsername( context.getUsername() );
 
             build.setStartTime( context.getBuildStartTime() );
 
@@ -401,6 +405,7 @@
         map.put( ContinuumBuildAgentUtil.KEY_PROJECT_ID, context.getProjectId() );
         map.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, context.getBuildDefinitionId() );
         map.put( ContinuumBuildAgentUtil.KEY_TRIGGER, context.getTrigger() );
+        map.put( ContinuumBuildAgentUtil.KEY_USERNAME, context.getUsername() );
         map.put( ContinuumBuildAgentUtil.KEY_SCM_CHANGES, getScmChanges( context.getScmResult() ) );
         map.put( ContinuumBuildAgentUtil.KEY_MAVEN_PROJECT, getMavenProject( context ) );
         if ( context.getLatestUpdateDate() != null )

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildProjectsTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildProjectsTaskExecutor.java?rev=786876&r1=786875&r2=786876&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildProjectsTaskExecutor.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildProjectsTaskExecutor.java Sat Jun 20 18:13:37 2009
@@ -31,6 +31,7 @@
 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.utils.build.BuildTrigger;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Project;
@@ -174,6 +175,8 @@
         actionContext.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ADDRESS, buildContext.getScmRootAddress() );
         actionContext.put( ContinuumBuildAgentUtil.KEY_OLD_SCM_RESULT, buildContext.getOldScmResult() );
         actionContext.put( ContinuumBuildAgentUtil.KEY_LATEST_UPDATE_DATE, buildContext.getLatestUpdateDate() );
+        actionContext.put( ContinuumBuildAgentUtil.KEY_TRIGGER, buildContext.getTrigger() );
+        actionContext.put( ContinuumBuildAgentUtil.KEY_USERNAME, buildContext.getUsername() );
 
         buildContext.setActionContext( actionContext );
     }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java?rev=786876&r1=786875&r2=786876&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java Sat Jun 20 18:13:37 2009
@@ -24,6 +24,7 @@
 import org.apache.continuum.buildagent.taskqueue.PrepareBuildProjectsTask;
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
+import org.apache.continuum.utils.build.BuildTrigger;
 import org.codehaus.plexus.taskqueue.TaskQueue;
 
 public interface BuildAgentTaskQueueManager
@@ -52,7 +53,7 @@
     boolean isProjectInBuildQueue( int projectId )
         throws TaskQueueManagerException;
 
-    boolean isInPrepareBuildQueue( int projectGroupId, int trigger, String scmRootAddress )
+    boolean isInPrepareBuildQueue( int projectGroupId, BuildTrigger buildTrigger, String scmRootAddress )
         throws TaskQueueManagerException;
 
     List<PrepareBuildProjectsTask> getProjectsInPrepareBuildQueue()

Propchange: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/TaskQueueManager.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/TaskQueueManager.java:713270-724659

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java?rev=786876&r1=786875&r2=786876&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java Sat Jun 20 18:13:37 2009
@@ -25,6 +25,7 @@
 import org.apache.continuum.buildagent.taskqueue.PrepareBuildProjectsTask;
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
+import org.apache.continuum.utils.build.BuildTrigger;
 import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
@@ -205,7 +206,7 @@
         return false;
     }
 
-    public boolean isInPrepareBuildQueue( int projectGroupId, int trigger, String scmRootAddress )
+    public boolean isInPrepareBuildQueue( int projectGroupId, BuildTrigger buildTrigger, String scmRootAddress )
         throws TaskQueueManagerException
     {
         try
@@ -216,7 +217,7 @@
             {
                 for ( PrepareBuildProjectsTask task : queues )
                 {
-                    if ( task.getProjectGroupId() == projectGroupId && task.getTrigger() == trigger &&
+                	if ( task.getProjectGroupId() == projectGroupId && task.getBuildTrigger().getTrigger() == buildTrigger.getTrigger() &&
                         task.getScmRootAddress().equals( scmRootAddress ) )
                     {
                         log.info( "projects already in build queue" );

Propchange: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultTaskQueueManager.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-distributed-build/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultTaskQueueManager.java:713270-724659

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java?rev=786876&r1=786875&r2=786876&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java Sat Jun 20 18:13:37 2009
@@ -30,6 +30,7 @@
 import java.util.Map;
 
 import org.apache.continuum.buildagent.buildcontext.BuildContext;
+import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
@@ -54,6 +55,8 @@
     public static final String KEY_BUILD_DEFINITION_LABEL = "builddefinition-label";
 
     public static final String KEY_TRIGGER = "trigger";
+    
+    public static final String KEY_USERNAME = "username";
 
     public static final String KEY_EXECUTOR_ID = "executor-id";
 
@@ -355,6 +358,16 @@
     {
         return getInteger( context, KEY_TRIGGER );
     }
+    
+    public static String getUsername( Map<String, Object> context )
+    {
+         return getString( context, KEY_USERNAME, "" );
+    }
+    
+    public static BuildTrigger getBuildTrigger( Map<String, Object> context )
+    {
+         return new BuildTrigger( getTrigger( context ), getUsername( context ) );
+    }
 
     public static BuildResult getBuildResult( Map<String, Object> context, Object defaultValue )
     {

Modified: continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java?rev=786876&r1=786875&r2=786876&view=diff
==============================================================================
--- continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java (original)
+++ continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java Sat Jun 20 18:13:37 2009
@@ -38,6 +38,7 @@
 import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
 import org.apache.continuum.utils.ContinuumUtils;
 import org.apache.continuum.utils.ProjectSorter;
+import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
@@ -106,7 +107,7 @@
             log.info( "initializing buildContext" );
             List<Map<String, Object>> buildContext =
                 initializeBuildContext( prepareBuildTask.getProjectsBuildDefinitionsMap(),
-                                        prepareBuildTask.getTrigger(), prepareBuildTask.getScmRootAddress(),
+                		                prepareBuildTask.getBuildTrigger(), prepareBuildTask.getScmRootAddress(),
                                         prepareBuildTask.getProjectScmRootId() );
 
             startTime = System.currentTimeMillis();
@@ -127,7 +128,7 @@
     }
 
     private List<Map<String, Object>> initializeBuildContext( Map<Integer, Integer> projectsAndBuildDefinitions,
-                                                              int trigger, String scmRootAddress, int scmRootId )
+    		                                     BuildTrigger buildTrigger, String scmRootAddress, int scmRootId )
         throws ContinuumException
     {
         List<Map<String, Object>> buildContext = new ArrayList<Map<String, Object>>();
@@ -216,7 +217,8 @@
                 {
                     context.put( ContinuumBuildConstant.KEY_ARGUMENTS, buildDef.getArguments() );
                 }
-                context.put( ContinuumBuildConstant.KEY_TRIGGER, trigger );
+                context.put( ContinuumBuildConstant.KEY_TRIGGER, buildTrigger.getTrigger() );
+                context.put( ContinuumBuildConstant.KEY_USERNAME, buildTrigger.getUsername() );
                 context.put( ContinuumBuildConstant.KEY_BUILD_FRESH, buildDef.isBuildFresh() );
                 context.put( ContinuumBuildConstant.KEY_ALWAYS_BUILD, buildDef.isAlwaysBuild() );
                 context.put( ContinuumBuildConstant.KEY_OLD_SCM_CHANGES,
@@ -269,7 +271,8 @@
                         buildResult.setBuildDefinition( buildDef );
                         buildResult.setError( error );
                         buildResult.setState( ContinuumProjectState.ERROR );
-                        buildResult.setTrigger( task.getTrigger() );
+                        buildResult.setTrigger( task.getBuildTrigger().getTrigger() );
+                        buildResult.setUsername( task.getBuildTrigger().getUsername() );
                         buildResult.setStartTime( startTime );
                         buildResult.setEndTime( endTime );
 

Propchange: continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildTaskExecutor.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildTaskExecutor.java:713270-724659

Propchange: continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/ThreadedDistributedBuildTaskQueueExecutor.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildTaskQueueExecutor.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024
-/continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/ThreadedDistributedBuildTaskQueueExecutor.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/ThreadedDistributedBuildTaskQueueExecutor.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863
 /continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildTaskQueueExecutor.java:713270-724659

Modified: continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java?rev=786876&r1=786875&r2=786876&view=diff
==============================================================================
--- continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java (original)
+++ continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java Sat Jun 20 18:13:37 2009
@@ -25,6 +25,7 @@
 import java.util.List;
 import java.util.Map;
 
+import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.model.project.BuildResult;
 
 public class ContinuumBuildConstant
@@ -40,6 +41,10 @@
     public static final String KEY_BUILD_DEFINITION_LABEL = "builddefinition-label";
 
     public static final String KEY_TRIGGER = "trigger";
+    
+    public static final String KEY_USERNAME = "username";
+        
+    public static final String KEY_BUILD_TRIGGER = "buildTrigger";
 
     public static final String KEY_EXECUTOR_ID = "executor-id";
 
@@ -202,6 +207,17 @@
     {
         return getInteger( context, KEY_TRIGGER );
     }
+    
+    public static String getUsername( Map<String, Object> context )
+    {
+        return getString( context, KEY_USERNAME, "" );
+    }
+    
+    public static BuildTrigger getBuildTrigger( Map<String, Object> context )
+    {
+        BuildTrigger defaultValue = new BuildTrigger( 0, "" );
+        return (BuildTrigger) getObject( context, KEY_BUILD_TRIGGER, defaultValue );
+    }
 
     public static long getStartTime( Map<String, Object> context )
     {

Propchange: continuum/trunk/continuum-commons/src/test/java/org/apache/continuum/utils/ProjectSorterTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 18:13:37 2009
@@ -1,2 +1,2 @@
 /continuum/branches/continuum-1.2.x/continuum-core/src/test/java/org/apache/maven/continuum/utils/ProjectSorterTest.java:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339
-/continuum/branches/continuum-1.3.x/continuum-commons/src/test/java/org/apache/continuum/utils/ProjectSorterTest.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-commons/src/test/java/org/apache/continuum/utils/ProjectSorterTest.java:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222,786863

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java?rev=786876&r1=786875&r2=786876&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java Sat Jun 20 18:13:37 2009
@@ -41,6 +41,7 @@
 import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
 import org.apache.continuum.utils.ContinuumUtils;
 import org.apache.continuum.utils.ProjectSorter;
+import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildDefinition;
@@ -211,11 +212,11 @@
         }
     }
 
-    public void prepareBuildProjects( Map<Integer, Integer>projectsBuildDefinitionsMap, int trigger, int projectGroupId, 
+    public void prepareBuildProjects( Map<Integer, Integer>projectsBuildDefinitionsMap, BuildTrigger buildTrigger, int projectGroupId, 
                                       String projectGroupName, String scmRootAddress, int scmRootId )
         throws ContinuumException
     {
-        PrepareBuildProjectsTask task = new PrepareBuildProjectsTask( projectsBuildDefinitionsMap, trigger,
+    	PrepareBuildProjectsTask task = new PrepareBuildProjectsTask( projectsBuildDefinitionsMap, buildTrigger,
                                                                       projectGroupId, projectGroupName, 
                                                                       scmRootAddress, scmRootId );
 
@@ -1065,19 +1066,19 @@
         int projectGroupId = ContinuumBuildConstant.getProjectGroupId( context );
         int scmRootId = ContinuumBuildConstant.getScmRootId( context );
         String scmRootAddress = ContinuumBuildConstant.getScmRootAddress( context );
-        int trigger = ContinuumBuildConstant.getTrigger( context );
+        BuildTrigger buildTrigger = new BuildTrigger( ContinuumBuildConstant.getTrigger( context ), ContinuumBuildConstant.getUsername( context ) );
 
-        return new PrepareBuildProjectsTask( null, trigger, projectGroupId, null, scmRootAddress, scmRootId );
+        return new PrepareBuildProjectsTask( null, buildTrigger, projectGroupId, null, scmRootAddress, scmRootId );
     }
 
     private BuildProjectTask getBuildProjectTask( Map context )
     {
         int projectId = ContinuumBuildConstant.getProjectId( context );
         int buildDefinitionId = ContinuumBuildConstant.getBuildDefinitionId( context );
-        int trigger = ContinuumBuildConstant.getTrigger( context );
+        BuildTrigger buildTrigger = new BuildTrigger( ContinuumBuildConstant.getTrigger( context ), ContinuumBuildConstant.getUsername( context ) );
         int projectGroupId = ContinuumBuildConstant.getProjectGroupId( context );
         String buildDefinitionLabel = ContinuumBuildConstant.getBuildDefinitionLabel( context );
 
-        return new BuildProjectTask( projectId, buildDefinitionId, trigger, null, buildDefinitionLabel, null, projectGroupId );
+        return new BuildProjectTask( projectId, buildDefinitionId, buildTrigger, null, buildDefinitionLabel, null, projectGroupId );
     }
 }
\ No newline at end of file



Mime
View raw message