continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1372260 [11/30] - in /continuum/trunk: ./ continuum-api/ continuum-api/src/main/java/org/apache/continuum/builder/distributed/ continuum-api/src/main/java/org/apache/continuum/builder/distributed/executor/ continuum-api/src/main/java/org/a...
Date Mon, 13 Aug 2012 04:29:28 GMT
Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Mon Aug 13 04:29:09 2012
@@ -600,7 +600,8 @@ public class DefaultContinuum
         return ( builds.isEmpty() ? null : builds.get( 0 ) );
     }
 
-    public List<BuildResult> getBuildResultsInRange( int projectGroupId, Date fromDate, Date toDate, int state, String triggeredBy )
+    public List<BuildResult> getBuildResultsInRange( int projectGroupId, Date fromDate, Date toDate, int state,
+                                                     String triggeredBy )
     {
         return buildResultDao.getBuildResultsInRange( fromDate, toDate, state, triggeredBy, projectGroupId );
     }
@@ -652,8 +653,8 @@ public class DefaultContinuum
                 throw new ContinuumException( e.getMessage(), e );
             }
 
-            List<ContinuumReleaseResult> releaseResults =
-                releaseResultDao.getContinuumReleaseResultsByProject( projectId );
+            List<ContinuumReleaseResult> releaseResults = releaseResultDao.getContinuumReleaseResultsByProject(
+                projectId );
 
             ProjectScmRoot scmRoot = getProjectScmRootByProject( projectId );
 
@@ -664,8 +665,8 @@ public class DefaultContinuum
                     releaseResultDao.removeContinuumReleaseResult( releaseResult );
                 }
 
-                File releaseOutputDirectory =
-                    configurationService.getReleaseOutputDirectory( project.getProjectGroup().getId() );
+                File releaseOutputDirectory = configurationService.getReleaseOutputDirectory(
+                    project.getProjectGroup().getId() );
 
                 if ( releaseOutputDirectory != null )
                 {
@@ -783,7 +784,7 @@ public class DefaultContinuum
     public void buildProjects( String username )
         throws ContinuumException, NoBuildAgentException, NoBuildAgentInGroupException
     {
-    	buildProjects( new BuildTrigger( ContinuumProjectState.TRIGGER_FORCED, username ) );
+        buildProjects( new BuildTrigger( ContinuumProjectState.TRIGGER_FORCED, username ) );
     }
 
     public void buildProjectsWithBuildDefinition( List<Project> projects, List<BuildDefinition> bds )
@@ -791,7 +792,8 @@ public class DefaultContinuum
     {
         Collection<Project> filteredProjectsList = getProjectsNotInReleaseStage( projects );
 
-        prepareBuildProjects( filteredProjectsList, bds, true, new BuildTrigger( ContinuumProjectState.TRIGGER_FORCED, "" ) );
+        prepareBuildProjects( filteredProjectsList, bds, true, new BuildTrigger( ContinuumProjectState.TRIGGER_FORCED,
+                                                                                 "" ) );
     }
 
     public void buildProjectsWithBuildDefinition( List<Project> projects, int buildDefinitionId )
@@ -799,7 +801,8 @@ public class DefaultContinuum
     {
         Collection<Project> filteredProjectsList = getProjectsNotInReleaseStage( projects );
 
-        prepareBuildProjects( filteredProjectsList, buildDefinitionId, new BuildTrigger( ContinuumProjectState.TRIGGER_FORCED, "" ) );
+        prepareBuildProjects( filteredProjectsList, buildDefinitionId, new BuildTrigger(
+            ContinuumProjectState.TRIGGER_FORCED, "" ) );
     }
 
     /**
@@ -847,7 +850,8 @@ public class DefaultContinuum
      * @param buildTrigger      the trigger state and the username
      * @throws ContinuumException
      */
-    public void buildProjectGroupWithBuildDefinition( int projectGroupId, int buildDefinitionId, BuildTrigger buildTrigger )
+    public void buildProjectGroupWithBuildDefinition( int projectGroupId, int buildDefinitionId,
+                                                      BuildTrigger buildTrigger )
         throws ContinuumException, NoBuildAgentException, NoBuildAgentInGroupException
     {
         if ( !isAnyProjectInGroupInReleaseStage( projectGroupId ) )
@@ -868,11 +872,13 @@ public class DefaultContinuum
      * @param projectGroupId
      * @param bds
      * @param checkDefaultBuildDefinitionForProject
+     *
      * @param buildTrigger
      * @throws ContinuumException
      */
     private void buildProjectGroupWithBuildDefinition( int projectGroupId, List<BuildDefinition> bds,
-    		                                   boolean checkDefaultBuildDefinitionForProject, BuildTrigger buildTrigger )
+                                                       boolean checkDefaultBuildDefinitionForProject,
+                                                       BuildTrigger buildTrigger )
         throws ContinuumException, NoBuildAgentException, NoBuildAgentInGroupException
     {
         if ( !isAnyProjectInGroupInReleaseStage( projectGroupId ) )
@@ -880,7 +886,7 @@ public class DefaultContinuum
             Collection<Project> projectsList;
 
             projectsList = getProjectsInBuildOrder( projectDao.getProjectsWithDependenciesByGroupId( projectGroupId ) );
-            
+
             buildTrigger.setTrigger( ContinuumProjectState.TRIGGER_FORCED );
 
             prepareBuildProjects( projectsList, bds, checkDefaultBuildDefinitionForProject, buildTrigger );
@@ -965,7 +971,9 @@ public class DefaultContinuum
                     }
                     else
                     {
-                        log.info( "Not queueing the build with projectId={} and buildDefinitionId={} because it is already building", projectId, buildDefId );
+                        log.info(
+                            "Not queueing the build with projectId={} and buildDefinitionId={} because it is already building",
+                            projectId, buildDefId );
                     }
                 }
             }
@@ -982,13 +990,13 @@ public class DefaultContinuum
             }
             catch ( NoBuildAgentException e )
             {
-                log.error( "Unable to build projects in project group " + scmRoot.getProjectGroup().getName() 
-                           + " because there is no build agent configured" );
+                log.error( "Unable to build projects in project group " + scmRoot.getProjectGroup().getName() +
+                               " because there is no build agent configured" );
             }
             catch ( NoBuildAgentInGroupException e )
             {
-                log.error( "Unable to build projects in project group " + scmRoot.getProjectGroup().getName() 
-                           + " because there is no build agent configured in build agent group" );
+                log.error( "Unable to build projects in project group " + scmRoot.getProjectGroup().getName() +
+                               " because there is no build agent configured in build agent group" );
             }
         }
     }
@@ -996,14 +1004,14 @@ public class DefaultContinuum
     public void buildProject( int projectId, String username )
         throws ContinuumException, NoBuildAgentException, NoBuildAgentInGroupException
     {
-    	buildProject( projectId, new BuildTrigger( ContinuumProjectState.TRIGGER_FORCED, username ) );
+        buildProject( projectId, new BuildTrigger( ContinuumProjectState.TRIGGER_FORCED, username ) );
     }
 
     public void buildProjectWithBuildDefinition( int projectId, int buildDefinitionId, BuildTrigger buildTrigger )
         throws ContinuumException, NoBuildAgentException, NoBuildAgentInGroupException
     {
-    	buildTrigger.setTrigger( ContinuumProjectState.TRIGGER_FORCED );
-    	buildProject( projectId, buildDefinitionId, buildTrigger );
+        buildTrigger.setTrigger( ContinuumProjectState.TRIGGER_FORCED );
+        buildProject( projectId, buildDefinitionId, buildTrigger );
     }
 
     public void buildProject( int projectId, BuildTrigger buildTrigger )
@@ -1024,7 +1032,9 @@ public class DefaultContinuum
 
         if ( !isProjectOkToBuild( projectId, buildDef.getId() ) )
         {
-            log.info( "Not queueing the build with projectId={} and buildDefinitionId={} because it is already building", projectId, buildDef.getId() );
+            log.info(
+                "Not queueing the build with projectId={} and buildDefinitionId={} because it is already building",
+                projectId, buildDef.getId() );
             return;
         }
 
@@ -1033,7 +1043,7 @@ public class DefaultContinuum
 
         ProjectScmRoot scmRoot = getProjectScmRootByProject( projectId );
         List<ProjectScmRoot> sortedScmRoot = new ArrayList<ProjectScmRoot>();
