continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jzurb...@apache.org
Subject svn commit: r786891 [2/2] - in /continuum/branches/continuum-1.3.x: 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/cont...
Date Sat, 20 Jun 2009 19:31:58 GMT
Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
Sat Jun 20 19:31:57 2009
@@ -24,7 +24,6 @@
 import java.util.Map;
 
 import org.apache.continuum.model.project.ProjectScmRoot;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildDefinitionTemplate;
 import org.apache.maven.continuum.model.project.Project;
@@ -70,7 +69,7 @@
 
     private static final String KEY_UPDATE_DEPENDENCIES = "update-dependencies";
 
-    private static final String KEY_BUILD_TRIGGER = "buildTrigger";
+    private static final String KEY_TRIGGER = "trigger";
 
     private static final String KEY_SCM_RESULT = "scmResult";
 
@@ -166,15 +165,14 @@
         context.put( KEY_BUILD_ID, buildId );
     }
 
-    public static BuildTrigger getBuildTrigger( Map<String, Object> context )
+    public static int getTrigger( Map<String, Object> context )
     {
-    	BuildTrigger defaultValue = new BuildTrigger( 0, "" );
-    	return (BuildTrigger) getObject( context, KEY_BUILD_TRIGGER, defaultValue );
+        return getInteger( context, KEY_TRIGGER );
     }
 
-    public static void setBuildTrigger( Map<String, Object> context, BuildTrigger buildTrigger
)
+    public static void setTrigger( Map<String, Object> context, int trigger )
     {
-    	context.put( KEY_BUILD_TRIGGER, buildTrigger );
+        context.put( KEY_TRIGGER, trigger );
     }
 
     public static Project getUnvalidatedProject( Map<String, Object> context )

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java
Sat Jun 20 19:31:57 2009
@@ -25,7 +25,6 @@
 
 import org.apache.continuum.buildmanager.BuildsManager;
 import org.apache.continuum.dao.ProjectDao;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
 import org.apache.maven.continuum.model.project.BuildDefinition;
@@ -65,7 +64,7 @@
             AbstractContinuumAction.getProjectsBuildDefinitionsMap( context );
         Map<Integer, ScmResult> scmResultMap = AbstractContinuumAction.getScmResultMap(
context );
         List<Project> projectsToBeBuilt = new ArrayList<Project>();
-        BuildTrigger buildTrigger = AbstractContinuumAction.getBuildTrigger( context );
+        int trigger = AbstractContinuumAction.getTrigger( context );
         int projectGroupId = AbstractContinuumAction.getProjectGroupId( context );
 
         // update state of each project first
@@ -130,6 +129,6 @@
         }
 
         parallelBuildsManager.buildProjects( projectsToBeBuilt, projectsBuildDefinitionsMap,

-        		                             buildTrigger, scmResultMap, projectGroupId );
+                                             trigger, scmResultMap, projectGroupId );
     }
 }

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
Sat Jun 20 19:31:57 2009
@@ -27,7 +27,6 @@
 import org.apache.continuum.dao.BuildResultDao;
 import org.apache.continuum.dao.ProjectDao;
 import org.apache.continuum.utils.ContinuumUtils;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.execution.ContinuumBuildCancelledException;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutionResult;
@@ -88,7 +87,7 @@
 
         BuildDefinition buildDefinition = getBuildDefinition( context );
 
-        BuildTrigger buildTrigger = getBuildTrigger( context );
+        int trigger = getTrigger( context );
 
         ScmResult scmResult = getScmResult( context );
 
@@ -106,9 +105,7 @@
 
         buildResult.setState( ContinuumProjectState.BUILDING );
 
-        buildResult.setTrigger( buildTrigger.getTrigger() );
-        
-        buildResult.setUsername( buildTrigger.getUsername() );
+        buildResult.setTrigger( trigger );
 
         buildResult.setScmResult( scmResult );
 

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java
Sat Jun 20 19:31:57 2009
@@ -33,7 +33,6 @@
 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.core.action.AbstractContinuumAction;
 import org.apache.maven.continuum.core.action.CheckWorkingDirectoryAction;
 import org.apache.maven.continuum.core.action.CheckoutProjectContinuumAction;
