continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r943500 - in /continuum/branches/continuum-flat-multi-module-updated/continuum-core/src: main/java/org/apache/maven/continuum/ main/java/org/apache/maven/continuum/buildcontroller/ main/java/org/apache/maven/continuum/core/action/ main/java...
Date Wed, 12 May 2010 14:07:18 GMT
Author: oching
Date: Wed May 12 14:07:17 2010
New Revision: 943500

URL: http://svn.apache.org/viewvc?rev=943500&view=rev
Log:
o fixed retrieving and setting of fields in build context that is passed between actions

Modified:
    continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataAction.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/DeployArtifactContinuumAction.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/test/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataTest.java

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=943500&r1=943499&r2=943500&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java (original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Wed May 12 14:07:17 2010
@@ -1568,22 +1568,17 @@ public class DefaultContinuum
 
         Map<String, Object> context = new HashMap<String, Object>();
 
-        //CreateProjectsFromMetadataAction.setProjectBuilderId( context, projectBuilderId );
-        context.put( CreateProjectsFromMetadataAction.KEY_PROJECT_BUILDER_ID, projectBuilderId );
-
-        //CreateProjectsFromMetadataAction.setUrl( context, metadataUrl );
-        context.put( AbstractContinuumAction.KEY_URL, metadataUrl );
-
-        //CreateProjectsFromMetadataAction.setLoadRecursiveProject( context, loadRecursiveProjects );
-        context.put( CreateProjectsFromMetadataAction.KEY_LOAD_RECURSIVE_PROJECTS, loadRecursiveProjects );
-
-        //StoreProjectAction.setUseScmCredentialsCache( context, useCredentialsCache );
-        context.put( AbstractContinuumAction.KEY_SCM_USE_CREDENTIALS_CACHE, useCredentialsCache );
-
-        //AbstractContinuumAction.setWorkingDirectory( context, getWorkingDirectory() );
-        context.put( AbstractContinuumAction.KEY_WORKING_DIRECTORY, getWorkingDirectory() );
+        CreateProjectsFromMetadataAction.setProjectBuilderId( context, projectBuilderId );
+        
+        CreateProjectsFromMetadataAction.setUrl( context, metadataUrl );
+        
+        CreateProjectsFromMetadataAction.setLoadRecursiveProject( context, loadRecursiveProjects );
+        
+        StoreProjectAction.setUseScmCredentialsCache( context, useCredentialsCache );
+        
+        AbstractContinuumAction.setWorkingDirectory( context, getWorkingDirectory() );
                 
-        context.put( CreateProjectsFromMetadataAction.KEY_CHECKOUT_PROJECTS_IN_SINGLE_DIRECTORY, checkoutInSingleDirectory );
+        CreateProjectsFromMetadataAction.setCheckoutProjectsInSingleDirectory( context, checkoutInSingleDirectory );
 
         // CreateProjectsFromMetadataAction will check null and use default
         if ( buildDefinitionTemplateId > 0 )
@@ -1605,10 +1600,8 @@ public class DefaultContinuum
 
         executeAction( "create-projects-from-metadata", context );
 
-        //ContinuumProjectBuildingResult result = CreateProjectsFromMetadataAction.getProjectBuildingResult( context );
-        ContinuumProjectBuildingResult result =
-        	            (ContinuumProjectBuildingResult) context.get( CreateProjectsFromMetadataAction.KEY_PROJECT_BUILDING_RESULT );
-
+        ContinuumProjectBuildingResult result = CreateProjectsFromMetadataAction.getProjectBuildingResult( context );
+        
         if ( log.isInfoEnabled() )
         {
             if ( result.getProjects() != null )
@@ -1682,7 +1675,7 @@ public class DefaultContinuum
             projectGroup = projectGroupDao.getProjectGroupWithBuildDetailsByProjectGroupId( projectGroupId );
 
             //String url = CreateProjectsFromMetadataAction.getUrl( context );
-            String url = AbstractContinuumAction.getString( context, AbstractContinuumAction.KEY_PROJECT_SCM_ROOT_URL, null );
+            String url = AbstractContinuumAction.getProjectScmRootUrl( context, null );
 
             List<ProjectScmRoot> scmRoots = getProjectScmRootByProjectGroup( projectGroup.getId() );
 
@@ -1766,10 +1759,10 @@ public class DefaultContinuum
                 
                 if( project != null )
                 {
-                	String scmRootUrl = AbstractContinuumAction.getString( context, AbstractContinuumAction.KEY_PROJECT_SCM_ROOT_URL, null );
+                	String scmRootUrl = AbstractContinuumAction.getProjectScmRootUrl( context, null );
                 	context = new HashMap<String, Object>();
 
-                	context.put( AbstractContinuumAction.KEY_PROJECT_SCM_ROOT_URL, scmRootUrl );
+                	AbstractContinuumAction.setProjectScmRootUrl( context, scmRootUrl );
                 	
                     List<Project> projectsWithSimilarScmRoot = new ArrayList<Project>();
                     for( Project projectWithSimilarScmRoot : projects )
@@ -1777,7 +1770,7 @@ public class DefaultContinuum
                     	projectsWithSimilarScmRoot.add( projectWithSimilarScmRoot );
                     }
 
-                    context.put( AbstractContinuumAction.KEY_PROJECTS_IN_GROUP_WITH_COMMON_SCM_ROOT, projectsWithSimilarScmRoot );
+                    AbstractContinuumAction.setListOfProjectsInGroupWithCommonScmRoot( context, projectsWithSimilarScmRoot );
                     
                     addProjectToCheckoutQueue( projectBuilderId, buildDefinitionTemplateId, context, projectGroupCreation,
                                                scmUserName, scmPassword, project );    
@@ -1815,30 +1808,31 @@ public class DefaultContinuum
                                                          projectDao.getProject( project.getId() ) );
         }
 