-        sortedScmRoot.add(scmRoot);
+        sortedScmRoot.add( scmRoot );
 
         prepareBuildProjects( projectsBuildDefinitionsMap, buildTrigger, scmRoot.getScmRootAddress(),
                               scmRoot.getProjectGroup().getId(), scmRoot.getId(), sortedScmRoot );
@@ -1050,7 +1060,9 @@ public class DefaultContinuum
 
         if ( !isProjectOkToBuild( projectId, buildDefinitionId ) )
         {
-            log.info( "Not queueing the build with projectId={} and buildDefinitionId={} because it is already building", projectId, buildDefinitionId );
+            log.info(
+                "Not queueing the build with projectId={} and buildDefinitionId={} because it is already building",
+                projectId, buildDefinitionId );
             return;
         }
 
@@ -1059,7 +1071,7 @@ public class DefaultContinuum
 
         ProjectScmRoot scmRoot = getProjectScmRootByProject( projectId );
         List<ProjectScmRoot> sortedScmRoot = new ArrayList<ProjectScmRoot>();
-        sortedScmRoot.add(scmRoot);
+        sortedScmRoot.add( scmRoot );
 
         prepareBuildProjects( projectsBuildDefinitionsMap, buildTrigger, scmRoot.getScmRootAddress(),
                               scmRoot.getProjectGroup().getId(), scmRoot.getId(), sortedScmRoot );
@@ -1131,8 +1143,8 @@ public class DefaultContinuum
             {
                 FileUtils.deleteDirectory( buildDirectory );
             }
-            File buildOutputFile =
-                getConfiguration().getBuildOutputFile( buildResult.getId(), buildResult.getProject().getId() );
+            File buildOutputFile = getConfiguration().getBuildOutputFile( buildResult.getId(),
+                                                                          buildResult.getProject().getId() );
             if ( buildOutputFile.exists() )
             {
                 FileUtils.forceDelete( buildOutputFile );
@@ -1361,7 +1373,8 @@ public class DefaultContinuum
         {
             return executeAddProjectsFromMetadataActivity( metadataUrl, MavenTwoContinuumProjectBuilder.ID,
                                                            projectGroupId, checkProtocol, useCredentialsCache, true,
-                                                           buildDefinitionService.getDefaultMavenTwoBuildDefinitionTemplate().getId(), false );
+                                                           buildDefinitionService.getDefaultMavenTwoBuildDefinitionTemplate().getId(),
+                                                           false );
         }
         catch ( BuildDefinitionServiceException e )
         {
@@ -1379,7 +1392,8 @@ public class DefaultContinuum
             return executeAddProjectsFromMetadataActivity( metadataUrl, MavenTwoContinuumProjectBuilder.ID,
                                                            projectGroupId, checkProtocol, useCredentialsCache,
                                                            recursiveProjects,
-                                                           buildDefinitionService.getDefaultMavenTwoBuildDefinitionTemplate().getId(), false );
+                                                           buildDefinitionService.getDefaultMavenTwoBuildDefinitionTemplate().getId(),
+                                                           false );
         }
         catch ( BuildDefinitionServiceException e )
         {
@@ -1463,19 +1477,19 @@ public class DefaultContinuum
         AbstractContinuumAction.setUnvalidatedProjectGroup( context, projectGroup );
 
         AbstractContinuumAction.setProjectGroupId( context, projectGroup.getId() );
-        
+
         StoreProjectAction.setUseScmCredentialsCache( context, project.isScmUseCache() );
-        
+
         // set for initial checkout
         String scmUsername = project.getScmUsername();
         String scmPassword = project.getScmPassword();
-        
-        if( scmUsername != null && !StringUtils.isEmpty( scmUsername ) )
+
+        if ( scmUsername != null && !StringUtils.isEmpty( scmUsername ) )
         {
             CheckoutProjectContinuumAction.setScmUsername( context, scmUsername );
         }
-        
-        if( scmPassword != null && !StringUtils.isEmpty( scmPassword ) )
+
+        if ( scmPassword != null && !StringUtils.isEmpty( scmPassword ) )
         {
             CheckoutProjectContinuumAction.setScmPassword( context, scmPassword );
         }
@@ -1512,8 +1526,8 @@ public class DefaultContinuum
                 }
             }
 