@@ -109,7 +108,7 @@
         PrepareBuildProjectsTask prepareTask = (PrepareBuildProjectsTask) task;
 
         Map<Integer, Integer> projectsBuildDefinitionsMap = prepareTask.getProjectsBuildDefinitionsMap();
-        BuildTrigger buildTrigger = prepareTask.getBuildTrigger();
+        int trigger = prepareTask.getTrigger();
         Set<Integer> projectsId = projectsBuildDefinitionsMap.keySet();
         Map<String, Object> context = new HashMap<String, Object>();
         Map<Integer, ScmResult> scmResultMap = new HashMap<Integer, ScmResult>();
@@ -121,7 +120,7 @@
                 int buildDefinitionId = projectsBuildDefinitionsMap.get( projectId );
 
                 log.info( "Initializing prepare build" );
-                context = initializeContext( projectId, buildDefinitionId, prepareTask.getBuildTrigger()
);
+                context = initializeContext( projectId, buildDefinitionId );
 
                 log.info(
                     "Starting prepare build of project: " + AbstractContinuumAction.getProject(
context ).getName() );
@@ -174,11 +173,11 @@
         if ( checkProjectScmRoot( context ) )
         {
             int projectGroupId = AbstractContinuumAction.getProjectGroupId( context );
-            buildProjects( projectGroupId, projectsBuildDefinitionsMap, buildTrigger, scmResultMap
);
+            buildProjects( projectGroupId, projectsBuildDefinitionsMap, trigger, scmResultMap
);
         }
     }
 
-    private Map<String, Object> initializeContext( int projectId, int buildDefinitionId,
BuildTrigger buildTrigger )
+    private Map<String, Object> initializeContext( int projectId, int buildDefinitionId
)
         throws TaskExecutionException
     {
         Map<String, Object> context = new HashMap<String, Object>();
@@ -203,7 +202,6 @@
             AbstractContinuumAction.setProjectGroupId( context, projectGroup.getId() );
             AbstractContinuumAction.setProjectId( context, projectId );
             AbstractContinuumAction.setProject( context, project );
-            AbstractContinuumAction.setBuildTrigger( context, buildTrigger );
 
             AbstractContinuumAction.setBuildDefinitionId( context, buildDefinitionId );
             AbstractContinuumAction.setBuildDefinition( context,
@@ -502,8 +500,8 @@
         }
     }
 
-    private void buildProjects( int projectGroupId, Map<Integer, Integer> projectsAndBuildDefinitionsMap,
-    		                    BuildTrigger buildTrigger, Map<Integer, ScmResult> scmResultMap
)
+    private void buildProjects( int projectGroupId, Map<Integer, Integer> projectsAndBuildDefinitionsMap,
int trigger,
+                                Map<Integer, ScmResult> scmResultMap )
         throws TaskExecutionException
     {
         List<Project> projects = projectDao.getProjectsWithDependenciesByGroupId( projectGroupId
);
@@ -562,7 +560,7 @@
             Map<String, Object> context = new HashMap<String, Object>();
             AbstractContinuumAction.setListOfProjects( context, projectsToBeBuilt );
             AbstractContinuumAction.setProjectsBuildDefinitionsMap( context, projectsBuildDefinitionsMap
);
-            AbstractContinuumAction.setBuildTrigger( context, buildTrigger );
+            AbstractContinuumAction.setTrigger( context, trigger );
             AbstractContinuumAction.setScmResultMap( context, scmResultMap );
             AbstractContinuumAction.setProjectGroupId( context, projectGroupId );
 

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/continuum/buildmanager/ParallelBuildsManagerTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/continuum/buildmanager/ParallelBuildsManagerTest.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/continuum/buildmanager/ParallelBuildsManagerTest.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/continuum/buildmanager/ParallelBuildsManagerTest.java
Sat Jun 20 19:31:57 2009
@@ -33,7 +33,6 @@
 import org.apache.continuum.taskqueue.CheckOutTask;
 import org.apache.continuum.taskqueue.OverallBuildQueue;
 import org.apache.continuum.taskqueueexecutor.ParallelBuildsThreadedTaskQueueExecutor;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildQueue;
@@ -311,7 +310,7 @@
 
         recordBuildProjectBuildQueuesAreEmpty();
 
-        buildsManager.buildProject( 1, buildDef, "continuum-project-test-1", new BuildTrigger(
1, "test-user" ), null, 1 );
+        buildsManager.buildProject( 1, buildDef, "continuum-project-test-1", 1, null, 1 );
 
         context.assertIsSatisfied();
     }