-        context.put( AbstractContinuumAction.KEY_UNVALIDATED_PROJECT, project );
+        AbstractContinuumAction.setUnvalidatedProject( context, project );
         //
         //            executeAction( "validate-project", context );
         //
         //            executeAction( "store-project", context );
         //
-        context.put( AbstractContinuumAction.KEY_PROJECT_ID, project.getId() );
+        
+        AbstractContinuumAction.setProjectId( context, project.getId() );
 
         // does the scm username & password really have to be set in the project?
         if ( !StringUtils.isEmpty( scmUserName ) )
         {
             project.setScmUsername( scmUserName );
-            context.put( AbstractContinuumAction.KEY_SCM_USERNAME, scmUserName );
+            CheckoutProjectContinuumAction.setScmUsername( context, scmUserName );
         }
         if ( !StringUtils.isEmpty( scmPassword ) )
         {
             project.setScmPassword( scmPassword );
-            context.put( AbstractContinuumAction.KEY_SCM_PASSWORD, scmPassword );
+            CheckoutProjectContinuumAction.setScmPassword( context, scmPassword );
         }
         //FIXME
         // olamy  : read again the project to have values because store.updateProjectGroup( projectGroup );
         // remove object data -> we don't display the project name in the build queue
-        context.put( AbstractContinuumAction.KEY_PROJECT, projectDao.getProject( project.getId() ) );
-
+        AbstractContinuumAction.setProject( context, projectDao.getProject( project.getId() ) );
+        
         BuildDefinition defaultBuildDefinition = null;
         BuildDefinitionTemplate template = null;
         if ( projectBuilderId.equals( MavenTwoContinuumProjectBuilder.ID ) )
@@ -1869,8 +1863,8 @@ public class DefaultContinuum
         else
         {
             // used by BuildManager to determine on which build queue will the project be put
-            context.put( AbstractContinuumAction.KEY_BUILD_DEFINITION, defaultBuildDefinition );
-
+            AbstractContinuumAction.setBuildDefinition( context, defaultBuildDefinition );
+            
             if ( !configurationService.isDistributedBuildEnabled() )
             {
                 executeAction( "add-project-to-checkout-queue", context );

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=943500&r1=943499&r2=943500&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java (original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java Wed May 12 14:07:17 2010
@@ -328,6 +328,7 @@ public class DefaultBuildController
      * @return
      * @throws TaskExecutionException
      */
+    @SuppressWarnings( "unchecked" )
     protected BuildContext initializeBuildContext( int projectId, int buildDefinitionId, BuildTrigger buildTrigger,
                                                    ScmResult scmResult )
         throws TaskExecutionException
@@ -368,7 +369,7 @@ public class DefaultBuildController
                 projectScmRootAddress = projectScmRoot.getScmRootAddress();
                 if ( projectScmUrl.startsWith( projectScmRoot.getScmRootAddress() ) )
                 {
-                    actionContext.put( AbstractContinuumAction.KEY_PROJECT_SCM_ROOT_URL, projectScmRoot.getScmRootAddress() );                    
+                    AbstractContinuumAction.setProjectScmRootUrl( actionContext, projectScmRoot.getScmRootAddress() );
                     break;
                 }
             }
@@ -385,7 +386,7 @@ public class DefaultBuildController
                         projectsWithCommonScmRoot.add( projectInGroup );
                     }
                 }
-                actionContext.put( AbstractContinuumAction.KEY_PROJECTS_IN_GROUP_WITH_COMMON_SCM_ROOT, projectsWithCommonScmRoot );
+                AbstractContinuumAction.setListOfProjects( actionContext, projectsWithCommonScmRoot );
             }
 
             // CONTINUUM-1871 olamy if continuum is killed during building oldBuildResult will have a endTime 0
@@ -563,8 +564,7 @@ public class DefaultBuildController
                 List<Project> projectsWithCommonScmRoot =
                     AbstractContinuumAction.getListOfProjectsInGroupWithCommonScmRoot( actionContext );
                 String projectScmRootUrl =