-            buildDefinitionService.addTemplateInProject( bdt.getId(), getProject(
-                AbstractContinuumAction.getProjectId( context ) ) );
+            buildDefinitionService.addTemplateInProject( bdt.getId(), getProject( AbstractContinuumAction.getProjectId(
+                context ) ) );
         }
         catch ( BuildDefinitionServiceException e )
         {
@@ -1523,8 +1537,8 @@ public class DefaultContinuum
         if ( !configurationService.isDistributedBuildEnabled() )
         {
             // used by BuildManager to determine on which build queue will the project be put
-            BuildDefinition bd = (BuildDefinition) getProjectWithBuildDetails(
-                AbstractContinuumAction.getProjectId( context ) ).getBuildDefinitions().get( 0 );
+            BuildDefinition bd = (BuildDefinition) getProjectWithBuildDetails( AbstractContinuumAction.getProjectId(
+                context ) ).getBuildDefinitions().get( 0 );
             AbstractContinuumAction.setBuildDefinition( context, bd );
 
             executeAction( "add-project-to-checkout-queue", context );
@@ -1543,7 +1557,7 @@ public class DefaultContinuum
         throws ContinuumException
     {
         return executeAddProjectsFromMetadataActivity( metadataUrl, projectBuilderId, projectGroupId, checkProtocol,
-        						false, false, buildDefinitionTemplateId, false );
+                                                       false, false, buildDefinitionTemplateId, false );
     }
 
 
@@ -1571,15 +1585,15 @@ public class DefaultContinuum
         Map<String, Object> context = new HashMap<String, Object>();
 
         CreateProjectsFromMetadataAction.setProjectBuilderId( context, projectBuilderId );
-        
+
         CreateProjectsFromMetadataAction.setUrl( context, metadataUrl );
-        
+
         CreateProjectsFromMetadataAction.setLoadRecursiveProject( context, loadRecursiveProjects );
-        
+
         StoreProjectAction.setUseScmCredentialsCache( context, useCredentialsCache );
-        
+
         AbstractContinuumAction.setWorkingDirectory( context, getWorkingDirectory() );
-                
+
         CreateProjectsFromMetadataAction.setCheckoutProjectsInSingleDirectory( context, checkoutInSingleDirectory );
 
         // CreateProjectsFromMetadataAction will check null and use default
@@ -1603,7 +1617,7 @@ public class DefaultContinuum
         executeAction( "create-projects-from-metadata", context );
 
         ContinuumProjectBuildingResult result = CreateProjectsFromMetadataAction.getProjectBuildingResult( context );
-        
+
         if ( log.isInfoEnabled() )
         {
             if ( result.getProjects() != null )
@@ -1746,42 +1760,44 @@ public class DefaultContinuum
         {
             projectGroupDao.updateProjectGroup( projectGroup );
 
-            if( !checkoutInSingleDirectory )
+            if ( !checkoutInSingleDirectory )
             {
                 for ( Project project : projects )
                 {
-                	context = new HashMap<String, Object>();
+                    context = new HashMap<String, Object>();
 
                     Project fetchedProject = projectDao.getProjectWithBuildDetails( project.getId() );
 
-            	    addProjectToCheckoutQueue( projectBuilderId, buildDefinitionTemplateId, context,
-            				                                               projectGroupCreation, scmUserName, scmPassword, project,
-                                                                           isDefaultProjectBuildDefSet( fetchedProject ) );
+                    addProjectToCheckoutQueue( projectBuilderId, buildDefinitionTemplateId, context,
+                                               projectGroupCreation, scmUserName, scmPassword, project,
+                                               isDefaultProjectBuildDefSet( fetchedProject ) );
                 }
             }
             else
-            {   
+            {
                 Project project = result.getRootProject();
-                
-                if( project != null )
+
+                if ( project != null )
                 {
-                	String scmRootUrl = AbstractContinuumAction.getProjectScmRootUrl( context, null );
-                	context = new HashMap<String, Object>();
+                    String scmRootUrl = AbstractContinuumAction.getProjectScmRootUrl( context, null );
+                    context = new HashMap<String, Object>();
+
+                    AbstractContinuumAction.setProjectScmRootUrl( context, scmRootUrl );
 
-                	AbstractContinuumAction.setProjectScmRootUrl( context, scmRootUrl );
-                	
                     List<Project> projectsWithSimilarScmRoot = new ArrayList<Project>();
-                    for( Project projectWithSimilarScmRoot : projects )
+                    for ( Project projectWithSimilarScmRoot : projects )
                     {
-                    	projectsWithSimilarScmRoot.add( projectWithSimilarScmRoot );
+                        projectsWithSimilarScmRoot.add( projectWithSimilarScmRoot );
                     }
 
-                    AbstractContinuumAction.setListOfProjectsInGroupWithCommonScmRoot( context, projectsWithSimilarScmRoot );
+                    AbstractContinuumAction.setListOfProjectsInGroupWithCommonScmRoot( context,
+                                                                                       projectsWithSimilarScmRoot );
 
                     Project fetchedProject = projectDao.getProjectWithBuildDetails( project.getId() );
 
-                    addProjectToCheckoutQueue( projectBuilderId, buildDefinitionTemplateId, context, projectGroupCreation,
-                                               scmUserName, scmPassword, project, isDefaultProjectBuildDefSet( fetchedProject ) );
+                    addProjectToCheckoutQueue( projectBuilderId, buildDefinitionTemplateId, context,
+                                               projectGroupCreation, scmUserName, scmPassword, project,
+                                               isDefaultProjectBuildDefSet( fetchedProject ) );
                 }
             }
         }
@@ -1826,8 +1842,8 @@ public class DefaultContinuum
         // if no group creation
         if ( !projectGroupCreation && buildDefinitionTemplateId > 0 && !defaultProjectBuildDefSet )
         {
-            buildDefinitionService.addTemplateInProject( buildDefinitionTemplateId,
-                                                         projectDao.getProject( project.getId() ) );
+            buildDefinitionService.addTemplateInProject( buildDefinitionTemplateId, projectDao.getProject(
+                project.getId() ) );
         }
 
         AbstractContinuumAction.setUnvalidatedProject( context, project );
@@ -1836,7 +1852,7 @@ public class DefaultContinuum
         //
         //            executeAction( "store-project", context );
         //
-        
+
         AbstractContinuumAction.setProjectId( context, project.getId() );
 
         // does the scm username & password really have to be set in the project?
@@ -1854,14 +1870,14 @@ public class DefaultContinuum
         // 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
         AbstractContinuumAction.setProject( context, projectDao.getProject( project.getId() ) );
-        
+
         BuildDefinition defaultBuildDefinition = null;
         BuildDefinitionTemplate template = null;
         if ( projectBuilderId.equals( MavenTwoContinuumProjectBuilder.ID ) )
         {
             template = buildDefinitionService.getDefaultMavenTwoBuildDefinitionTemplate();
 
-            if( template != null && template.getBuildDefinitions().size() > 0 )
+            if ( template != null && template.getBuildDefinitions().size() > 0 )
             {
                 defaultBuildDefinition = template.getBuildDefinitions().get( 0 );
             }
@@ -1886,7 +1902,7 @@ public class DefaultContinuum
         {
             // used by BuildManager to determine on which build queue will the project be put
             AbstractContinuumAction.setBuildDefinition( context, defaultBuildDefinition );
-            
+
             if ( !configurationService.isDistributedBuildEnabled() )
             {
                 executeAction( "add-project-to-checkout-queue", context );
@@ -2177,12 +2193,12 @@ public class DefaultContinuum
         catch ( ContinuumObjectNotFoundException cne )
         {
             throw new ContinuumException( "Project Group (id=" + projectGroupId +
-                ") doesn't have a default build definition, this should be impossible, it should always have a default definition set." );
+                                              ") doesn't have a default build definition, this should be impossible, it should always have a default definition set." );
         }
         catch ( ContinuumStoreException cse )
         {
             throw new ContinuumException( "Project Group (id=" + projectGroupId +
-                ") doesn't have a default build definition, this should be impossible, it should always have a default definition set." );
+                                              ") doesn't have a default build definition, this should be impossible, it should always have a default definition set." );
         }
     }
 
@@ -2576,7 +2592,7 @@ public class DefaultContinuum
         }
 
         String[] files = workingDirectory.list();
-        Arrays.sort(files, String.CASE_INSENSITIVE_ORDER);
+        Arrays.sort( files, String.CASE_INSENSITIVE_ORDER );
 
         if ( files != null )
         {
@@ -2688,7 +2704,7 @@ public class DefaultContinuum
                 try
                 {
                     log.info( "Fix project state for project " + project.getId() + ":" + project.getName() + ":" +
-                        project.getVersion() );
+                                  project.getVersion() );
 
                     projectDao.updateProject( project );
 
@@ -2706,7 +2722,7 @@ public class DefaultContinuum
             }
 
             log.info( " " + project.getId() + ":" + project.getName() + ":" + project.getVersion() + ":" +
-                project.getExecutorId() );
+                          project.getExecutorId() );
         }
 
         for ( ProjectScmRoot projectScmRoot : projectScmRootDao.getAllProjectScmRoots() )
@@ -3189,7 +3205,8 @@ public class DefaultContinuum
             try
             {
                 result = (ReleaseResult) distributedReleaseManager.getReleaseResult( releaseId );
-                PreparedRelease preparedRelease = distributedReleaseManager.getPreparedRelease( releaseId, releaseType );
+                PreparedRelease preparedRelease = distributedReleaseManager.getPreparedRelease( releaseId,
+                                                                                                releaseType );
                 if ( preparedRelease != null )
                 {
                     releaseBy = preparedRelease.getReleaseBy();
@@ -3207,43 +3224,47 @@ public class DefaultContinuum
         else
         {
             result = (ReleaseResult) releaseManager.getReleaseResults().get( releaseId );
-            ContinuumReleaseDescriptor descriptor = (ContinuumReleaseDescriptor) releaseManager.getPreparedReleases().get( releaseId );
+            ContinuumReleaseDescriptor descriptor =
+                (ContinuumReleaseDescriptor) releaseManager.getPreparedReleases().get( releaseId );
             if ( descriptor != null )
             {
                 releaseBy = descriptor.getReleaseBy();
             }
         }
 
-        if ( result != null && getContinuumReleaseResult( projectId, releaseType, result.getStartTime(), result.getEndTime() ) == null )
+        if ( result != null && getContinuumReleaseResult( projectId, releaseType, result.getStartTime(),
+                                                          result.getEndTime() ) == null )
         {
-            ContinuumReleaseResult releaseResult = createContinuumReleaseResult( projectId, releaseType, result, releaseBy );
+            ContinuumReleaseResult releaseResult = createContinuumReleaseResult( projectId, releaseType, result,
+                                                                                 releaseBy );
             return addContinuumReleaseResult( releaseResult );
         }
 
         return null;
     }
 
-    private ContinuumReleaseResult createContinuumReleaseResult( int projectId, String releaseGoals, ReleaseResult result, String releaseBy )
+    private ContinuumReleaseResult createContinuumReleaseResult( int projectId, String releaseGoals,
+                                                                 ReleaseResult result, String releaseBy )
         throws ContinuumException
     {
         ContinuumReleaseResult releaseResult = new ContinuumReleaseResult();
         releaseResult.setStartTime( result.getStartTime() );
         releaseResult.setEndTime( result.getEndTime() );
         releaseResult.setResultCode( result.getResultCode() );
-    
+
         Project project = getProject( projectId );
         ProjectGroup projectGroup = project.getProjectGroup();
         releaseResult.setProjectGroup( projectGroup );
         releaseResult.setProject( project );
         releaseResult.setReleaseGoal( releaseGoals );
         releaseResult.setUsername( releaseBy );
-    
+
         String releaseName = "releases-" + result.getStartTime();
-    
+
         try
         {
             File logFile = getConfiguration().getReleaseOutputFile( projectGroup.getId(), releaseName );
-    
+
             PrintWriter writer = new PrintWriter( new FileWriter( logFile ) );
             writer.write( result.getOutput() );
             writer.close();
@@ -3256,7 +3277,7 @@ public class DefaultContinuum
         {
             throw new ContinuumException( "Unable to write output to file", e );
         }
-    
+
         return releaseResult;
     }
 
@@ -3550,7 +3571,7 @@ public class DefaultContinuum
     }
 
     private void prepareBuildProjects( Collection<Project> projects, List<BuildDefinition> bds,
-    		                           boolean checkDefaultBuildDefinitionForProject, BuildTrigger buildTrigger )
+                                       boolean checkDefaultBuildDefinitionForProject, BuildTrigger buildTrigger )
         throws ContinuumException, NoBuildAgentException, NoBuildAgentInGroupException
     {
         Map<ProjectScmRoot, Map<Integer, Integer>> map = new HashMap<ProjectScmRoot, Map<Integer, Integer>>();
@@ -3595,21 +3616,23 @@ public class DefaultContinuum
                 {
                     buildDefId = projectDefaultBD.getId();
                     log.debug( "Project " + project.getId() +
-                        " has own default build definition, will use it instead of group's." );
+                                   " has own default build definition, will use it instead of group's." );
                 }
             }
 
             if ( buildDefId == -1 )
             {
                 log.info( "Project " + projectId +
-                    " don't have a default build definition defined in the project or project group, will not be included in group build." );
+                              " don't have a default build definition defined in the project or project group, will not be included in group build." );
                 continue;
             }
 
             // check if project already in queue
             if ( !isProjectOkToBuild( projectId, buildDefId ) )
             {
-                log.info( "Not queueing the build with projectId={} and buildDefinitionId={} because it is already building", projectId, buildDefId );
+                log.info(
+                    "Not queueing the build with projectId={} and buildDefinitionId={} because it is already building",
+                    projectId, buildDefId );
                 continue;
             }
 