@@ -327,7 +326,7 @@
 
         recordBuildProjectBuildQueuesAreEmpty();
 
-        buildsManager.buildProject( 1, buildDef, "continuum-project-test-1", new BuildTrigger(
1, "test-user" ), null, 1 );
+        buildsManager.buildProject( 1, buildDef, "continuum-project-test-1", 1, null, 1 );
         context.assertIsSatisfied();
 
         //queue second project - 1st queue is not empty, 2nd queue is empty 
@@ -337,7 +336,7 @@
         final List<Task> tasks = new ArrayList<Task>();
         final List<Task> tasksOfFirstBuildQueue = new ArrayList<Task>();
         tasksOfFirstBuildQueue.add(
-        		new BuildProjectTask( 2, 1, new BuildTrigger( 1, "test-user" ), "continuum-project-test-2",
buildDef.getDescription(), null, 2 ) );
+            new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", buildDef.getDescription(),
null, 2 ) );
         context.checking( new Expectations()
         {
             {
@@ -357,7 +356,7 @@
 
         recordAddToBuildQueue();
 
-        buildsManager.buildProject( 2, buildDef, "continuum-project-test-2", new BuildTrigger(
1, "test-user" ), null, 2 );
+        buildsManager.buildProject( 2, buildDef, "continuum-project-test-2", 1, null, 2 );
         context.assertIsSatisfied();
 
         // queue third project - both queues have 1 task queued each
@@ -379,7 +378,7 @@
 
         recordAddToBuildQueue();
 
-        buildsManager.buildProject( 3, buildDef, "continuum-project-test-3", new BuildTrigger(
1, "test-user" ), null, 3 );
+        buildsManager.buildProject( 3, buildDef, "continuum-project-test-3", 1, null, 3 );
         context.assertIsSatisfied();
     }
 
@@ -605,7 +604,7 @@
             context.mock( TaskQueueExecutor.class, "checkout-queue-executor" );
 
         final List<Task> buildTasks = new ArrayList<Task>();
-        buildTasks.add( new BuildProjectTask( 2, 1, new BuildTrigger( 1, "test-user" ), "continuum-project-test-2",
"BUILD_DEF", null, 2 ) );
+        buildTasks.add( new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF",
null, 2 ) );
 
         final List<CheckOutTask> checkoutTasks = new ArrayList<CheckOutTask>();
         checkoutTasks.add(
@@ -742,10 +741,10 @@
         buildDef.setSchedule( getSchedule( 1, 1, 2 ) );
 
         final TaskQueueExecutor buildQueueExecutor = context.mock( TaskQueueExecutor.class,
"build-queue-executor" );
-        final Task buildTask = new BuildProjectTask( 1, 1, new BuildTrigger( 1, "test-user"
), "continuum-project-test-1", "BUILD_DEF", null, 1 );
+        final Task buildTask = new BuildProjectTask( 1, 1, 1, "continuum-project-test-1",
"BUILD_DEF", null, 1 );
 
         final List<BuildProjectTask> buildTasks = new ArrayList<BuildProjectTask>();
-        buildTasks.add( new BuildProjectTask( 2, 1, new BuildTrigger( 1, "test-user" ), "continuum-project-test-2",
"BUILD_DEF", null, 2 ) );
+        buildTasks.add( new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF",
null, 2 ) );
 
         final List<CheckOutTask> checkoutTasks = new ArrayList<CheckOutTask>();
         checkoutTasks.add(
@@ -817,7 +816,7 @@
                 one( overallBuildQueue ).addToBuildQueue( with( any( BuildProjectTask.class
) ) );
             }} );
 
-        buildsManager.buildProject( 1, buildDef, "continuum-project-test-1", new BuildTrigger(
1, "test-user" ), null, 1 );
+        buildsManager.buildProject( 1, buildDef, "continuum-project-test-1", 1, null, 1 );
         context.assertIsSatisfied();
     }
 
@@ -827,7 +826,7 @@
         setupMockOverallBuildQueues();
 
         final List<Task> tasks = new ArrayList<Task>();