-                    AbstractContinuumAction.getString( actionContext, AbstractContinuumAction.KEY_PROJECT_SCM_ROOT_URL,
-                                                       project.getScmUrl() );
+                    AbstractContinuumAction.getProjectScmRootUrl( actionContext, project.getScmUrl() );
 
                 if ( executor == null )
                 {

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java?rev=943500&r1=943499&r2=943500&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java (original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java Wed May 12 14:07:17 2010
@@ -44,87 +44,58 @@ public abstract class AbstractContinuumA
     // ----------------------------------------------------------------------
     // Keys for the values that can be in the context
     // ----------------------------------------------------------------------
-
-    // TODO: Review and fix access of constant variables used for build context!
     
-    public static final String KEY_PROJECT_ID = "project-id";
-
-    public static final String KEY_PROJECT = "project";
+    private static final String KEY_PROJECT_ID = "project-id";
 
-    public static final String KEY_PROJECTS = "projects";
+    private static final String KEY_PROJECT = "project";
 
-    public static final String KEY_PROJECTS_BUILD_DEFINITIONS_MAP = "projects-build-definitions";
+    private static final String KEY_PROJECTS = "projects";
 
-    public static final String KEY_BUILD_DEFINITION_TEMPLATE = "build-definition-template";
+    private static final String KEY_PROJECTS_BUILD_DEFINITIONS_MAP = "projects-build-definitions";
 
-    public static final String KEY_BUILD_DEFINITION = "build-definition";
+    private static final String KEY_BUILD_DEFINITION_TEMPLATE = "build-definition-template";
 
-    public static final String KEY_BUILD_DEFINITION_ID = "build-definition-id";
+    private static final String KEY_BUILD_DEFINITION = "build-definition";
 
-    public static final String KEY_UNVALIDATED_PROJECT = "unvalidated-project";
+    private static final String KEY_BUILD_DEFINITION_ID = "build-definition-id";
 
-    public static final String KEY_PROJECT_GROUP_ID = "project-group-id";
+    private static final String KEY_UNVALIDATED_PROJECT = "unvalidated-project";
 
-    public static final String KEY_UNVALIDATED_PROJECT_GROUP = "unvalidated-project-group";
+    private static final String KEY_PROJECT_GROUP_ID = "project-group-id";
 
-    public static final String KEY_BUILD_ID = "build-id";
+    private static final String KEY_UNVALIDATED_PROJECT_GROUP = "unvalidated-project-group";
 
-    public static final String KEY_WORKING_DIRECTORY = "working-directory";
+    private static final String KEY_BUILD_ID = "build-id";
 
-    public static final String KEY_WORKING_DIRECTORY_EXISTS = "working-directory-exists";
-    
-    public static final String KEY_CHECKOUT_SCM_RESULT = "checkout-result";
-    
-    public static final String KEY_UPDATE_SCM_RESULT = "update-result";
+    private static final String KEY_WORKING_DIRECTORY = "working-directory";
     
-    public static final String KEY_UPDATE_DEPENDENCIES = "update-dependencies";
-
-    public static final String KEY_BUILD_TRIGGER = "buildTrigger"; 
-    
-    public static final String KEY_FIRST_RUN = "first-run";
-
-    //public static final String KEY_OLD_BUILD_ID = "old-buildResult-id";
+    private static final String KEY_UPDATE_DEPENDENCIES = "update-dependencies";
 
-    //public static final String KEY_SCM_RESULT_MAP = "scm-result-map";
-    
-    public static final String KEY_PROJECT_RELATIVE_PATH = "project-relative-path";
-    
-    public static final String KEY_SCM_USE_CREDENTIALS_CACHE = "useCredentialsCache";
-    
-	public static final String KEY_SCM_USERNAME = "scmUserName";
-	
-	public static final String KEY_SCM_PASSWORD = "scmUserPassword";
+    private static final String KEY_BUILD_TRIGGER = "buildTrigger"; 
+    	
+    private static final String KEY_SCM_RESULT = "scmResult";
 	
-	public static final String KEY_SCM_RESULT = "scmResult";
+    private static final String KEY_OLD_SCM_RESULT = "old-scmResult";
 	
-	public static final String KEY_OLD_SCM_RESULT = "old-scmResult";
-	
-	public static final String KEY_PROJECT_SCM_ROOT = "projectScmRoot";
+    private static final String KEY_PROJECT_SCM_ROOT = "projectScmRoot";
 	
     /**
      * SCM root url. Used in these actions add-project-to-checkout-queue, checkout-project, clean-working-directory,
      *      create-projects-from-metadata, update-project-from-working-directory, 
      *      update-working-directory-from-scm
     */
-    public static final String KEY_PROJECT_SCM_ROOT_URL = "projectScmRootUrl";
+    private static final String KEY_PROJECT_SCM_ROOT_URL = "projectScmRootUrl";
 
     /**
      * List of projects in a project group with a common scm root url.
     */
-    public static final String KEY_PROJECTS_IN_GROUP_WITH_COMMON_SCM_ROOT = "projects-in-group-with-common-scm-root";
-
-    public static final String KEY_OLD_BUILD_ID = "old-buildResult-id";
-
-    public static final String KEY_CANCELLED = "cancelled";
+    private static final String KEY_PROJECTS_IN_GROUP_WITH_COMMON_SCM_ROOT = "projects-in-group-with-common-scm-root";
 
-    /**
-     * Metadata url for adding projects.
-    */
-    public static final String KEY_URL = "url";
+    private static final String KEY_OLD_BUILD_ID = "old-buildResult-id";
 
-    public static final String KEY_SCM_RESULT_MAP = "scm-result-map";
+    private static final String KEY_SCM_RESULT_MAP = "scm-result-map";
 
-    public static final String KEY_ROOT_DIRECTORY = "root-directory";
+    private static final String KEY_ROOT_DIRECTORY = "root-directory";
 
     // ----------------------------------------------------------------------
     //
@@ -250,7 +221,7 @@ public abstract class AbstractContinuumA
     {
         context.put( KEY_WORKING_DIRECTORY, workingDirectory );
     }
-
+        
     public static List<ProjectDependency> getUpdatedDependencies( Map<String, Object> context )
     {
         return getUpdatedDependencies( context, null );
@@ -331,6 +302,11 @@ public abstract class AbstractContinuumA
     {
         return (List<Project>) getObject( context, KEY_PROJECTS_IN_GROUP_WITH_COMMON_SCM_ROOT, new ArrayList<Integer>() );
     }
+    
+    public static void setListOfProjectsInGroupWithCommonScmRoot( Map<String, Object> context, List<Project> projects )
+    {
+        context.put( KEY_PROJECTS_IN_GROUP_WITH_COMMON_SCM_ROOT, projects );
+    }
 
     public static Map<Integer, BuildDefinition> getProjectsBuildDefinitionsMap( Map<String, Object> context )
     {
@@ -362,7 +338,17 @@ public abstract class AbstractContinuumA
     {
         context.put( KEY_ROOT_DIRECTORY, isRootDirectory );
     }
-
+    
+    public static String getProjectScmRootUrl( Map<String, Object> context, String projectScmRootUrl )
+    {
+        return getString( context, KEY_PROJECT_SCM_ROOT_URL, projectScmRootUrl );
+    }
+    
+    public static void setProjectScmRootUrl( Map<String, Object> context, String projectScmRootUrl )
+    {
+        context.put( KEY_PROJECT_SCM_ROOT_URL, projectScmRootUrl );
+    }
+    
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java?rev=943500&r1=943499&r2=943500&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java (original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java Wed May 12 14:07:17 2010
@@ -75,7 +75,7 @@ public class AddProjectToCheckOutQueueAc
             scmPassword = CheckoutProjectContinuumAction.getScmPassword( context, null );
         }
         
-        String scmRootUrl = getString( context, KEY_PROJECT_SCM_ROOT_URL, null );
+        String scmRootUrl = getProjectScmRootUrl( context, null );
         
         BuildDefinition defaultBuildDefinition = getBuildDefinition( context );
         parallelBuildsManager.checkoutProject( project.getId(), project.getName(),

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java?rev=943500&r1=943499&r2=943500&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java (original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java Wed May 12 14:07:17 2010
@@ -37,8 +37,6 @@ import org.apache.maven.continuum.utils.
 public class CheckWorkingDirectoryAction
     extends AbstractContinuumAction
 {
-    private static final String KEY_WORKING_DIRECTORY_EXISTS = "working-directory-exists";
-
     /**
      * @plexus.requirement
      */
@@ -48,13 +46,15 @@ public class CheckWorkingDirectoryAction
      * @plexus.requirement
      */
     private ProjectDao projectDao;
+    
+    private static final String KEY_WORKING_DIRECTORY_EXISTS = "working-directory-exists";
 
     public void execute( Map context )
         throws Exception
     {
         Project project = projectDao.getProject( getProjectId( context ) );
         List<Project> projectsWithCommonScmRoot = getListOfProjectsInGroupWithCommonScmRoot( context );
-        String projectScmRootUrl = getString( context, KEY_PROJECT_SCM_ROOT_URL, project.getScmUrl() );
+        String projectScmRootUrl = getProjectScmRootUrl( context, project.getScmUrl() );
        
         File workingDirectory =
             workingDirectoryService.getWorkingDirectory( project, projectScmRootUrl,
@@ -62,7 +62,7 @@ public class CheckWorkingDirectoryAction
 
         if ( !workingDirectory.exists() )
         {
-            setWorkingDirectoryExist( context, false );
+            setWorkingDirectoryExists( context, false );
 
             return;
         }
@@ -77,16 +77,17 @@ public class CheckWorkingDirectoryAction
             throw new ContinuumException( msg );
         }
 
-        setWorkingDirectoryExist( context, files.length > 0 );
+        setWorkingDirectoryExists( context, files.length > 0 );
     }
-
-    public static boolean isWorkingDirectoryExist( Map<String, Object> context )
+    
+    public static boolean isWorkingDirectoryExists( Map<String, Object> context )
     {
-        return getBoolean( context, KEY_WORKING_DIRECTORY_EXISTS );
+        return getBoolean( context, KEY_WORKING_DIRECTORY_EXISTS, false );
     }
 
-    private static void setWorkingDirectoryExist( Map<String, Object> context, boolean exists )
+    public static void setWorkingDirectoryExists( Map<String, Object> context, boolean isWorkingDirectoryExists )
     {
-        context.put( KEY_WORKING_DIRECTORY_EXISTS, exists );
+        context.put( KEY_WORKING_DIRECTORY_EXISTS, isWorkingDirectoryExists );
     }
+
 }

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java?rev=943500&r1=943499&r2=943500&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java (original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java Wed May 12 14:07:17 2010
@@ -53,9 +53,9 @@ public class CheckoutProjectContinuumAct
 
     private static final String KEY_SCM_PASSWORD = "scmUserPassword";
 
-    private static final String KEY_CHECKOUT_SCM_RESULT = "checkout-result";
-
     private static final String KEY_PROJECT_RELATIVE_PATH = "project-relative-path";
+    
+    private static final String KEY_CHECKOUT_SCM_RESULT = "checkout-result";
 
     /**
      * @plexus.requirement
@@ -109,7 +109,7 @@ public class CheckoutProjectContinuumAct
         {
             String scmUserName = getScmUsername( context, project.getScmUsername() );
             String scmPassword = getScmPassword( context, project.getScmPassword() );
-            String scmRootUrl = getString( context, KEY_PROJECT_SCM_ROOT_URL, project.getScmUrl() );
+            String scmRootUrl = getProjectScmRootUrl( context, project.getScmUrl() );
             
             ContinuumScmConfiguration config =
             	createScmConfiguration( project, workingDirectory, scmUserName, scmPassword, scmRootUrl, isRootDirectory( context ) );
@@ -122,7 +122,7 @@ public class CheckoutProjectContinuumAct
             CheckOutScmResult checkoutResult = scm.checkout( config );
             if ( StringUtils.isNotEmpty( checkoutResult.getRelativePathProjectDirectory() ) )
             {
-                context.put( KEY_PROJECT_RELATIVE_PATH, checkoutResult.getRelativePathProjectDirectory() );
+                setProjectRelativePath( context, checkoutResult.getRelativePathProjectDirectory() );
             }
 
             if ( !checkoutResult.isSuccess() )
@@ -190,7 +190,8 @@ public class CheckoutProjectContinuumAct
         }
         finally
         {
-            String relativePath = getString( context, KEY_PROJECT_RELATIVE_PATH, "" );
+            String relativePath = getProjectRelativePath( context );
+            
             if ( StringUtils.isNotEmpty( relativePath ) )
             {
                 project.setRelativePath( relativePath );
@@ -225,7 +226,7 @@ public class CheckoutProjectContinuumAct
             notifier.checkoutComplete( project, buildDefinition );
         }
 
-        setCheckoutResult( context, result );
+        setCheckoutScmResult( context, result );
         setProject( context, project );
     }
 
@@ -328,14 +329,24 @@ public class CheckoutProjectContinuumAct
     {
         context.put( KEY_SCM_PASSWORD, scmPassword );
     }
-
-    public static ScmResult getCheckoutResult( Map<String, Object> context, Object defaultValue )
+    
+    public static String getProjectRelativePath( Map<String, Object> context )
+    {
+        return getString( context, KEY_PROJECT_RELATIVE_PATH, "" );
+    }
+    
+    public static void setProjectRelativePath( Map<String, Object> context, String projectRelativePath )
+    {
+        context.put( KEY_PROJECT_RELATIVE_PATH, projectRelativePath );
+    }
+    
+    public static ScmResult getCheckoutScmResult( Map<String, Object> context, ScmResult defaultValue )
     {
         return (ScmResult) getObject( context, KEY_CHECKOUT_SCM_RESULT, defaultValue );
     }
 
-    public static void setCheckoutResult( Map<String, Object> context, ScmResult checkoutResult )
+    public static void setCheckoutScmResult( Map<String, Object> context, ScmResult scmResult )
     {
-        context.put( KEY_CHECKOUT_SCM_RESULT, checkoutResult );
+        context.put( KEY_CHECKOUT_SCM_RESULT, scmResult );
     }
 }

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java?rev=943500&r1=943499&r2=943500&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java (original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java Wed May 12 14:07:17 2010
@@ -53,7 +53,7 @@ public class CleanWorkingDirectoryAction
     {
         Project project = projectDao.getProject( getProjectId( context ) );
         List<Project> projectsWithCommonScmRoot = getListOfProjectsInGroupWithCommonScmRoot( context );        
-        String projectScmRootUrl = getString( context, KEY_PROJECT_SCM_ROOT_URL, project.getScmUrl() );
+        String projectScmRootUrl = getProjectScmRootUrl( context, project.getScmUrl() );
 
         File workingDirectory =
         	            workingDirectoryService.getWorkingDirectory( project, projectScmRootUrl,

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataAction.java?rev=943500&r1=943499&r2=943500&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataAction.java (original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataAction.java Wed May 12 14:07:17 2010
@@ -61,20 +61,18 @@ import org.codehaus.plexus.util.xml.pull
 public class CreateProjectsFromMetadataAction
     extends AbstractContinuumAction
 {
-    // TODO: Review and fix access of constant variables used for build context!
-    
-    //private static final String KEY_URL = "url";
+    /**
+     * Metadata url for adding projects.
+    */
+    private static final String KEY_URL = "url";
     
-	public static final String KEY_PROJECT_BUILDER_ID = "builderId";
-
-    //private static final String KEY_PROJECT_BUILDER_ID = "builderId";
-	public static final String KEY_PROJECT_BUILDING_RESULT = "projectBuildingResult";
+	private static final String KEY_PROJECT_BUILDER_ID = "builderId";
+	
+	private static final String KEY_PROJECT_BUILDING_RESULT = "projectBuildingResult";
+	
+    private static final String KEY_LOAD_RECURSIVE_PROJECTS = "loadRecursiveProjects";
 
-    //private static final String KEY_PROJECT_BUILDING_RESULT = "projectBuildingResult";
-	public static final String KEY_LOAD_RECURSIVE_PROJECTS = "loadRecursiveProjects";
-
-    //private static final String KEY_LOAD_RECURSIVE_PROJECTS = "loadRecursiveProjects";
-	public static final String KEY_CHECKOUT_PROJECTS_IN_SINGLE_DIRECTORY = "checkoutProjectsInSingleDirectory";
+    public static final String KEY_CHECKOUT_PROJECTS_IN_SINGLE_DIRECTORY = "checkoutProjectsInSingleDirectory";
 
     /**
      * @plexus.requirement
@@ -94,17 +92,14 @@ public class CreateProjectsFromMetadataA
     public void execute( Map context )
         throws ContinuumException, ContinuumProjectBuilderManagerException, ContinuumProjectBuilderException
     {
-        //String projectBuilderId = getProjectBuilderId( context );
-    	String projectBuilderId = getString( context, KEY_PROJECT_BUILDER_ID );
-
-        //boolean loadRecursiveProjects = isLoadRecursiveProject( context );
-    	boolean loadRecursiveProjects = getBoolean( context, KEY_LOAD_RECURSIVE_PROJECTS );
+        String projectBuilderId = getProjectBuilderId( context );
+    	
+        boolean loadRecursiveProjects = isLoadRecursiveProject( context );
     	        
         boolean checkoutProjectsInSingleDirectory = getBoolean( context, KEY_CHECKOUT_PROJECTS_IN_SINGLE_DIRECTORY );
 
-        //String curl = getUrl( context );
-        String curl = getString( context, KEY_URL );
-
+        String curl = getUrl( context );
+        
         URL url;
 
         ContinuumProjectBuilder projectBuilder = projectBuilderManager.getProjectBuilder( projectBuilderId );
@@ -190,7 +185,7 @@ public class CreateProjectsFromMetadataA
                 }
 
                 //setUrl( context, scmRootUrl );
-                context.put( KEY_PROJECT_SCM_ROOT_URL, scmRootUrl );
+                setProjectScmRootUrl( context, scmRootUrl );
             }
         }
         catch ( MalformedURLException e )
@@ -206,8 +201,7 @@ public class CreateProjectsFromMetadataA
             result.addError( ContinuumProjectBuildingResult.ERROR_MALFORMED_URL );
         }
 
-        //setProjectBuildingResult( context, result );
-        context.put( KEY_PROJECT_BUILDING_RESULT, result );
+        setProjectBuildingResult( context, result );
     }
 
     private String hidePasswordInUrl( String url )
@@ -312,17 +306,7 @@ public class CreateProjectsFromMetadataA
     {
         this.urlValidator = urlValidator;
     }
-
-    /*public static ContinuumProjectBuildingResult getProjectBuildingResult( Map<String, Object> context )
-    {
-        return (ContinuumProjectBuildingResult) getObject( context, KEY_PROJECT_BUILDING_RESULT );
-    }
-
-    private static void setProjectBuildingResult( Map<String, Object> context, ContinuumProjectBuildingResult result )
-    {
-        context.put( KEY_PROJECT_BUILDING_RESULT, result );
-    }
-
+    
     public static String getUrl( Map<String, Object> context )
     {
         return getString( context, KEY_URL );
@@ -332,7 +316,7 @@ public class CreateProjectsFromMetadataA
     {
         context.put( KEY_URL, url );
     }
-
+    
     public static String getProjectBuilderId( Map<String, Object> context )
     {
         return getString( context, KEY_PROJECT_BUILDER_ID );
@@ -343,6 +327,16 @@ public class CreateProjectsFromMetadataA
         context.put( KEY_PROJECT_BUILDER_ID, projectBuilderId );
     }
 
+    public static ContinuumProjectBuildingResult getProjectBuildingResult( Map<String, Object> context )
+    {
+        return (ContinuumProjectBuildingResult) getObject( context, KEY_PROJECT_BUILDING_RESULT );
+    }
+
+    private static void setProjectBuildingResult( Map<String, Object> context, ContinuumProjectBuildingResult result )
+    {
+        context.put( KEY_PROJECT_BUILDING_RESULT, result );
+    }
+    
     public static boolean isLoadRecursiveProject( Map<String, Object> context )
     {
         return getBoolean( context, KEY_LOAD_RECURSIVE_PROJECTS );
@@ -351,5 +345,15 @@ public class CreateProjectsFromMetadataA
     public static void setLoadRecursiveProject( Map<String, Object> context, boolean loadRecursiveProject )
     {
         context.put( KEY_LOAD_RECURSIVE_PROJECTS, loadRecursiveProject );
-    }*/
+    }
+    
+    public static boolean isCheckoutProjectsInSingleDirectory( Map<String, Object> context )
+    {
+        return getBoolean( context, KEY_CHECKOUT_PROJECTS_IN_SINGLE_DIRECTORY );
+    }
+    
+    public static void setCheckoutProjectsInSingleDirectory( Map<String, Object> context, boolean checkoutProjectsInSingleDirectory )
+    {
+        context.put( KEY_CHECKOUT_PROJECTS_IN_SINGLE_DIRECTORY, checkoutProjectsInSingleDirectory );
+    }
 }

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/DeployArtifactContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/DeployArtifactContinuumAction.java?rev=943500&r1=943499&r2=943500&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/DeployArtifactContinuumAction.java (original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/DeployArtifactContinuumAction.java Wed May 12 14:07:17 2010
@@ -102,7 +102,7 @@ public class DeployArtifactContinuumActi
             {
                 BuildDefinition buildDefinition = getBuildDefinition( context );
                 
-                String projectScmRootUrl = getString( context, KEY_PROJECT_SCM_ROOT_URL, project.getScmUrl() );
+                String projectScmRootUrl = getProjectScmRootUrl( context, project.getScmUrl() );
                 
                 List<Project> projectsWithCommonScmRoot = getListOfProjectsInGroupWithCommonScmRoot( context );
 

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java?rev=943500&r1=943499&r2=943500&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java (original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java Wed May 12 14:07:17 2010
@@ -205,7 +205,7 @@ public class ExecuteBuilderContinuumActi
 
             projectDao.updateProject( project );
             
-            String projectScmRootUrl = getString( context, KEY_PROJECT_SCM_ROOT_URL, project.getScmUrl() );
+            String projectScmRootUrl = getProjectScmRootUrl( context, project.getScmUrl() );
             List<Project> projectsWithCommonScmRoot = getListOfProjectsInGroupWithCommonScmRoot( context );
 
             // ----------------------------------------------------------------------

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java?rev=943500&r1=943499&r2=943500&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java (original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java Wed May 12 14:07:17 2010
@@ -50,7 +50,7 @@ public class StoreCheckOutScmResultActio
             //
             // ----------------------------------------------------------------------
 
-            ScmResult scmResult = CheckoutProjectContinuumAction.getCheckoutResult( context, null );
+            ScmResult scmResult = CheckoutProjectContinuumAction.getCheckoutScmResult( context, null );
 
             Project project = projectDao.getProject( getProjectId( context ) );
 

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java?rev=943500&r1=943499&r2=943500&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java (original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java Wed May 12 14:07:17 2010
@@ -82,7 +82,7 @@ public class UpdateProjectFromWorkingDir
 
         ScmResult scmResult = (ScmResult) context.get( "scmResult" );
         List<Project> projectsWithCommonScmRoot = getListOfProjectsInGroupWithCommonScmRoot( context );
-        String projectScmRootUrl = getString( context, KEY_PROJECT_SCM_ROOT_URL, project.getScmUrl() );
+        String projectScmRootUrl = getProjectScmRootUrl( context, project.getScmUrl() );
         
         builder.updateProjectFromCheckOut( workingDirectoryService.getWorkingDirectory( project, 
                         projectScmRootUrl, projectsWithCommonScmRoot ), project, buildDefinition, scmResult );

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java?rev=943500&r1=943499&r2=943500&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java (original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java Wed May 12 14:07:17 2010
@@ -117,7 +117,7 @@ public class UpdateWorkingDirectoryFromS
             notifier.checkoutStarted( project, buildDefinition );
 
             List<Project> projectsWithCommonScmRoot = getListOfProjectsInGroupWithCommonScmRoot( context );           
-            String projectScmRootUrl = getString( context, KEY_PROJECT_SCM_ROOT_URL, project.getScmUrl() );
+            String projectScmRootUrl = getProjectScmRootUrl( context, project.getScmUrl() );
             
          // TODO: not sure why this is different to the context, but it all needs to change            
             File workingDirectory =
@@ -200,7 +200,7 @@ public class UpdateWorkingDirectoryFromS
             notifier.checkoutComplete( project, buildDefinition );
         }
 
-        context.put( KEY_UPDATE_SCM_RESULT, result );
+        setUpdateScmResult( context, result );
         AbstractContinuumAction.setProject( context, project );
     }
 
@@ -352,14 +352,14 @@ public class UpdateWorkingDirectoryFromS
         }
         return message.toString();
     }
-
-    public static ScmResult getUpdateScmResult( Map<String, Object> context )
-    {
-        return getUpdateScmResult( context, null );
-    }
-
+    
     public static ScmResult getUpdateScmResult( Map<String, Object> context, ScmResult defaultValue )
     {
         return (ScmResult) getObject( context, KEY_UPDATE_SCM_RESULT, defaultValue );
     }
+    
+    public static void setUpdateScmResult( Map<String, Object> context, ScmResult scmResult )
+    {
+        context.put( KEY_UPDATE_SCM_RESULT, scmResult );
+    }
 }

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java?rev=943500&r1=943499&r2=943500&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java (original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java Wed May 12 14:07:17 2010
@@ -96,10 +96,9 @@ public class CheckOutTaskExecutor
 
         CheckoutProjectContinuumAction.setScmPassword( context, task.getScmPassword() );
         
-        context.put( AbstractContinuumAction.KEY_PROJECT_SCM_ROOT_URL, task.getScmRootUrl() );
+        AbstractContinuumAction.setProjectScmRootUrl( context, task.getScmRootUrl() );
         
-        context.put( AbstractContinuumAction.KEY_PROJECTS_IN_GROUP_WITH_COMMON_SCM_ROOT,
-                             task.getProjectsWithCommonScmRoot() );
+        AbstractContinuumAction.setListOfProjectsInGroupWithCommonScmRoot( context, task.getProjectsWithCommonScmRoot() );
 
         try
         {

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java?rev=943500&r1=943499&r2=943500&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java (original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java Wed May 12 14:07:17 2010
@@ -236,7 +236,7 @@ public class PrepareBuildProjectsTaskExe
                 if ( projectScmUrl.startsWith( projectScmRoot.getScmRootAddress() ) )
                 {
                     AbstractContinuumAction.setProjectScmRoot( context, projectScmRoot );
-                    context.put( AbstractContinuumAction.KEY_PROJECT_SCM_ROOT_URL, projectScmRootAddress );
+                    AbstractContinuumAction.setProjectScmRootUrl( context, projectScmRootAddress );
                     break;
                 }
             }
@@ -262,7 +262,7 @@ public class PrepareBuildProjectsTaskExe
                          projectsWithCommonScmRoot.add( projectInGroup );
                      }
                  }            
-                 context.put( AbstractContinuumAction.KEY_PROJECTS_IN_GROUP_WITH_COMMON_SCM_ROOT, projectsWithCommonScmRoot );
+                 AbstractContinuumAction.setListOfProjectsInGroupWithCommonScmRoot( context, projectsWithCommonScmRoot );
              }
             
             BuildResult oldBuildResult =
@@ -298,7 +298,7 @@ public class PrepareBuildProjectsTaskExe
     {
         performAction( "check-working-directory", context );
 
-        boolean workingDirectoryExists = CheckWorkingDirectoryAction.isWorkingDirectoryExist( context );
+        boolean workingDirectoryExists = CheckWorkingDirectoryAction.isWorkingDirectoryExists( context );
 
         ScmResult scmResult;
 
@@ -306,7 +306,7 @@ public class PrepareBuildProjectsTaskExe
         {
             performAction( "update-working-directory-from-scm", context );
 
-            scmResult = UpdateWorkingDirectoryFromScmContinuumAction.getUpdateScmResult( context );
+            scmResult = UpdateWorkingDirectoryFromScmContinuumAction.getUpdateScmResult( context, null );
         }
         else
         {
@@ -316,7 +316,7 @@ public class PrepareBuildProjectsTaskExe
                 project ).getAbsolutePath() );
             
             List<Project> projectsWithCommonScmRoot = AbstractContinuumAction.getListOfProjectsInGroupWithCommonScmRoot( context );           
-            String projectScmRootUrl = AbstractContinuumAction.getString( context, AbstractContinuumAction.KEY_PROJECT_SCM_ROOT_URL, project.getScmUrl() );
+            String projectScmRootUrl = AbstractContinuumAction.getProjectScmRootUrl( context, project.getScmUrl() );
             String workingDir = null;
 
             if ( rootProject.getId() == project.getId() )
@@ -354,7 +354,7 @@ public class PrepareBuildProjectsTaskExe
 
             performAction( "checkout-project", context );
 
-            scmResult = CheckoutProjectContinuumAction.getCheckoutResult( context, null );
+            scmResult = CheckoutProjectContinuumAction.getCheckoutScmResult( context, null );
         }
 
         // [CONTINUUM-2207] when returned scmResult is null, this causes a problem when building the project 

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java?rev=943500&r1=943499&r2=943500&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java (original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java Wed May 12 14:07:17 2010
@@ -147,7 +147,7 @@ public class DefaultBuildControllerTest
         ProjectScmRoot projectScmRoot = new ProjectScmRoot();
         projectScmRoot.setId( 1 );
         projectScmRoot.setScmRootAddress( "scm:local:src/test-projects:flat-multi-module" );
-        actionContext.put( AbstractContinuumAction.KEY_PROJECT_SCM_ROOT, projectScmRoot );
+        AbstractContinuumAction.setProjectScmRoot( actionContext, projectScmRoot );
 
         return context;
     }

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/test/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/test/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataTest.java?rev=943500&r1=943499&r2=943500&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/test/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataTest.java (original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-core/src/test/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataTest.java Wed May 12 14:07:17 2010
@@ -109,16 +109,14 @@ public class CreateProjectsFromMetadataT
     	invokeBuildSettings();
     	
         Map<String, Object> context = new HashMap<String, Object>();
-        context.put( AbstractContinuumAction.KEY_URL,
-		            "http://svn.apache.org/repos/asf/maven/continuum/trunk/pom.xml" );
-        context.put( CreateProjectsFromMetadataAction.KEY_PROJECT_BUILDER_ID, "id" );
-        context.put( CreateProjectsFromMetadataAction.KEY_LOAD_RECURSIVE_PROJECTS, true );
+        CreateProjectsFromMetadataAction.setUrl( context, "http://svn.apache.org/repos/asf/maven/continuum/trunk/pom.xml" );
+        CreateProjectsFromMetadataAction.setProjectBuilderId( context, "id" );
+        CreateProjectsFromMetadataAction.setLoadRecursiveProject( context, true );
         context.put( CreateProjectsFromMetadataAction.KEY_CHECKOUT_PROJECTS_IN_SINGLE_DIRECTORY, false );
 
         action.execute( context );
 
-        ContinuumProjectBuildingResult result =
-	            (ContinuumProjectBuildingResult) context.get( CreateProjectsFromMetadataAction.KEY_PROJECT_BUILDING_RESULT );
+        ContinuumProjectBuildingResult result = CreateProjectsFromMetadataAction.getProjectBuildingResult( context );
 
         assertFalse(
             "Should not have errors but had " + result.getErrorsAsString() + " (this test requires internet access)",
@@ -131,16 +129,14 @@ public class CreateProjectsFromMetadataT
     	invokeBuildSettings();
     	
         Map<String, Object> context = new HashMap<String, Object>();
-        context.put( AbstractContinuumAction.KEY_URL,
-            "http://svn.apache.org/repos/asf/maven/archiva/trunk/pom.xml" );
-        context.put( CreateProjectsFromMetadataAction.KEY_PROJECT_BUILDER_ID, "id" );
-        context.put( CreateProjectsFromMetadataAction.KEY_LOAD_RECURSIVE_PROJECTS, false );
+        CreateProjectsFromMetadataAction.setUrl( context, "http://svn.apache.org/repos/asf/maven/archiva/trunk/pom.xml" );
+        CreateProjectsFromMetadataAction.setProjectBuilderId( context,  "id" );
+        CreateProjectsFromMetadataAction.setLoadRecursiveProject( context, false );
         context.put( CreateProjectsFromMetadataAction.KEY_CHECKOUT_PROJECTS_IN_SINGLE_DIRECTORY, false );
 
         action.execute( context );
 
-        ContinuumProjectBuildingResult result =
-        	            (ContinuumProjectBuildingResult) context.get( CreateProjectsFromMetadataAction.KEY_PROJECT_BUILDING_RESULT );
+        ContinuumProjectBuildingResult result = CreateProjectsFromMetadataAction.getProjectBuildingResult( context );
 
         assertFalse(
             "Should not have errors but had " + result.getErrorsAsString() + " (this test requires internet access)",
@@ -183,22 +179,21 @@ public class CreateProjectsFromMetadataT
                         
         // assert using scm url set in root!
         Map<String, Object> context = new HashMap<String, Object>();
-        context.put( AbstractContinuumAction.KEY_URL,
-                     "file://" + PlexusInSpringTestCase.getBasedir() + "/src/test-projects/flat-multi-module/parent-project/pom.xml" );
-        context.put( CreateProjectsFromMetadataAction.KEY_PROJECT_BUILDER_ID, "id" );
-        context.put( CreateProjectsFromMetadataAction.KEY_LOAD_RECURSIVE_PROJECTS, true );
+        CreateProjectsFromMetadataAction.setUrl( context, "file://" + PlexusInSpringTestCase.getBasedir()
+            + "/src/test-projects/flat-multi-module/parent-project/pom.xml" );
+        CreateProjectsFromMetadataAction.setProjectBuilderId( context, "id" );
+        CreateProjectsFromMetadataAction.setLoadRecursiveProject( context, true );
         context.put( CreateProjectsFromMetadataAction.KEY_CHECKOUT_PROJECTS_IN_SINGLE_DIRECTORY, true );
 
         action.execute( context );
 
-        ContinuumProjectBuildingResult result =
-            (ContinuumProjectBuildingResult) context.get( CreateProjectsFromMetadataAction.KEY_PROJECT_BUILDING_RESULT );
+        ContinuumProjectBuildingResult result = CreateProjectsFromMetadataAction.getProjectBuildingResult( context );
 
         assertFalse(
             "Should not have errors but had " + result.getErrorsAsString() + " (this test requires internet access)",
             result.hasErrors() );
         assertEquals( "Incorrect SCM Root Url for flat multi-module project.",
-                      "scm:local:src/test-projects:flat-multi-module/", context.get( AbstractContinuumAction.KEY_PROJECT_SCM_ROOT_URL ) );
+                      "scm:local:src/test-projects:flat-multi-module/", AbstractContinuumAction.getProjectScmRootUrl( context, "" ) );
     }
 
     public void testExecuteFlatMultiModuleProjectThatStartsWithTheSameLetter()
@@ -237,16 +232,15 @@ public class CreateProjectsFromMetadataT
         this.result.addProject( project );
 
         Map<String, Object> context = new HashMap<String, Object>();
-        context.put( AbstractContinuumAction.KEY_URL,
-	                 "http://svn.apache.org/repos/asf/continuum/sandbox/flat-example/flat-parent/pom.xml" );
-	    context.put( CreateProjectsFromMetadataAction.KEY_PROJECT_BUILDER_ID, "id" );
-	    context.put( CreateProjectsFromMetadataAction.KEY_LOAD_RECURSIVE_PROJECTS, true );
+        CreateProjectsFromMetadataAction.setUrl( context,
+                                                 "http://svn.apache.org/repos/asf/continuum/sandbox/flat-example/flat-parent/pom.xml" );
+        CreateProjectsFromMetadataAction.setProjectBuilderId( context,  "id" );
+        CreateProjectsFromMetadataAction.setLoadRecursiveProject( context, true );
 	    context.put( CreateProjectsFromMetadataAction.KEY_CHECKOUT_PROJECTS_IN_SINGLE_DIRECTORY, false );
 
         action.execute( context );
 
-        ContinuumProjectBuildingResult result =
-        	            (ContinuumProjectBuildingResult) context.get( CreateProjectsFromMetadataAction.KEY_PROJECT_BUILDING_RESULT );
+        ContinuumProjectBuildingResult result = CreateProjectsFromMetadataAction.getProjectBuildingResult( context );
 
         assertFalse(
             "Should not have errors but had " + result.getErrorsAsString() + " (this test requires internet access)",
@@ -254,6 +248,6 @@ public class CreateProjectsFromMetadataT
 
         assertEquals(
             "Wrong scm root url created", "scm:svn:http://svn.apache.org/repos/asf/continuum/sandbox/flat-example/",
-            context.get( AbstractContinuumAction.KEY_PROJECT_SCM_ROOT_URL ) );
+            AbstractContinuumAction.getProjectScmRootUrl( context, null ) );
     }
 }



Mime
View raw message