@@ -3648,7 +3671,9 @@ public class DefaultContinuum
             // check if project already in queue
             if ( !isProjectOkToBuild( projectId, buildDefinitionId ) )
             {
-                log.info( "Not queueing the build with projectId={} and buildDefinitionId={} because it is already building", projectId, buildDefinitionId );
+                log.info(
+                    "Not queueing the build with projectId={} and buildDefinitionId={} because it is already building",
+                    projectId, buildDefinitionId );
                 continue;
             }
 
@@ -3667,7 +3692,7 @@ public class DefaultContinuum
 
             if ( !sortedScmRoot.contains( scmRoot ) )
             {
-                    sortedScmRoot.add( scmRoot );
+                sortedScmRoot.add( scmRoot );
             }
         }
 
@@ -3680,13 +3705,14 @@ public class DefaultContinuum
     {
         for ( ProjectScmRoot scmRoot : scmRoots )
         {
-        	prepareBuildProjects( map.get( scmRoot ), buildTrigger, scmRoot.getScmRootAddress(),
+            prepareBuildProjects( map.get( scmRoot ), buildTrigger, scmRoot.getScmRootAddress(),
                                   scmRoot.getProjectGroup().getId(), scmRoot.getId(), scmRoots );
         }
     }
 
     private void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, BuildTrigger buildTrigger,
-                                       String scmRootAddress, int projectGroupId, int scmRootId, List<ProjectScmRoot> scmRoots )
+                                       String scmRootAddress, int projectGroupId, int scmRootId,
+                                       List<ProjectScmRoot> scmRoots )
         throws ContinuumException, NoBuildAgentException, NoBuildAgentInGroupException
     {
         ProjectGroup group = getProjectGroup( projectGroupId );
@@ -3695,12 +3721,12 @@ public class DefaultContinuum
         {
             if ( configurationService.isDistributedBuildEnabled() )
             {
-            	distributedBuildManager.prepareBuildProjects( projectsBuildDefinitionsMap, buildTrigger, projectGroupId, 
+                distributedBuildManager.prepareBuildProjects( projectsBuildDefinitionsMap, buildTrigger, projectGroupId,
                                                               group.getName(), scmRootAddress, scmRootId, scmRoots );
             }
             else
             {
-            	parallelBuildsManager.prepareBuildProjects( projectsBuildDefinitionsMap, buildTrigger, projectGroupId,
+                parallelBuildsManager.prepareBuildProjects( projectsBuildDefinitionsMap, buildTrigger, projectGroupId,
                                                             group.getName(), scmRootAddress, scmRootId );
             }
         }
@@ -3715,23 +3741,23 @@ public class DefaultContinuum
     {
         List<Project> projectsList;
 
-        projectsList =
-            getProjectsInBuildOrder( projectDao.getProjectsWithDependenciesByGroupId( projectGroup.getId() ) );
-        
+        projectsList = getProjectsInBuildOrder( projectDao.getProjectsWithDependenciesByGroupId(
+            projectGroup.getId() ) );
+
         List<ProjectScmRoot> scmRoots = getProjectScmRootByProjectGroup( projectGroup.getId() );
 
         String url = "";
 
         for ( Project project : projectsList )
         {
-        	boolean found = false;
-        	
+            boolean found = false;
+
             if ( StringUtils.isEmpty( url ) || !project.getScmUrl().startsWith( url ) )
             {
-            	// this is a root project or the project is part of a flat multi module 
+                // this is a root project or the project is part of a flat multi module
                 url = project.getScmUrl();
                 //createProjectScmRoot( projectGroup, url );
-                
+
                 for ( ProjectScmRoot scmRoot : scmRoots )
                 {
                     if ( url.startsWith( scmRoot.getScmRootAddress() ) )
@@ -3751,15 +3777,15 @@ public class DefaultContinuum
     private ProjectScmRoot createProjectScmRoot( ProjectGroup projectGroup, String url )
         throws ContinuumException
     {
-    	if ( StringUtils.isEmpty( url ) )
+        if ( StringUtils.isEmpty( url ) )
         {
             return null;
         }
-    	
+
         try
         {
-            ProjectScmRoot scmRoot =
-                projectScmRootDao.getProjectScmRootByProjectGroupAndScmRootAddress( projectGroup.getId(), url );
+            ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRootByProjectGroupAndScmRootAddress(
+                projectGroup.getId(), url );
 
             if ( scmRoot != null )
             {
@@ -3786,9 +3812,8 @@ public class DefaultContinuum
         try
         {
             removeProjectScmRoot( oldScmRoot );
-            ProjectScmRoot scmRoot =
-                projectScmRootDao.getProjectScmRootByProjectGroupAndScmRootAddress( project.getProjectGroup().getId(),
-                                                                                    project.getScmUrl() );
+            ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRootByProjectGroupAndScmRootAddress(
+                project.getProjectGroup().getId(), project.getScmUrl() );
             if ( scmRoot == null )
             {
                 ProjectScmRoot newScmRoot = new ProjectScmRoot();
@@ -3833,7 +3858,7 @@ public class DefaultContinuum
             if ( isProjectInReleaseStage( project ) )
             {
                 throw new ContinuumException( "Cannot build project group. Project (id=" + project.getId() +
-                    ") in group is currently in release stage." );
+                                                  ") in group is currently in release stage." );
             }
         }
         return false;
@@ -3902,10 +3927,10 @@ public class DefaultContinuum
     {
         if ( configurationService.isDistributedBuildEnabled() )
         {
-            if ( !distributedBuildManager.isProjectInAnyPrepareBuildQueue( projectId, buildDefinitionId ) && 
-                 !distributedBuildManager.isProjectInAnyBuildQueue( projectId, buildDefinitionId ) &&
-                 !distributedBuildManager.isProjectCurrentlyPreparingBuild( projectId, buildDefinitionId ) &&
-                 !distributedBuildManager.isProjectCurrentlyBuilding( projectId, buildDefinitionId ) )
+            if ( !distributedBuildManager.isProjectInAnyPrepareBuildQueue( projectId, buildDefinitionId ) &&
+                !distributedBuildManager.isProjectInAnyBuildQueue( projectId, buildDefinitionId ) &&
+                !distributedBuildManager.isProjectCurrentlyPreparingBuild( projectId, buildDefinitionId ) &&
+                !distributedBuildManager.isProjectCurrentlyBuilding( projectId, buildDefinitionId ) )
             {
                 return true;
             }
@@ -3915,9 +3940,9 @@ public class DefaultContinuum
             try
             {
                 if ( !parallelBuildsManager.isInAnyBuildQueue( projectId, buildDefinitionId ) &&
-                     !parallelBuildsManager.isInAnyCheckoutQueue( projectId ) &&
-                     !parallelBuildsManager.isInPrepareBuildQueue( projectId ) &&
-                     !parallelBuildsManager.isProjectCurrentlyPreparingBuild( projectId ) )
+                    !parallelBuildsManager.isInAnyCheckoutQueue( projectId ) &&
+                    !parallelBuildsManager.isInPrepareBuildQueue( projectId ) &&
+                    !parallelBuildsManager.isProjectCurrentlyPreparingBuild( projectId ) )
                 {
                     if ( parallelBuildsManager.isInAnyCheckoutQueue( projectId ) )
                     {
@@ -3935,6 +3960,7 @@ public class DefaultContinuum
 
         return false;
     }
+
     void setTaskQueueManager( TaskQueueManager taskQueueManager )
     {
         this.taskQueueManager = taskQueueManager;

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java Mon Aug 13 04:29:09 2012
@@ -19,11 +19,6 @@ package org.apache.maven.continuum.build
  * under the License.
  */
 
-import java.text.ParseException;
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.dao.DirectoryPurgeConfigurationDao;
 import org.apache.continuum.dao.DistributedDirectoryPurgeConfigurationDao;
@@ -49,6 +44,11 @@ import org.quartz.SchedulerException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.text.ParseException;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
  * @version $Id$
@@ -120,8 +120,8 @@ public class DefaultSchedulesActivator
                     }
                     catch ( ContinuumStoreException e1 )
                     {
-                        throw new SchedulesActivationException( "Can't desactivate schedule '" + schedule.getName()
-                            + "'", e );
+                        throw new SchedulesActivationException(
+                            "Can't desactivate schedule '" + schedule.getName() + "'", e );
                     }
                 }
             }
@@ -296,8 +296,9 @@ public class DefaultSchedulesActivator
             repositoryPurgeConfigurationDao.getEnableRepositoryPurgeConfigurationsBySchedule( schedule.getId() );
         List<DirectoryPurgeConfiguration> dirPurgeConfigs =
             directoryPurgeConfigurationDao.getEnableDirectoryPurgeConfigurationsBySchedule( schedule.getId() );
-        List<DistributedDirectoryPurgeConfiguration> distriDirPurgeConfigs = 
-            distributedDirectoryPurgeConfigurationDao.getEnableDistributedDirectoryPurgeConfigurationsBySchedule( schedule.getId() );
+        List<DistributedDirectoryPurgeConfiguration> distriDirPurgeConfigs =
+            distributedDirectoryPurgeConfigurationDao.getEnableDistributedDirectoryPurgeConfigurationsBySchedule(
+                schedule.getId() );
 
         return repoPurgeConfigs.size() > 0 || dirPurgeConfigs.size() > 0 || distriDirPurgeConfigs.size() > 0;
 

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildContext.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildContext.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildContext.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildContext.java Mon Aug 13 04:29:09 2012
@@ -141,12 +141,12 @@ public class BuildContext
 
     public BuildTrigger getBuildTrigger()
     {
-    	return buildTrigger;
+        return buildTrigger;
     }
 
     public void setBuildTrigger( BuildTrigger buildTrigger )
     {
-    	this.buildTrigger = buildTrigger;
+        this.buildTrigger = buildTrigger;
     }
 
     public List<ProjectDependency> getModifiedDependencies()

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java Mon Aug 13 04:29:09 2012
@@ -45,7 +45,7 @@ public class BuildProjectTaskExecutor
     {
         BuildProjectTask buildProjectTask = (BuildProjectTask) task;
 
-        controller.build( buildProjectTask.getProjectId(), buildProjectTask.getBuildDefinitionId(), buildProjectTask
-        		.getBuildTrigger(), buildProjectTask.getScmResult() );
+        controller.build( buildProjectTask.getProjectId(), buildProjectTask.getBuildDefinitionId(),
+                          buildProjectTask.getBuildTrigger(), buildProjectTask.getScmResult() );
     }
 }

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java Mon Aug 13 04:29:09 2012
@@ -19,11 +19,6 @@ package org.apache.maven.continuum.build
  * under the License.
  */
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.dao.BuildResultDao;
 import org.apache.continuum.dao.ProjectDao;
@@ -58,6 +53,11 @@ import org.codehaus.plexus.taskqueue.exe
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -346,25 +346,25 @@ public class DefaultBuildController
             context.setProject( project );
 
             BuildDefinition buildDefinition = buildDefinitionDao.getBuildDefinition( buildDefinitionId );
-            
+
             BuildTrigger newBuildTrigger = buildTrigger;
-            
+
             if ( newBuildTrigger.getTrigger() == ContinuumProjectState.TRIGGER_SCHEDULED )
             {
                 newBuildTrigger.setTriggeredBy( buildDefinition.getSchedule().getName() );
             }
-            
+
             context.setBuildTrigger( newBuildTrigger );
 
             context.setBuildDefinition( buildDefinition );
 
-            BuildResult oldBuildResult =
-                buildResultDao.getLatestBuildResultForBuildDefinition( projectId, buildDefinitionId );
+            BuildResult oldBuildResult = buildResultDao.getLatestBuildResultForBuildDefinition( projectId,
+                                                                                                buildDefinitionId );
 
             context.setOldBuildResult( oldBuildResult );
 
             context.setScmResult( scmResult );
-            
+
             // CONTINUUM-2193
             ProjectGroup projectGroup = project.getProjectGroup();
             List<ProjectScmRoot> scmRoots = projectScmRootDao.getProjectScmRootByProjectGroup( projectGroup.getId() );
@@ -381,19 +381,20 @@ public class DefaultBuildController
                 }
             }
 
-            if( project.isCheckedOutInSingleDirectory() )
+            if ( project.isCheckedOutInSingleDirectory() )
             {
-                List<Project> projectsInGroup =
-                    projectGroupDao.getProjectGroupWithProjects( projectGroup.getId() ).getProjects(); 
-                List<Project> projectsWithCommonScmRoot = new ArrayList<Project>();            
-                for( Project projectInGroup : projectsInGroup )
+                List<Project> projectsInGroup = projectGroupDao.getProjectGroupWithProjects(
+                    projectGroup.getId() ).getProjects();
+                List<Project> projectsWithCommonScmRoot = new ArrayList<Project>();
+                for ( Project projectInGroup : projectsInGroup )
                 {
-                    if( projectInGroup.getScmUrl().startsWith( projectScmRootAddress ) )
+                    if ( projectInGroup.getScmUrl().startsWith( projectScmRootAddress ) )
                     {
                         projectsWithCommonScmRoot.add( projectInGroup );
                     }
                 }
-                AbstractContinuumAction.setListOfProjectsInGroupWithCommonScmRoot( actionContext, projectsWithCommonScmRoot );
+                AbstractContinuumAction.setListOfProjectsInGroupWithCommonScmRoot( actionContext,
+                                                                                   projectsWithCommonScmRoot );
             }
 
             // CONTINUUM-1871 olamy if continuum is killed during building oldBuildResult will have a endTime 0
@@ -410,7 +411,7 @@ public class DefaultBuildController
             throw new TaskExecutionException( "Error initializing the build context", e );
         }
 
-       // Map<String, Object> actionContext = context.getActionContext();
+        // Map<String, Object> actionContext = context.getActionContext();
 
         AbstractContinuumAction.setProjectId( actionContext, projectId );
 
@@ -555,31 +556,32 @@ public class DefaultBuildController
         }
 
         // Check changes
-        if ( !shouldBuild && ( ( !allChangesUnknown && context.getScmResult() != null && !context.getScmResult().getChanges().isEmpty() ) ||
-            project.getExecutorId().equals( ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR ) ) )
+        if ( !shouldBuild && ( ( !allChangesUnknown && context.getScmResult() != null &&
+            !context.getScmResult().getChanges().isEmpty() ) || project.getExecutorId().equals(
+            ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR ) ) )
         {
             try
             {
                 ContinuumBuildExecutor executor = buildExecutorManager.getBuildExecutor( project.getExecutorId() );
-                
+
                 Map<String, Object> actionContext = context.getActionContext();
                 List<Project> projectsWithCommonScmRoot =
                     AbstractContinuumAction.getListOfProjectsInGroupWithCommonScmRoot( actionContext );
-                String projectScmRootUrl =
-                    AbstractContinuumAction.getProjectScmRootUrl( actionContext, project.getScmUrl() );
+                String projectScmRootUrl = AbstractContinuumAction.getProjectScmRootUrl( actionContext,
+                                                                                         project.getScmUrl() );
 
                 if ( executor == null )
                 {
-                    log.warn( "No continuum build executor found for project " + project.getId() + 
-                              " with executor '" + project.getExecutorId() + "'" );
+                    log.warn( "No continuum build executor found for project " + project.getId() +
+                                  " with executor '" + project.getExecutorId() + "'" );
                 }
                 else if ( context.getScmResult() != null )
                 {
-                    shouldBuild = 
-	                        executor.shouldBuild( context.getScmResult().getChanges(), project,
-	                                              workingDirectoryService.getWorkingDirectory( project, projectScmRootUrl,
-	                                                                                           projectsWithCommonScmRoot ),
-	                                              context.getBuildDefinition() );
+                    shouldBuild = executor.shouldBuild( context.getScmResult().getChanges(), project,
+                                                        workingDirectoryService.getWorkingDirectory( project,
+                                                                                                     projectScmRootUrl,
+                                                                                                     projectsWithCommonScmRoot ),
+                                                        context.getBuildDefinition() );
                 }
             }
             catch ( Exception e )
@@ -684,8 +686,8 @@ public class DefaultBuildController
 
             for ( ProjectDependency dep : dependencies )
             {
-                Project dependencyProject =
-                    projectDao.getProject( dep.getGroupId(), dep.getArtifactId(), dep.getVersion() );
+                Project dependencyProject = projectDao.getProject( dep.getGroupId(), dep.getArtifactId(),
+                                                                   dep.getVersion() );
 
                 if ( dependencyProject != null )
                 {
@@ -694,19 +696,19 @@ public class DefaultBuildController
                     if ( nbBuild > 0 )
                     {
                         log.debug( "Dependency changed: " + dep.getGroupId() + ":" + dep.getArtifactId() + ":" +
-                            dep.getVersion() );
+                                       dep.getVersion() );
                         modifiedDependencies.add( dep );
                     }
                     else
                     {
                         log.debug( "Dependency not changed: " + dep.getGroupId() + ":" + dep.getArtifactId() + ":" +
-                            dep.getVersion() );
+                                       dep.getVersion() );
                     }
                 }
                 else
                 {
                     log.debug( "Skip non Continuum project: " + dep.getGroupId() + ":" + dep.getArtifactId() + ":" +
-                        dep.getVersion() );
+                                   dep.getVersion() );
                 }
             }
 
@@ -734,7 +736,7 @@ public class DefaultBuildController
         build.setState( ContinuumProjectState.ERROR );
 
         build.setTrigger( context.getBuildTrigger().getTrigger() );
-        
+
         build.setUsername( context.getBuildTrigger().getTriggeredBy() );
 
         build.setStartTime( context.getStartTime() );

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionService.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionService.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionService.java Mon Aug 13 04:29:09 2012
@@ -18,9 +18,6 @@
  */
 package org.apache.maven.continuum.builddefinition;
 
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.continuum.buildqueue.BuildQueueServiceException;
 import org.apache.continuum.configuration.ContinuumConfigurationException;
 import org.apache.continuum.dao.BuildDefinitionDao;
@@ -42,6 +39,9 @@ import org.codehaus.plexus.personality.p
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * @author <a href="mailto:olamy@apache.org">olamy</a>
  * @version $Id$
@@ -270,8 +270,8 @@ public class DefaultBuildDefinitionServi
     public BuildDefinitionTemplate getDefaultAntBuildDefinitionTemplate()
         throws BuildDefinitionServiceException
     {
-        BuildDefinitionTemplate template =
-            getContinuumDefaultWithType( ContinuumBuildExecutorConstants.ANT_BUILD_EXECUTOR );
+        BuildDefinitionTemplate template = getContinuumDefaultWithType(
+            ContinuumBuildExecutorConstants.ANT_BUILD_EXECUTOR );
         if ( template != null )
         {
             return template;
@@ -307,8 +307,8 @@ public class DefaultBuildDefinitionServi
     public BuildDefinitionTemplate getDefaultMavenOneBuildDefinitionTemplate()
         throws BuildDefinitionServiceException
     {
-        BuildDefinitionTemplate template =
-            getContinuumDefaultWithType( ContinuumBuildExecutorConstants.MAVEN_ONE_BUILD_EXECUTOR );
+        BuildDefinitionTemplate template = getContinuumDefaultWithType(
+            ContinuumBuildExecutorConstants.MAVEN_ONE_BUILD_EXECUTOR );
         if ( template != null )
         {
             log.debug( "found default maven template " + template.getType() );
@@ -346,8 +346,8 @@ public class DefaultBuildDefinitionServi
     public BuildDefinitionTemplate getDefaultMavenTwoBuildDefinitionTemplate()
         throws BuildDefinitionServiceException
     {
-        BuildDefinitionTemplate template =
-            getContinuumDefaultWithType( ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR );
+        BuildDefinitionTemplate template = getContinuumDefaultWithType(
+            ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR );
         if ( template != null )
         {
             return template;
@@ -384,8 +384,8 @@ public class DefaultBuildDefinitionServi
     public BuildDefinitionTemplate getDefaultShellBuildDefinitionTemplate()
         throws BuildDefinitionServiceException
     {
-        BuildDefinitionTemplate template =
-            getContinuumDefaultWithType( ContinuumBuildExecutorConstants.SHELL_BUILD_EXECUTOR );
+        BuildDefinitionTemplate template = getContinuumDefaultWithType(
+            ContinuumBuildExecutorConstants.SHELL_BUILD_EXECUTOR );
         if ( template != null )
         {
             return template;
@@ -476,8 +476,8 @@ public class DefaultBuildDefinitionServi
             // first remove links to buildDefs
             // TODO in the same db transaction ?
             buildDefinitionTemplate.setBuildDefinitions( null );
-            buildDefinitionTemplate =
-                buildDefinitionTemplateDao.updateBuildDefinitionTemplate( buildDefinitionTemplate );
+            buildDefinitionTemplate = buildDefinitionTemplateDao.updateBuildDefinitionTemplate(
+                buildDefinitionTemplate );
             buildDefinitionTemplateDao.removeBuildDefinitionTemplate( buildDefinitionTemplate );
         }
         catch ( ContinuumStoreException e )
@@ -503,7 +503,7 @@ public class DefaultBuildDefinitionServi
         {
             throw new BuildDefinitionServiceException( e.getMessage(), e );
         }
-        
+
         return null;
     }
 
@@ -521,7 +521,7 @@ public class DefaultBuildDefinitionServi
         {
             throw new BuildDefinitionServiceException( e.getMessage(), e );
         }
-        
+
         return null;
     }
 
@@ -609,8 +609,8 @@ public class DefaultBuildDefinitionServi
     {
         try
         {
-            ProjectGroup projectGroup =
-                projectGroupDao.getProjectGroupWithBuildDetailsByProjectGroupId( projectGroupId );
+            ProjectGroup projectGroup = projectGroupDao.getProjectGroupWithBuildDetailsByProjectGroupId(
+                projectGroupId );
             if ( template.getBuildDefinitions().isEmpty() )
             {
                 return null;
@@ -657,13 +657,13 @@ public class DefaultBuildDefinitionServi
             throw new BuildDefinitionServiceException( e.getMessage(), e );
         }
     }
-    
+
     private boolean hasDuplicateTemplateName( BuildDefinitionTemplate buildDefinitionTemplate )
         throws BuildDefinitionServiceException
     {
         boolean isDuplicate = false;
         List<BuildDefinitionTemplate> allBuildDefinitionTemplate = this.getAllBuildDefinitionTemplate();
-    
+
         for ( BuildDefinitionTemplate template : allBuildDefinitionTemplate )
         {
             String name = buildDefinitionTemplate.getName();

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java Mon Aug 13 04:29:09 2012
@@ -19,16 +19,16 @@ package org.apache.maven.continuum.build
  * under the License.
  */
 
+import org.apache.continuum.taskqueue.BuildProjectTask;
+import org.apache.maven.continuum.project.ContinuumProjectState;
+import org.codehaus.plexus.taskqueue.TaskViabilityEvaluator;
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.continuum.taskqueue.BuildProjectTask;
-import org.apache.maven.continuum.project.ContinuumProjectState;
-import org.codehaus.plexus.taskqueue.TaskViabilityEvaluator;
-
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java Mon Aug 13 04:29:09 2012
@@ -19,8 +19,6 @@ package org.apache.maven.continuum.core.
  * under the License.
  */
 
-import java.util.List;
-
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.dao.ScheduleDao;
 import org.apache.maven.continuum.ContinuumException;
@@ -32,6 +30,8 @@ import org.apache.maven.continuum.model.
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 
+import java.util.List;
+
 /**
  * AbstractBuildDefinitionContinuumAction:
  *
@@ -59,8 +59,8 @@ public abstract class AbstractBuildDefin
             // if buildDefinition passed in is not default then we are done
             if ( buildDefinition.isDefaultForProject() )
             {
-                BuildDefinition storedDefinition =
-                    buildDefinitionDao.getDefaultBuildDefinitionForProject( project.getId() );
+                BuildDefinition storedDefinition = buildDefinitionDao.getDefaultBuildDefinitionForProject(
+                    project.getId() );
 
                 if ( storedDefinition != null )
                 {
@@ -73,7 +73,7 @@ public abstract class AbstractBuildDefin
         catch ( ContinuumObjectNotFoundException nfe )
         {
             getLogger().debug( getClass().getName() +
-                ": safely ignoring the resetting of old build definition becuase it didn't exist" );
+                                   ": safely ignoring the resetting of old build definition becuase it didn't exist" );
         }
         catch ( ContinuumStoreException cse )
         {
@@ -99,8 +99,8 @@ public abstract class AbstractBuildDefin
     {
         try
         {
-            List<BuildDefinition> storedDefinitions =
-                buildDefinitionDao.getDefaultBuildDefinitionsForProjectGroup( projectGroup.getId() );
+            List<BuildDefinition> storedDefinitions = buildDefinitionDao.getDefaultBuildDefinitionsForProjectGroup(
+                projectGroup.getId() );
 
             for ( BuildDefinition storedDefinition : storedDefinitions )
             {
@@ -109,8 +109,8 @@ public abstract class AbstractBuildDefin
                 {
                     if ( storedDefinition != null && storedDefinition.getId() != buildDefinition.getId() )
                     {
-                        if ( buildDefinition.getType() != null &&
-                            buildDefinition.getType().equals( storedDefinition.getType() ) )
+                        if ( buildDefinition.getType() != null && buildDefinition.getType().equals(
+                            storedDefinition.getType() ) )
                         {
                             //Required to get build def from store because storedDefinition is readonly
                             BuildDefinition def = buildDefinitionDao.getBuildDefinition( storedDefinition.getId() );

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java Mon Aug 13 04:29:09 2012
@@ -19,11 +19,6 @@ package org.apache.maven.continuum.core.
  * under the License.
  */
 
-import java.io.File;
-import java.util.List;
-import java.util.ArrayList;
-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;
@@ -34,6 +29,11 @@ import org.apache.maven.continuum.model.
 import org.apache.maven.continuum.model.scm.ScmResult;
 import org.codehaus.plexus.action.AbstractAction;
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -44,7 +44,7 @@ public abstract class AbstractContinuumA
     // ----------------------------------------------------------------------
     // Keys for the values that can be in the context
     // ----------------------------------------------------------------------
-    
+
     private static final String KEY_PROJECT_ID = "project-id";
 
     private static final String KEY_PROJECT = "project";
@@ -68,27 +68,27 @@ public abstract class AbstractContinuumA
     private static final String KEY_BUILD_ID = "build-id";
 
     private static final String KEY_WORKING_DIRECTORY = "working-directory";
-    
+
     private static final String KEY_UPDATE_DEPENDENCIES = "update-dependencies";
 
-    private static final String KEY_BUILD_TRIGGER = "buildTrigger"; 
-    	
+    private static final String KEY_BUILD_TRIGGER = "buildTrigger";
+
     private static final String KEY_SCM_RESULT = "scmResult";
-	
+
     private static final String KEY_OLD_SCM_RESULT = "old-scmResult";
-	
+
     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
-    */
+     * create-projects-from-metadata, update-project-from-working-directory,
+     * update-working-directory-from-scm
+     */
     private static final String KEY_PROJECT_SCM_ROOT_URL = "projectScmRootUrl";
 
     /**
      * List of projects in a project group with a common scm root url.
-    */
+     */
     private static final String KEY_PROJECTS_IN_GROUP_WITH_COMMON_SCM_ROOT = "projects-in-group-with-common-scm-root";
 
     private static final String KEY_OLD_BUILD_ID = "old-buildResult-id";
@@ -183,13 +183,13 @@ public abstract class AbstractContinuumA
 
     public static BuildTrigger getBuildTrigger( Map<String, Object> context )
     {
-    	BuildTrigger defaultValue = new BuildTrigger( 0, "" );
-    	return (BuildTrigger) getObject( context, KEY_BUILD_TRIGGER, defaultValue );
+        BuildTrigger defaultValue = new BuildTrigger( 0, "" );
+        return (BuildTrigger) getObject( context, KEY_BUILD_TRIGGER, defaultValue );
     }
 
     public static void setBuildTrigger( Map<String, Object> context, BuildTrigger buildTrigger )
     {
-    	context.put( KEY_BUILD_TRIGGER, buildTrigger );
+        context.put( KEY_BUILD_TRIGGER, buildTrigger );
     }
 
     public static Project getUnvalidatedProject( Map<String, Object> context )
@@ -221,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 );
@@ -297,12 +297,13 @@ public abstract class AbstractContinuumA
     {
         context.put( KEY_PROJECTS, projects );
     }
-    
+
     public static List<Project> getListOfProjectsInGroupWithCommonScmRoot( Map<String, Object> context )
     {
-        return (List<Project>) getObject( context, KEY_PROJECTS_IN_GROUP_WITH_COMMON_SCM_ROOT, new ArrayList<Integer>() );
+        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 );
@@ -328,7 +329,7 @@ public abstract class AbstractContinuumA
     {
         context.put( KEY_SCM_RESULT_MAP, scmResultMap );
     }
-    
+
     public static boolean isRootDirectory( Map<String, Object> context )
     {
         return getBoolean( context, KEY_ROOT_DIRECTORY, true );
@@ -338,17 +339,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/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddAssignableRolesAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddAssignableRolesAction.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddAssignableRolesAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddAssignableRolesAction.java Mon Aug 13 04:29:09 2012
@@ -19,8 +19,6 @@ package org.apache.maven.continuum.core.
  * under the License.
  */
 
-import java.util.Map;
-
 import org.apache.continuum.dao.ProjectGroupDao;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.ProjectGroup;
@@ -28,6 +26,8 @@ import org.apache.maven.continuum.store.
 import org.codehaus.plexus.redback.role.RoleManager;
 import org.codehaus.plexus.redback.role.RoleManagerException;
 
+import java.util.Map;
+
 /**
  * AddAssignableRolesAction:
  *

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java Mon Aug 13 04:29:09 2012
@@ -15,14 +15,14 @@ package org.apache.maven.continuum.core.
  * the License.
  */
 
-import java.util.List;
-import java.util.Map;
-
 import org.apache.continuum.dao.ProjectDao;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildDefinitionTemplate;
 import org.apache.maven.continuum.model.project.Project;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * AddBuildDefinitionToProjectAction:
  *

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java Mon Aug 13 04:29:09 2012
@@ -19,14 +19,14 @@ package org.apache.maven.continuum.core.
  * under the License.
  */
 
-import java.util.List;
-import java.util.Map;
-
 import org.apache.continuum.dao.ProjectGroupDao;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildDefinitionTemplate;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * AddBuildDefinitionToProjectAction:
  *

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java Mon Aug 13 04:29:09 2012
@@ -19,8 +19,6 @@ package org.apache.maven.continuum.core.
  * under the License.
  */
 
-import java.util.Map;
-
 import org.apache.commons.lang.StringUtils;
 import org.apache.continuum.buildmanager.BuildsManager;
 import org.apache.continuum.dao.ProjectDao;
@@ -28,6 +26,8 @@ import org.apache.maven.continuum.model.
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.utils.WorkingDirectoryService;
 
+import java.util.Map;
+
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -52,7 +52,7 @@ public class AddProjectToCheckOutQueueAc
      */
     private BuildsManager parallelBuildsManager;
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings( "unchecked" )
     public void execute( Map context )
         throws Exception
     {
@@ -64,23 +64,23 @@ public class AddProjectToCheckOutQueueAc
 
         String scmUsername = project.getScmUsername();
         String scmPassword = project.getScmPassword();
-        
-        if( scmUsername == null || StringUtils.isEmpty( scmUsername ) )
+
+        if ( scmUsername == null || StringUtils.isEmpty( scmUsername ) )
         {
             scmUsername = CheckoutProjectContinuumAction.getScmUsername( context, null );
         }
-        
-        if( scmPassword == null || StringUtils.isEmpty( scmPassword ) )
+
+        if ( scmPassword == null || StringUtils.isEmpty( scmPassword ) )
         {
             scmPassword = CheckoutProjectContinuumAction.getScmPassword( context, null );
         }
-        
+
         String scmRootUrl = getProjectScmRootUrl( context, null );
-        
+
         BuildDefinition defaultBuildDefinition = getBuildDefinition( context );
         parallelBuildsManager.checkoutProject( project.getId(), project.getName(),
-                                               workingDirectoryService.getWorkingDirectory( project ),
-                                               scmRootUrl, scmUsername, scmPassword, defaultBuildDefinition,
+                                               workingDirectoryService.getWorkingDirectory( project ), scmRootUrl,
+                                               scmUsername, scmPassword, defaultBuildDefinition,
                                                getListOfProjectsInGroupWithCommonScmRoot( context ) );
     }
 }

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java Mon Aug 13 04:29:09 2012
@@ -19,15 +19,15 @@ package org.apache.maven.continuum.core.
  * under the License.
  */
 
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.continuum.dao.ProjectDao;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.utils.WorkingDirectoryService;
 
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -46,7 +46,7 @@ public class CheckWorkingDirectoryAction
      * @plexus.requirement
      */
     private ProjectDao projectDao;
-    
+
     private static final String KEY_WORKING_DIRECTORY_EXISTS = "working-directory-exists";
 
     public void execute( Map context )
@@ -55,10 +55,9 @@ public class CheckWorkingDirectoryAction
         Project project = projectDao.getProject( getProjectId( context ) );
         List<Project> projectsWithCommonScmRoot = getListOfProjectsInGroupWithCommonScmRoot( context );
         String projectScmRootUrl = getProjectScmRootUrl( context, project.getScmUrl() );
-       
-        File workingDirectory =
-            workingDirectoryService.getWorkingDirectory( project, projectScmRootUrl,
-                                                         projectsWithCommonScmRoot );
+
+        File workingDirectory = workingDirectoryService.getWorkingDirectory( project, projectScmRootUrl,
+                                                                             projectsWithCommonScmRoot );
 
         if ( !workingDirectory.exists() )
         {
@@ -79,7 +78,7 @@ public class CheckWorkingDirectoryAction
 
         setWorkingDirectoryExists( context, files.length > 0 );
     }
-    
+
     public static boolean isWorkingDirectoryExists( Map<String, Object> context )
     {
         return getBoolean( context, KEY_WORKING_DIRECTORY_EXISTS, false );

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java Mon Aug 13 04:29:09 2012
@@ -19,11 +19,6 @@ package org.apache.maven.continuum.core.
  * under the License.
  */
 
-import java.io.File;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.dao.ProjectDao;
 import org.apache.continuum.scm.ContinuumScm;
@@ -42,6 +37,11 @@ import org.apache.maven.scm.manager.NoSu
 import org.apache.maven.scm.repository.ScmRepositoryException;
 import org.codehaus.plexus.util.StringUtils;
 
+import java.io.File;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -55,7 +55,7 @@ public class CheckoutProjectContinuumAct
     private static final String KEY_SCM_PASSWORD = "scmUserPassword";
 
     private static final String KEY_PROJECT_RELATIVE_PATH = "project-relative-path";
-    
+
     private static final String KEY_CHECKOUT_SCM_RESULT = "checkout-result";
 
     /**
@@ -80,7 +80,7 @@ public class CheckoutProjectContinuumAct
 
     public void execute( Map context )
         throws ContinuumStoreException
-    {   
+    {
         Project project = projectDao.getProject( getProject( context ).getId() );
 
         BuildDefinition buildDefinition = getBuildDefinition( context );
@@ -105,16 +105,17 @@ public class CheckoutProjectContinuumAct
         ScmResult result;
 
         List<Project> projectsWithCommonScmRoot = getListOfProjectsInGroupWithCommonScmRoot( context );
-        
+
         try
         {
             String scmUserName = getScmUsername( context, project.getScmUsername() );
             String scmPassword = getScmPassword( context, project.getScmPassword() );
             String scmRootUrl = getProjectScmRootUrl( context, project.getScmUrl() );
-            
-            ContinuumScmConfiguration config =
-            	createScmConfiguration( project, workingDirectory, scmUserName, scmPassword, scmRootUrl, isRootDirectory( context ) );
-                
+
+            ContinuumScmConfiguration config = createScmConfiguration( project, workingDirectory, scmUserName,
+                                                                       scmPassword, scmRootUrl, isRootDirectory(
+                context ) );
+
             String tag = config.getTag();
             getLogger().info(
                 "Checking out project: '" + project.getName() + "', id: '" + project.getId() + "' " + "to '" +
@@ -192,7 +193,7 @@ public class CheckoutProjectContinuumAct
         finally
         {
             String relativePath = getProjectRelativePath( context );
-            
+
             if ( StringUtils.isNotEmpty( relativePath ) )
             {
                 project.setRelativePath( relativePath );
@@ -213,17 +214,17 @@ public class CheckoutProjectContinuumAct
 
             // update state of sub-projects 
             // if multi-module project was checked out in a single directory, these must not be null            
-            for( Project projectWithCommonScmRoot : projectsWithCommonScmRoot )
+            for ( Project projectWithCommonScmRoot : projectsWithCommonScmRoot )
             {
                 projectWithCommonScmRoot = projectDao.getProject( projectWithCommonScmRoot.getId() );
-                if( projectWithCommonScmRoot != null && projectWithCommonScmRoot.getId() != project.getId() &&
-                                projectWithCommonScmRoot.getState() == ContinuumProjectState.NEW )
+                if ( projectWithCommonScmRoot != null && projectWithCommonScmRoot.getId() != project.getId() &&
+                    projectWithCommonScmRoot.getState() == ContinuumProjectState.NEW )
                 {
                     projectWithCommonScmRoot.setState( ContinuumProjectState.CHECKEDOUT );
-                   projectDao.updateProject( projectWithCommonScmRoot );                    
+                    projectDao.updateProject( projectWithCommonScmRoot );
                 }
             }
-            
+
             notifier.checkoutComplete( project, buildDefinition );
         }
 
@@ -232,12 +233,13 @@ public class CheckoutProjectContinuumAct
     }
 
     private ContinuumScmConfiguration createScmConfiguration( Project project, File workingDirectory,
-    													String scmUserName, String scmPassword, String scmRootUrl,
-    		                                                              boolean isRootDirectory )
+                                                              String scmUserName, String scmPassword, String scmRootUrl,
+                                                              boolean isRootDirectory )
     {
         ContinuumScmConfiguration config = new ContinuumScmConfiguration();
-        
-        if( project.isCheckedOutInSingleDirectory() && scmRootUrl!= null && !"".equals( scmRootUrl ) && isRootDirectory )
+
+        if ( project.isCheckedOutInSingleDirectory() && scmRootUrl != null && !"".equals( scmRootUrl ) &&
+            isRootDirectory )
         {
             config.setUrl( scmRootUrl );
         }
@@ -332,17 +334,17 @@ public class CheckoutProjectContinuumAct
     {
         context.put( KEY_SCM_PASSWORD, scmPassword );
     }
-    
+
     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 );

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java Mon Aug 13 04:29:09 2012
@@ -52,12 +52,11 @@ public class CleanWorkingDirectoryAction
         throws Exception
     {
         Project project = projectDao.getProject( getProjectId( context ) );
-        List<Project> projectsWithCommonScmRoot = getListOfProjectsInGroupWithCommonScmRoot( context );        
+        List<Project> projectsWithCommonScmRoot = getListOfProjectsInGroupWithCommonScmRoot( context );
         String projectScmRootUrl = getProjectScmRootUrl( context, project.getScmUrl() );
 
-        File workingDirectory =
-        	            workingDirectoryService.getWorkingDirectory( project, projectScmRootUrl,
-        	                                                         projectsWithCommonScmRoot );
+        File workingDirectory = workingDirectoryService.getWorkingDirectory( project, projectScmRootUrl,
+                                                                             projectsWithCommonScmRoot );
 
         if ( workingDirectory.exists() )
         {

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java Mon Aug 13 04:29:09 2012
@@ -19,10 +19,6 @@ package org.apache.maven.continuum.core.
  * under the License.
  */
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.continuum.buildmanager.BuildsManager;
 import org.apache.continuum.dao.ProjectDao;
 import org.apache.continuum.utils.build.BuildTrigger;
@@ -34,6 +30,10 @@ import org.apache.maven.continuum.model.
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
 /**
  * @author <a href="mailto:ctan@apache.org">Maria Catherine Tan</a>
  * @version $Id$



Mime
View raw message