-        tasks.add( new BuildProjectTask( 2, 1, new BuildTrigger( 1, "test-user" ), "continuum-project-test-2",
"BUILD_DEF", null, 2  ) );
+        tasks.add( new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF",
null, 2  ) );
 
         context.checking( new Expectations()
         {

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueueTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueueTest.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueueTest.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueueTest.java
Sat Jun 20 19:31:57 2009
@@ -25,7 +25,6 @@
 
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.taskqueueexecutor.ParallelBuildsThreadedTaskQueueExecutor;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 import org.codehaus.plexus.taskqueue.Task;
@@ -185,7 +184,7 @@
         throws Exception
     {
         final BuildProjectTask buildTask =
-        	new BuildProjectTask( 2, 1, new BuildTrigger( 1, "test-user" ), "continuum-project-test-2",
"BUILD_DEF", null, 2 );
+            new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null,
2 );
         final TaskQueue buildQueue = context.mock( TaskQueue.class, "build-queue" );
 
         context.checking( new Expectations()
@@ -206,7 +205,7 @@
     {
         final TaskQueue buildQueue = context.mock( TaskQueue.class, "build-queue" );
         final List<Task> tasks = new ArrayList<Task>();
-        tasks.add( new BuildProjectTask( 2, 1, new BuildTrigger( 1, "test-user" ), "continuum-project-test-2",
"BUILD_DEF", null, 2 ) );
+        tasks.add( new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF",
null, 2 ) );
 
         context.checking( new Expectations()
         {
@@ -230,7 +229,7 @@
     {
         final TaskQueue buildQueue = context.mock( TaskQueue.class, "build-queue" );
         final List<Task> tasks = new ArrayList<Task>();
-        tasks.add( new BuildProjectTask( 2, 1, new BuildTrigger( 1, "test-user" ), "continuum-project-test-2",
"BUILD_DEF", null, 2 ) );
+        tasks.add( new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF",
null, 2 ) );
 
         context.checking( new Expectations()
         {
@@ -249,7 +248,7 @@
     public void testCancelBuildTask()
         throws Exception
     {
-    	final Task buildTask = new BuildProjectTask( 2, 1, new BuildTrigger( 1, "test-user"
), "continuum-project-test-2", "BUILD_DEF", null, 2 );
+        final Task buildTask = new BuildProjectTask( 2, 1, 1, "continuum-project-test-2",
"BUILD_DEF", null, 2 );
 
         context.checking( new Expectations()
         {
@@ -267,7 +266,7 @@
     public void testCancelCurrentBuild()
         throws Exception
     {
-    	final Task buildTask = new BuildProjectTask( 2, 1, new BuildTrigger( 1, "test-user"
), "continuum-project-test-2", "BUILD_DEF", null, 2 );
+        final Task buildTask = new BuildProjectTask( 2, 1, 1, "continuum-project-test-2",
"BUILD_DEF", null, 2 );
 
         context.checking( new Expectations()
         {
@@ -303,14 +302,14 @@
                 one( buildQueue ).remove( with( any( Task.class ) ) );
             }} );
 
-        overallQueue.removeProjectFromBuildQueue( 1, 1, new BuildTrigger( 1, "test-user"
), "continuum-project-test-1", 1 );
+        overallQueue.removeProjectFromBuildQueue( 1, 1, 1, "continuum-project-test-1", 1
);
         context.assertIsSatisfied();
     }
 
     public void testRemoveProjectFromBuildQueue()
         throws Exception
     {
-    	final Task buildTask = new BuildProjectTask( 1, 1, new BuildTrigger( 1, "test-user"
), "continuum-project-test-2", "BUILD_DEF", null, 1 );
+        final Task buildTask = new BuildProjectTask( 1, 1, 1, "continuum-project-test-2",
"BUILD_DEF", null, 1 );
 
         final TaskQueue buildQueue = context.mock( TaskQueue.class, "build-queue" );
         final List<Task> tasks = new ArrayList<Task>();

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
Sat Jun 20 19:31:57 2009
@@ -32,7 +32,6 @@
 import org.apache.continuum.model.repository.LocalRepository;
 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.execution.ContinuumBuildExecutorConstants;
@@ -519,7 +518,7 @@
 
         try
         {
-        	continuum.buildProject( 1, "test-user" );
+            continuum.buildProject( 1 );
             fail( "An exception should have been thrown." );
         }
         catch ( ContinuumException e )
@@ -565,7 +564,7 @@
 
         try
         {
-        	continuum.buildProjectGroup( 1, new BuildTrigger( 1, "test-user" ) );
+            continuum.buildProjectGroup( 1 );
             fail( "An exception should have been thrown." );
         }
         catch ( ContinuumException e )

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java
Sat Jun 20 19:31:57 2009
@@ -25,7 +25,6 @@
 import java.util.Map;
 
 import org.apache.continuum.taskqueue.BuildProjectTask;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.AbstractContinuumTest;
 import org.apache.maven.continuum.core.action.AbstractContinuumAction;
 import org.apache.maven.continuum.model.project.BuildDefinition;
@@ -246,8 +245,8 @@
 
         // projectGroup = continuumStore.addProjectGroup( projectGroup );
 
-        BuildProjectTask task = new BuildProjectTask( project.getId(), buildDefinition.getId(),
new BuildTrigger( 0, "" ),
-        		                                 project.getName(), buildDefinition.getDescription(),
null, projectGroupId );
+        BuildProjectTask task = new BuildProjectTask( project.getId(), buildDefinition.getId(),
0, project.getName(),
+                                                      buildDefinition.getDescription(), null,
projectGroupId );
 
         task.setMaxExecutionTime( maxRunTime );
 

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java
Sat Jun 20 19:31:57 2009
@@ -21,7 +21,6 @@
 
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.dao.BuildResultDao;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.AbstractContinuumTest;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorConstants;
 import org.apache.maven.continuum.model.project.BuildDefinition;
@@ -128,7 +127,7 @@
         throws Exception
     {
         return controller.initializeBuildContext( projectId2, buildDefinitionId2,
-                          new BuildTrigger( ContinuumProjectState.TRIGGER_SCHEDULED, "" ),
new ScmResult() );
+                                                  ContinuumProjectState.TRIGGER_SCHEDULED,
new ScmResult() );
     }
 
     private BuildContext getContext( int hourOfLastExecution )

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
Sat Jun 20 19:31:57 2009
@@ -20,7 +20,6 @@
  */
 
 import org.apache.continuum.taskqueue.BuildProjectTask;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.AbstractContinuumTest;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectGroup;
@@ -134,7 +133,7 @@
         throws Exception
     {
         ProjectGroup group = getDefaultProjectGroup();
-        buildQueue.put( new BuildProjectTask( projectId, 0, new BuildTrigger( trigger, ""
), null, null, null, group.getId() ) );
+        buildQueue.put( new BuildProjectTask( projectId, 0, trigger, null, null, null, group.getId()
) );
     }
 
     private void assertNextBuildIs( int expectedProjectId )

Modified: continuum/branches/continuum-1.3.x/continuum-data-management/continuum-legacy/src/main/mdo/continuum.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-data-management/continuum-legacy/src/main/mdo/continuum.xml?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-data-management/continuum-legacy/src/main/mdo/continuum.xml
(original)
+++ continuum/branches/continuum-1.3.x/continuum-data-management/continuum-legacy/src/main/mdo/continuum.xml
Sat Jun 20 19:31:57 2009
@@ -504,11 +504,6 @@
           <version>1.0.9</version>
           <type>int</type>
         </field>
-        <field>
-          <name>username</name>
-          <version>1.0.9+</version>
-          <type>String</type>
-        </field>
         <field jpox.column="resultstate">
           <name>state</name>
           <version>1.1.0+</version>

Modified: continuum/branches/continuum-1.3.x/continuum-model/src/main/mdo/continuum.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-model/src/main/mdo/continuum.xml?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-model/src/main/mdo/continuum.xml (original)
+++ continuum/branches/continuum-1.3.x/continuum-model/src/main/mdo/continuum.xml Sat Jun
20 19:31:57 2009
@@ -585,11 +585,6 @@
           <version>1.0.9</version>
           <type>int</type>
         </field>
-        <field>
-          <name>username</name>
-          <version>1.0.9+</version>
-          <type>String</type>
-        </field>
         <field jpox.column="resultstate">
           <name>state</name>
           <version>1.1.0+</version>

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/error/HttpError.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/error/HttpError.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/error/HttpError.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/error/HttpError.java
Sat Jun 20 19:31:57 2009
@@ -25,7 +25,7 @@
  * AboutAction:
  *
  * @author: Emmanuel Venisse <evenisse@apache.org>
- * @version: $Id:$
+ * @version: $Id$
  * @plexus.component role="com.opensymphony.xwork2.Action" role-hint="httpError"
  */
 public class HttpError

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AboutAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AboutAction.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AboutAction.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AboutAction.java
Sat Jun 20 19:31:57 2009
@@ -23,7 +23,7 @@
  * AboutAction:
  *
  * @author: Jesse McConnell <jmcconnell@apache.org>
- * @version: $Id:$
+ * @version: $Id$
  * @plexus.component role="com.opensymphony.xwork2.Action"
  * role-hint="about"
  */

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java
Sat Jun 20 19:31:57 2009
@@ -20,9 +20,7 @@
  */
 
 import org.apache.maven.continuum.ContinuumException;
-import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.continuum.web.util.AuditLog;
 import org.apache.continuum.web.util.AuditLogConstants;
 import org.codehaus.plexus.util.StringUtils;
@@ -58,29 +56,27 @@
         {
             return REQUIRES_AUTHORIZATION;
         }
-        
-        BuildTrigger buildTrigger = new BuildTrigger( ContinuumProjectState.TRIGGER_FORCED,
getPrincipal() );
 
         if ( projectId > 0 )
         {
             if ( buildDefinitionId > 0 )
             {
-            	getContinuum().buildProjectWithBuildDefinition( projectId, buildDefinitionId,
buildTrigger );
+                getContinuum().buildProjectWithBuildDefinition( projectId, buildDefinitionId
);
             }
             else
             {
-            	getContinuum().buildProject( projectId, buildTrigger.getUsername() );
+                getContinuum().buildProject( projectId );
             }
         }
         else
         {
             if ( buildDefinitionId > 0 )
             {
-            	getContinuum().buildProjectGroupWithBuildDefinition( projectGroupId, buildDefinitionId,
buildTrigger );
+                getContinuum().buildProjectGroupWithBuildDefinition( projectGroupId, buildDefinitionId
);
             }
             else
             {
-            	getContinuum().buildProjects( buildTrigger.getUsername() );
+                getContinuum().buildProjects();
             }
         }
         

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
Sat Jun 20 19:31:57 2009
@@ -34,7 +34,6 @@
 import org.apache.continuum.buildmanager.BuildsManager;
 import org.apache.continuum.model.project.ProjectScmRoot;
 import org.apache.continuum.model.repository.LocalRepository;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.continuum.web.util.AuditLog;
 import org.apache.continuum.web.util.AuditLogConstants;
 import org.apache.maven.continuum.ContinuumException;
@@ -563,16 +562,14 @@
             addActionError( authzE.getMessage() );
             return REQUIRES_AUTHORIZATION;
         }
-        
-        BuildTrigger buildTrigger = new BuildTrigger( ContinuumProjectState.TRIGGER_FORCED,
getPrincipal() );
 
         if ( this.getBuildDefinitionId() == -1 )
         {
-        	getContinuum().buildProjectGroup( projectGroupId, buildTrigger );
+            getContinuum().buildProjectGroup( projectGroupId );
         }
         else
         {
-        	getContinuum().buildProjectGroupWithBuildDefinition( projectGroupId, buildDefinitionId,
buildTrigger );
+            getContinuum().buildProjectGroupWithBuildDefinition( projectGroupId, buildDefinitionId
);
         }
 
         AuditLog event = new AuditLog( "Project Group id=" + projectGroupId, AuditLogConstants.FORCE_BUILD
);

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
Sat Jun 20 19:31:57 2009
@@ -29,7 +29,6 @@
 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.Project;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.security.ContinuumRoleConstants;
@@ -444,8 +443,8 @@
             return REQUIRES_AUTHENTICATION;
         }
 
-        getContinuum().getBuildsManager().removeProjectFromBuildQueue( projectId, buildDefinitionId,
-        		                                     new BuildTrigger( trigger, "" ), projectName,
projectGroupId );
+        getContinuum().getBuildsManager().removeProjectFromBuildQueue( projectId, buildDefinitionId,
trigger,
+                                                                       projectName, projectGroupId
);
         Project project = getContinuum().getProject( projectId );
         project.setState( project.getOldState() );
         getContinuum().updateProject( project );

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/localization/Continuum.properties
Sat Jun 20 19:31:57 2009
@@ -552,7 +552,6 @@
 buildResult.trigger = Build Trigger
 buildResult.state = State
 buildResult.buildNumber = Build#
-buildResult.username = Triggered by
 buildResult.buildError = Build Error
 buildResult.buildOutput = Output
 buildResult.noOutput = No output.

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResult.jsp
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResult.jsp?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResult.jsp
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResult.jsp
Sat Jun 20 19:31:57 2009
@@ -66,9 +66,6 @@
                     </s:else>
                 </s:param>
             </c1:data>
-            <c1:data label="%{getText('buildResult.username')}">
-                <s:param name="after"><s:property value="buildResult.username"/></s:param>
-            </c1:data>
           </table>
         </div>
         <div class="functnbar3">

Modified: continuum/branches/continuum-1.3.x/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
Sat Jun 20 19:31:57 2009
@@ -35,7 +35,6 @@
 import org.apache.continuum.purge.ContinuumPurgeManagerException;
 import org.apache.continuum.purge.PurgeConfigurationServiceException;
 import org.apache.continuum.repository.RepositoryServiceException;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.continuum.xmlrpc.release.ContinuumReleaseResult;
 import org.apache.continuum.xmlrpc.repository.DirectoryPurgeConfiguration;
 import org.apache.continuum.xmlrpc.repository.LocalRepository;
@@ -595,7 +594,7 @@
         ProjectSummary ps = getProjectSummary( projectId );
         checkBuildProjectInGroupAuthorization( ps.getProjectGroup().getName() );
 
-        continuum.buildProject( projectId, new BuildTrigger( ContinuumProjectState.TRIGGER_SCHEDULED,
"" ) );
+        continuum.buildProject( projectId, ContinuumProjectState.TRIGGER_SCHEDULED );
         return 0;
     }
 
@@ -605,7 +604,7 @@
         ProjectSummary ps = getProjectSummary( projectId );
         checkBuildProjectInGroupAuthorization( ps.getProjectGroup().getName() );
 
-        continuum.buildProject( projectId, buildDefinitionId, new BuildTrigger( ContinuumProjectState.TRIGGER_SCHEDULED,
"" ) );
+        continuum.buildProject( projectId, buildDefinitionId, ContinuumProjectState.TRIGGER_SCHEDULED
);
         return 0;
     }
 
@@ -615,7 +614,7 @@
         ProjectSummary ps = getProjectSummary( projectId );
         checkBuildProjectInGroupAuthorization( ps.getProjectGroup().getName() );
 
-        continuum.buildProject( projectId, new BuildTrigger( ContinuumProjectState.TRIGGER_SCHEDULED,
"" ) );
+        continuum.buildProject( projectId );
         return 0;
     }
 
@@ -625,7 +624,7 @@
         ProjectSummary ps = getProjectSummary( projectId );
         checkBuildProjectInGroupAuthorization( ps.getProjectGroup().getName() );
 
-        continuum.buildProjectWithBuildDefinition( projectId, buildDefintionId, new BuildTrigger(
ContinuumProjectState.TRIGGER_SCHEDULED, "" ) );
+        continuum.buildProjectWithBuildDefinition( projectId, buildDefintionId );
         return 0;
     }
 
@@ -635,7 +634,7 @@
         ProjectGroupSummary pg = getProjectGroupSummary( projectGroupId );
         checkBuildProjectInGroupAuthorization( pg.getName() );
 
-        continuum.buildProjectGroup( projectGroupId, new BuildTrigger( ContinuumProjectState.TRIGGER_SCHEDULED,
"" ) );
+        continuum.buildProjectGroup( projectGroupId );
 
         return 0;
     }
@@ -646,7 +645,7 @@
         ProjectGroupSummary pg = getProjectGroupSummary( projectGroupId );
         checkBuildProjectInGroupAuthorization( pg.getName() );
 
-        continuum.buildProjectGroupWithBuildDefinition( projectGroupId, buildDefintionId,
new BuildTrigger( ContinuumProjectState.TRIGGER_SCHEDULED, "" ) );
+        continuum.buildProjectGroupWithBuildDefinition( projectGroupId, buildDefintionId
);
 
         return 0;
     }



Mime
View raw message