continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1372260 [16/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/test/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutorTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutorTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutorTest.java Mon Aug 13 04:29:09 2012
@@ -19,12 +19,6 @@ package org.apache.maven.continuum.scm.q
  * under the License.
  */
 
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.continuum.buildmanager.BuildsManager;
 import org.apache.continuum.buildmanager.ParallelBuildsManager;
 import org.apache.continuum.dao.ProjectScmRootDao;
@@ -45,6 +39,12 @@ import org.apache.maven.continuum.projec
 import org.codehaus.plexus.action.ActionManager;
 import org.codehaus.plexus.util.StringUtils;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 public class PrepareBuildProjectsTaskExecutorTest
     extends AbstractContinuumTest
 {
@@ -64,14 +64,14 @@ public class PrepareBuildProjectsTaskExe
     {
         super.setUp();
 
-        projectBuilder =
-            (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
+        projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
+                                                           MavenTwoContinuumProjectBuilder.ID );
 
         projectScmRootDao = (ProjectScmRootDao) lookup( ProjectScmRootDao.class.getName() );
 
         actionManager = (ActionManager) lookup( ActionManager.ROLE );
 
-        configurationService =  (ConfigurationService ) lookup( "configurationService" );
+        configurationService = (ConfigurationService) lookup( "configurationService" );
 
         buildsManager = (ParallelBuildsManager) lookup( BuildsManager.class, "parallel" );
     }
@@ -90,8 +90,9 @@ public class PrepareBuildProjectsTaskExe
         Project moduleB = getProjectDao().getProjectByName( "module-B" );
         Project moduleD = getProjectDao().getProjectByName( "module-D" );
 
-        buildsManager.prepareBuildProjects( task.getProjectsBuildDefinitionsMap(), task.getBuildTrigger(), task.getProjectGroupId(),
-                                            task.getProjectGroupName(), task.getScmRootAddress(), task.getProjectScmRootId() );
+        buildsManager.prepareBuildProjects( task.getProjectsBuildDefinitionsMap(), task.getBuildTrigger(),
+                                            task.getProjectGroupId(), task.getProjectGroupName(),
+                                            task.getScmRootAddress(), task.getProjectScmRootId() );
 
         // wait while task finishes prepare build
         waitForPrepareBuildToFinish( task.getProjectGroupId(), task.getProjectScmRootId() );
@@ -101,21 +102,30 @@ public class PrepareBuildProjectsTaskExe
 
         File workingDir = configurationService.getWorkingDirectory();
 
-        assertTrue( "checkout directory of project 'multi-module-parent' does not exist.", new File( workingDir, Integer.toString( rootProject.getId() ) ).exists() );
+        assertTrue( "checkout directory of project 'multi-module-parent' does not exist.", new File( workingDir,
+                                                                                                     Integer.toString(
+                                                                                                         rootProject.getId() ) ).exists() );
 
-        assertTrue( "checkout directory of project 'module-A' does not exist.", new File( workingDir, Integer.toString( moduleA.getId() ) ).exists() );
+        assertTrue( "checkout directory of project 'module-A' does not exist.", new File( workingDir, Integer.toString(
+            moduleA.getId() ) ).exists() );
 
-        assertTrue( "checkout directory of project 'module-B' does not exist.", new File( workingDir, Integer.toString( moduleB.getId() ) ).exists() );
+        assertTrue( "checkout directory of project 'module-B' does not exist.", new File( workingDir, Integer.toString(
+            moduleB.getId() ) ).exists() );
 
-        assertTrue( "checkout directory of project 'module-D' does not exist.", new File( workingDir, Integer.toString( moduleD.getId() ) ).exists() );
- 
-        assertTrue( "failed to checkout project 'multi-module-parent'", new File( workingDir, Integer.toString( rootProject.getId() ) ).list().length > 0 );
+        assertTrue( "checkout directory of project 'module-D' does not exist.", new File( workingDir, Integer.toString(
+            moduleD.getId() ) ).exists() );
 
-        assertTrue( "failed to checkout project 'module-A'", new File( workingDir, Integer.toString( moduleA.getId() ) ).list().length > 0 );
+        assertTrue( "failed to checkout project 'multi-module-parent'", new File( workingDir, Integer.toString(
+            rootProject.getId() ) ).list().length > 0 );
 
-        assertTrue( "failed to checkout project 'module-B'", new File( workingDir, Integer.toString( moduleB.getId() ) ).list().length > 0 );
+        assertTrue( "failed to checkout project 'module-A'", new File( workingDir, Integer.toString(
+            moduleA.getId() ) ).list().length > 0 );
 
-        assertTrue( "failed to checkout project 'module-D'", new File( workingDir, Integer.toString( moduleD.getId() ) ).list().length > 0 );
+        assertTrue( "failed to checkout project 'module-B'", new File( workingDir, Integer.toString(
+            moduleB.getId() ) ).list().length > 0 );
+
+        assertTrue( "failed to checkout project 'module-D'", new File( workingDir, Integer.toString(
+            moduleD.getId() ) ).list().length > 0 );
 
         // wait while task finished build
         waitForBuildToFinish();
@@ -126,7 +136,6 @@ public class PrepareBuildProjectsTaskExe
     {
         PrepareBuildProjectsTask task = createTask( "src/test-projects/multi-module/pom.xml", false, true );
 
-
         List<Project> projects = getProjectDao().getProjectsInGroup( task.getProjectGroupId() );
 
         assertEquals( "failed to add all projects", 4, projects.size() );
@@ -136,8 +145,9 @@ public class PrepareBuildProjectsTaskExe
         Project moduleB = getProjectDao().getProjectByName( "module-B" );
         Project moduleD = getProjectDao().getProjectByName( "module-D" );
 
-        buildsManager.prepareBuildProjects( task.getProjectsBuildDefinitionsMap(), task.getBuildTrigger(), task.getProjectGroupId(),
-                                            task.getProjectGroupName(), task.getScmRootAddress(), task.getProjectScmRootId() );
+        buildsManager.prepareBuildProjects( task.getProjectsBuildDefinitionsMap(), task.getBuildTrigger(),
+                                            task.getProjectGroupId(), task.getProjectGroupName(),
+                                            task.getScmRootAddress(), task.getProjectScmRootId() );
 
         // wait while task finishes prepare build
         waitForPrepareBuildToFinish( task.getProjectGroupId(), task.getProjectScmRootId() );
@@ -147,22 +157,31 @@ public class PrepareBuildProjectsTaskExe
 
         File workingDir = configurationService.getWorkingDirectory();
 
-        assertTrue( "checkout directory of project 'multi-module-parent' does not exist.", new File( workingDir, Integer.toString( rootProject.getId() ) ).exists() );
+        assertTrue( "checkout directory of project 'multi-module-parent' does not exist.", new File( workingDir,
+                                                                                                     Integer.toString(
+                                                                                                         rootProject.getId() ) ).exists() );
+
+        assertTrue( "checkout directory of project 'module-A' does not exist.", new File( workingDir, Integer.toString(
+            moduleA.getId() ) ).exists() );
 
-        assertTrue( "checkout directory of project 'module-A' does not exist.", new File( workingDir, Integer.toString( moduleA.getId() ) ).exists() );
+        assertTrue( "checkout directory of project 'module-B' does not exist.", new File( workingDir, Integer.toString(
+            moduleB.getId() ) ).exists() );
 
-        assertTrue( "checkout directory of project 'module-B' does not exist.", new File( workingDir, Integer.toString( moduleB.getId() ) ).exists() );
-        
-        assertTrue( "checkout directory of project 'module-D' does not exist.", new File( workingDir, Integer.toString( moduleD.getId() ) ).exists() );
- 
-        assertTrue( "failed to checkout project 'multi-module-parent'", new File( workingDir, Integer.toString( rootProject.getId() ) ).list().length > 0 );
+        assertTrue( "checkout directory of project 'module-D' does not exist.", new File( workingDir, Integer.toString(
+            moduleD.getId() ) ).exists() );
 
-        assertTrue( "failed to checkout project 'module-A'", new File( workingDir, Integer.toString( moduleA.getId() ) ).list().length > 0 );
+        assertTrue( "failed to checkout project 'multi-module-parent'", new File( workingDir, Integer.toString(
+            rootProject.getId() ) ).list().length > 0 );
 
-        assertTrue( "failed to checkout project 'module-B'", new File( workingDir, Integer.toString( moduleB.getId() ) ).list().length > 0 );
+        assertTrue( "failed to checkout project 'module-A'", new File( workingDir, Integer.toString(
+            moduleA.getId() ) ).list().length > 0 );
+
+        assertTrue( "failed to checkout project 'module-B'", new File( workingDir, Integer.toString(
+            moduleB.getId() ) ).list().length > 0 );
+
+        assertTrue( "failed to checkout project 'module-D'", new File( workingDir, Integer.toString(
+            moduleD.getId() ) ).list().length > 0 );
 
-        assertTrue( "failed to checkout project 'module-D'", new File( workingDir, Integer.toString( moduleD.getId() ) ).list().length > 0 );
- 
         // wait while task finished build
         waitForBuildToFinish();
     }
@@ -178,8 +197,9 @@ public class PrepareBuildProjectsTaskExe
 
         Project rootProject = getProjectDao().getProjectByName( "multi-module-parent" );
 
-        buildsManager.prepareBuildProjects( task.getProjectsBuildDefinitionsMap(), task.getBuildTrigger(), task.getProjectGroupId(),
-                                            task.getProjectGroupName(), task.getScmRootAddress(), task.getProjectScmRootId() );
+        buildsManager.prepareBuildProjects( task.getProjectsBuildDefinitionsMap(), task.getBuildTrigger(),
+                                            task.getProjectGroupId(), task.getProjectGroupName(),
+                                            task.getScmRootAddress(), task.getProjectScmRootId() );
 
         // wait while task finishes prepare build
         waitForPrepareBuildToFinish( task.getProjectGroupId(), task.getProjectScmRootId() );
@@ -187,23 +207,28 @@ public class PrepareBuildProjectsTaskExe
         ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRoot( task.getProjectScmRootId() );
         assertEquals( "Failed to update multi-module project", ContinuumProjectState.UPDATED, scmRoot.getState() );
 
-        File checkedOutDir = new File( configurationService.getWorkingDirectory(), Integer.toString( rootProject.getId() ) );
+        File checkedOutDir = new File( configurationService.getWorkingDirectory(), Integer.toString(
+            rootProject.getId() ) );
 
         assertTrue( "checkout directory of project 'multi-module-parent' does not exist.", checkedOutDir.exists() );
 
-        assertTrue( "module-A was not checked out in the same directory as it's parent.", new File( checkedOutDir, "module-A" ).exists() );
+        assertTrue( "module-A was not checked out in the same directory as it's parent.", new File( checkedOutDir,
+                                                                                                    "module-A" ).exists() );
+
+        assertTrue( "module-B was not checked out in the same directory as it's parent.", new File( checkedOutDir,
+                                                                                                    "module-B" ).exists() );
 
-        assertTrue( "module-B was not checked out in the same directory as it's parent.", new File( checkedOutDir, "module-B" ).exists() );
-       
-        assertTrue( "module-D was not checked out in the same directory as it's parent.", new File( checkedOutDir, "module-C/module-D" ).exists() );
+        assertTrue( "module-D was not checked out in the same directory as it's parent.", new File( checkedOutDir,
+                                                                                                    "module-C/module-D" ).exists() );
 
         assertTrue( "failed to checkout project 'multi-module-parent'", checkedOutDir.list().length > 0 );
-   
-            assertTrue( "failed to checkout project 'module-A'", new File( checkedOutDir, "module-A" ).list().length > 0 );
+
+        assertTrue( "failed to checkout project 'module-A'", new File( checkedOutDir, "module-A" ).list().length > 0 );
 
         assertTrue( "failed to checkout project 'module-B'", new File( checkedOutDir, "module-B" ).list().length > 0 );
 
-        assertTrue( "failed to checkout project 'module-D'", new File( checkedOutDir, "module-C/module-D" ).list().length > 0 );
+        assertTrue( "failed to checkout project 'module-D'", new File( checkedOutDir,
+                                                                       "module-C/module-D" ).list().length > 0 );
 
         // wait while task finishes build
         waitForBuildToFinish();
@@ -220,8 +245,9 @@ public class PrepareBuildProjectsTaskExe
 
         Project rootProject = getProjectDao().getProjectByName( "multi-module-parent" );
 
-        buildsManager.prepareBuildProjects( task.getProjectsBuildDefinitionsMap(), task.getBuildTrigger(), task.getProjectGroupId(),
-                                            task.getProjectGroupName(), task.getScmRootAddress(), task.getProjectScmRootId() );
+        buildsManager.prepareBuildProjects( task.getProjectsBuildDefinitionsMap(), task.getBuildTrigger(),
+                                            task.getProjectGroupId(), task.getProjectGroupName(),
+                                            task.getScmRootAddress(), task.getProjectScmRootId() );
 
         // wait while task finishes prepare build
         waitForPrepareBuildToFinish( task.getProjectGroupId(), task.getProjectScmRootId() );
@@ -229,15 +255,19 @@ public class PrepareBuildProjectsTaskExe
         ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRoot( task.getProjectScmRootId() );
         assertEquals( "Failed to update multi-module project", ContinuumProjectState.UPDATED, scmRoot.getState() );
 
-        File checkedOutDir = new File( configurationService.getWorkingDirectory(), Integer.toString( rootProject.getId() ) );
+        File checkedOutDir = new File( configurationService.getWorkingDirectory(), Integer.toString(
+            rootProject.getId() ) );
 
         assertTrue( "checkout directory of project 'multi-module-parent' does not exist.", checkedOutDir.exists() );
 
-        assertTrue( "module-A was not checked out in the same directory as it's parent.", new File( checkedOutDir, "module-A" ).exists() );
+        assertTrue( "module-A was not checked out in the same directory as it's parent.", new File( checkedOutDir,
+                                                                                                    "module-A" ).exists() );
+
+        assertTrue( "module-B was not checked out in the same directory as it's parent.", new File( checkedOutDir,
+                                                                                                    "module-B" ).exists() );
 
-        assertTrue( "module-B was not checked out in the same directory as it's parent.", new File( checkedOutDir, "module-B" ).exists() );
-        
-        assertTrue( "module-D was not checked out in the same directory as it's parent.", new File( checkedOutDir, "module-C/module-D" ).exists() );
+        assertTrue( "module-D was not checked out in the same directory as it's parent.", new File( checkedOutDir,
+                                                                                                    "module-C/module-D" ).exists() );
 
         assertTrue( "failed to checkout project 'multi-module-parent'", checkedOutDir.list().length > 0 );
 
@@ -245,7 +275,8 @@ public class PrepareBuildProjectsTaskExe
 
         assertTrue( "failed to checkout project 'module-B'", new File( checkedOutDir, "module-B" ).list().length > 0 );
 
-        assertTrue( "failed to checkout project 'module-D'", new File( checkedOutDir, "module-C/module-D" ).list().length > 0 );
+        assertTrue( "failed to checkout project 'module-D'", new File( checkedOutDir,
+                                                                       "module-C/module-D" ).list().length > 0 );
 
         // wait while task finishes build
         waitForBuildToFinish();
@@ -254,16 +285,18 @@ public class PrepareBuildProjectsTaskExe
     public void testCheckoutPrepareBuildSingleCheckoutFlatMultiModuleProject()
         throws Exception
     {
-        PrepareBuildProjectsTask task = createTask( "src/test-projects/flat-multi-module/parent-project/pom.xml", true, false );
+        PrepareBuildProjectsTask task = createTask( "src/test-projects/flat-multi-module/parent-project/pom.xml", true,
+                                                    false );
 
         List<Project> projects = getProjectDao().getProjectsInGroup( task.getProjectGroupId() );
 
         assertEquals( "failed to add all projects", 4, projects.size() );
-        
+
         Project rootProject = getProjectDao().getProjectByName( "parent-project" );
 
-        buildsManager.prepareBuildProjects( task.getProjectsBuildDefinitionsMap(), task.getBuildTrigger(), task.getProjectGroupId(),
-                                            task.getProjectGroupName(), task.getScmRootAddress(), task.getProjectScmRootId() );
+        buildsManager.prepareBuildProjects( task.getProjectsBuildDefinitionsMap(), task.getBuildTrigger(),
+                                            task.getProjectGroupId(), task.getProjectGroupName(),
+                                            task.getScmRootAddress(), task.getProjectScmRootId() );
 
         // wait while task finishes prepare build
         waitForPrepareBuildToFinish( task.getProjectGroupId(), task.getProjectScmRootId() );
@@ -271,22 +304,28 @@ public class PrepareBuildProjectsTaskExe
         ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRoot( task.getProjectScmRootId() );
         assertEquals( "Failed to update multi-module project", ContinuumProjectState.UPDATED, scmRoot.getState() );
 
-        File checkedOutDir = new File( configurationService.getWorkingDirectory(), Integer.toString( rootProject.getId() ) );
+        File checkedOutDir = new File( configurationService.getWorkingDirectory(), Integer.toString(
+            rootProject.getId() ) );
 
-        assertTrue( "checkout directory of project 'parent-project' does not exist.", new File( checkedOutDir, "parent-project" ).exists() );
+        assertTrue( "checkout directory of project 'parent-project' does not exist.", new File( checkedOutDir,
+                                                                                                "parent-project" ).exists() );
 
-        assertTrue( "module-a was not checked out in the same directory as it's parent.", new File( checkedOutDir, "module-a" ).exists() );
+        assertTrue( "module-a was not checked out in the same directory as it's parent.", new File( checkedOutDir,
+                                                                                                    "module-a" ).exists() );
 
-        assertTrue( "module-b was not checked out in the same directory as it's parent.", new File( checkedOutDir, "module-b" ).exists() );
+        assertTrue( "module-b was not checked out in the same directory as it's parent.", new File( checkedOutDir,
+                                                                                                    "module-b" ).exists() );
 
-        assertTrue( "module-d was not checked out in the same directory as it's parent.", new File( checkedOutDir, "module-c/module-d" ).exists() );
+        assertTrue( "module-d was not checked out in the same directory as it's parent.", new File( checkedOutDir,
+                                                                                                    "module-c/module-d" ).exists() );
 
-        assertTrue( "failed to checkout parent-project", new File( checkedOutDir, "parent-project" ).list().length > 0 );
+        assertTrue( "failed to checkout parent-project", new File( checkedOutDir, "parent-project" ).list().length >
+            0 );
 
         assertTrue( "failed to checkout module-a", new File( checkedOutDir, "module-a" ).list().length > 0 );
-        
+
         assertTrue( "failed to checkout module-b", new File( checkedOutDir, "module-b" ).list().length > 0 );
-        
+
         assertTrue( "failed to checkout module-d", new File( checkedOutDir, "module-c/module-d" ).list().length > 0 );
 
         // wait while task finishes build
@@ -296,7 +335,8 @@ public class PrepareBuildProjectsTaskExe
     public void testCheckoutPrepareBuildSingleCheckoutFlatMultiModuleProjectBuildFresh()
         throws Exception
     {
-        PrepareBuildProjectsTask task = createTask( "src/test-projects/flat-multi-module/parent-project/pom.xml", true, true );
+        PrepareBuildProjectsTask task = createTask( "src/test-projects/flat-multi-module/parent-project/pom.xml", true,
+                                                    true );
 
         List<Project> projects = getProjectDao().getProjectsInGroup( task.getProjectGroupId() );
 
@@ -304,8 +344,9 @@ public class PrepareBuildProjectsTaskExe
 
         Project rootProject = getProjectDao().getProjectByName( "parent-project" );
 
-        buildsManager.prepareBuildProjects( task.getProjectsBuildDefinitionsMap(), task.getBuildTrigger(), task.getProjectGroupId(),
-                                            task.getProjectGroupName(), task.getScmRootAddress(), task.getProjectScmRootId() );
+        buildsManager.prepareBuildProjects( task.getProjectsBuildDefinitionsMap(), task.getBuildTrigger(),
+                                            task.getProjectGroupId(), task.getProjectGroupName(),
+                                            task.getScmRootAddress(), task.getProjectScmRootId() );
 
         // wait while task finishes prepare build
         waitForPrepareBuildToFinish( task.getProjectGroupId(), task.getProjectScmRootId() );
@@ -313,22 +354,28 @@ public class PrepareBuildProjectsTaskExe
         ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRoot( task.getProjectScmRootId() );
         assertEquals( "Failed to update multi-module project", ContinuumProjectState.UPDATED, scmRoot.getState() );
 
-        File checkedOutDir = new File( configurationService.getWorkingDirectory(), Integer.toString( rootProject.getId() ) );
+        File checkedOutDir = new File( configurationService.getWorkingDirectory(), Integer.toString(
+            rootProject.getId() ) );
 
-        assertTrue( "checkout directory of project 'parent-project' does not exist.", new File( checkedOutDir, "parent-project" ).exists() );
+        assertTrue( "checkout directory of project 'parent-project' does not exist.", new File( checkedOutDir,
+                                                                                                "parent-project" ).exists() );
 
-        assertTrue( "module-a was not checked out in the same directory as it's parent.", new File( checkedOutDir, "module-a" ).exists() );
+        assertTrue( "module-a was not checked out in the same directory as it's parent.", new File( checkedOutDir,
+                                                                                                    "module-a" ).exists() );
 
-        assertTrue( "module-b was not checked out in the same directory as it's parent.", new File( checkedOutDir, "module-b" ).exists() );
+        assertTrue( "module-b was not checked out in the same directory as it's parent.", new File( checkedOutDir,
+                                                                                                    "module-b" ).exists() );
 
-        assertTrue( "module-d was not checked out in the same directory as it's parent.", new File( checkedOutDir, "module-c/module-d" ).exists() );
+        assertTrue( "module-d was not checked out in the same directory as it's parent.", new File( checkedOutDir,
+                                                                                                    "module-c/module-d" ).exists() );
 
-        assertTrue( "failed to checkout parent-project", new File( checkedOutDir, "parent-project" ).list().length > 0 );
+        assertTrue( "failed to checkout parent-project", new File( checkedOutDir, "parent-project" ).list().length >
+            0 );
 
         assertTrue( "failed to checkout module-a", new File( checkedOutDir, "module-a" ).list().length > 0 );
-        
+
         assertTrue( "failed to checkout module-b", new File( checkedOutDir, "module-b" ).list().length > 0 );
-       
+
         assertTrue( "failed to checkout module-d", new File( checkedOutDir, "module-c/module-d" ).list().length > 0 );
 
         // wait while task finishes build
@@ -338,46 +385,55 @@ public class PrepareBuildProjectsTaskExe
     public void testCheckoutPrepareBuildSingleCheckoutFlatMultiModuleProjectBuildFreshAfterRemovingWorkingCopy()
         throws Exception
     {
-        PrepareBuildProjectsTask task = createTask( "src/test-projects/flat-multi-module/parent-project/pom.xml", true, true );
+        PrepareBuildProjectsTask task = createTask( "src/test-projects/flat-multi-module/parent-project/pom.xml", true,
+                                                    true );
 
         List<Project> projects = getProjectDao().getProjectsInGroup( task.getProjectGroupId() );
-     
+
         assertEquals( "failed to add all projects", 4, projects.size() );
-    
+
         Project rootProject = getProjectDao().getProjectByName( "parent-project" );
-    
-        File rootProjectDir = new File( configurationService.getWorkingDirectory(), Integer.toString( rootProject.getId() ) );
+
+        File rootProjectDir = new File( configurationService.getWorkingDirectory(), Integer.toString(
+            rootProject.getId() ) );
         rootProjectDir = new File( rootProjectDir, "parent-project" );
-    
+
         rootProject.setWorkingDirectory( rootProjectDir.getAbsolutePath() );
-    
+
         getProjectDao().updateProject( rootProject );
-   
-        buildsManager.prepareBuildProjects( task.getProjectsBuildDefinitionsMap(), task.getBuildTrigger(), task.getProjectGroupId(),
-                                            task.getProjectGroupName(), task.getScmRootAddress(), task.getProjectScmRootId() );
+
+        buildsManager.prepareBuildProjects( task.getProjectsBuildDefinitionsMap(), task.getBuildTrigger(),
+                                            task.getProjectGroupId(), task.getProjectGroupName(),
+                                            task.getScmRootAddress(), task.getProjectScmRootId() );
 
         // wait while task finishes prepare build
         waitForPrepareBuildToFinish( task.getProjectGroupId(), task.getProjectScmRootId() );
 
         ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRoot( task.getProjectScmRootId() );
         assertEquals( "Failed to update multi-module project", ContinuumProjectState.UPDATED, scmRoot.getState() );
-    
-        File checkedOutDir = new File( configurationService.getWorkingDirectory(), Integer.toString( rootProject.getId() ) );
-    
-        assertTrue( "checkout directory of project 'parent-project' does not exist.", new File( checkedOutDir, "parent-project" ).exists() );
-    
-        assertTrue( "module-a was not checked out in the same directory as it's parent.", new File( checkedOutDir, "module-a" ).exists() );
-    
-        assertTrue( "module-b was not checked out in the same directory as it's parent.", new File( checkedOutDir, "module-b" ).exists() );
 
-        assertTrue( "module-d was not checked out in the same directory as it's parent.", new File( checkedOutDir, "module-c/module-d" ).exists() );
+        File checkedOutDir = new File( configurationService.getWorkingDirectory(), Integer.toString(
+            rootProject.getId() ) );
+
+        assertTrue( "checkout directory of project 'parent-project' does not exist.", new File( checkedOutDir,
+                                                                                                "parent-project" ).exists() );
+
+        assertTrue( "module-a was not checked out in the same directory as it's parent.", new File( checkedOutDir,
+                                                                                                    "module-a" ).exists() );
 
-        assertTrue( "failed to checkout parent-project", new File( checkedOutDir, "parent-project" ).list().length > 0 );
+        assertTrue( "module-b was not checked out in the same directory as it's parent.", new File( checkedOutDir,
+                                                                                                    "module-b" ).exists() );
+
+        assertTrue( "module-d was not checked out in the same directory as it's parent.", new File( checkedOutDir,
+                                                                                                    "module-c/module-d" ).exists() );
+
+        assertTrue( "failed to checkout parent-project", new File( checkedOutDir, "parent-project" ).list().length >
+            0 );
 
         assertTrue( "failed to checkout module-a", new File( checkedOutDir, "module-a" ).list().length > 0 );
-        
+
         assertTrue( "failed to checkout module-b", new File( checkedOutDir, "module-b" ).list().length > 0 );
-        
+
         assertTrue( "failed to checkout module-d", new File( checkedOutDir, "module-c/module-d" ).list().length > 0 );
 
         // wait while task finishes build
@@ -393,12 +449,13 @@ public class PrepareBuildProjectsTaskExe
         buildDefinition.setId( 0 );
         buildDefinition.setGoals( "clean" );
         buildDefinition.setBuildFresh( buildFresh );
-        
+
         projectGroup.addBuildDefinition( buildDefinition );
 
         Map<String, Object> pgContext = new HashMap<String, Object>();
 
-        AbstractContinuumAction.setWorkingDirectory( pgContext, configurationService.getWorkingDirectory().getAbsolutePath() );
+        AbstractContinuumAction.setWorkingDirectory( pgContext,
+                                                     configurationService.getWorkingDirectory().getAbsolutePath() );
 
         AbstractContinuumAction.setUnvalidatedProjectGroup( pgContext, projectGroup );
 
@@ -429,7 +486,7 @@ public class PrepareBuildProjectsTaskExe
         for ( Project project : projects )
         {
             assertFalse( project.getId() == 0 );
-            
+
             map.put( project.getId(), buildDefinition.getId() );
 
             if ( rootProject == null || rootProject.getId() > project.getId() )
@@ -439,9 +496,11 @@ public class PrepareBuildProjectsTaskExe
         }
 
         assertEquals( 4, map.size() );
-        PrepareBuildProjectsTask task = new PrepareBuildProjectsTask( map, new org.apache.continuum.utils.build.BuildTrigger( 1, "user" ),
-                                                                               projectGroupId, projectGroup.getName(), 
-                                                                               scmRoot.getScmRootAddress(), scmRoot.getId() );
+        PrepareBuildProjectsTask task = new PrepareBuildProjectsTask( map,
+                                                                      new org.apache.continuum.utils.build.BuildTrigger(
+                                                                          1, "user" ), projectGroupId,
+                                                                      projectGroup.getName(),
+                                                                      scmRoot.getScmRootAddress(), scmRoot.getId() );
 
         return task;
     }
@@ -450,21 +509,22 @@ public class PrepareBuildProjectsTaskExe
         throws ContinuumProjectBuilderException, IOException
     {
         File pom = getTestFile( pomResource );
-    
+
         assertNotNull( "Can't find project " + pomResource, pom );
 
         //ContinuumProjectBuildingResult result = projectBuilder.buildProjectsFromMetadata( pom.toURL(), null, null, true );
-        ContinuumProjectBuildingResult result = projectBuilder.buildProjectsFromMetadata( pom.toURL(), null, null, true, singleCheckout );
+        ContinuumProjectBuildingResult result = projectBuilder.buildProjectsFromMetadata( pom.toURL(), null, null, true,
+                                                                                          singleCheckout );
 
         // some assertions to make sure our expectations match. This is NOT
         // meant as a unit test for the projectbuilder!
-    
+
         assertNotNull( "Project list not null", result.getProjects() );
-    
+
         assertEquals( "#Projectgroups", 1, result.getProjectGroups().size() );
-    
+
         ProjectGroup pg = result.getProjectGroups().get( 0 );
-    
+
         if ( !result.getProjects().isEmpty() )
         {
             for ( Project p : result.getProjects() )
@@ -476,7 +536,7 @@ public class PrepareBuildProjectsTaskExe
         return pg;
     }
 
-    private ProjectScmRoot getProjectScmRoot ( ProjectGroup pg, String url )
+    private ProjectScmRoot getProjectScmRoot( ProjectGroup pg, String url )
         throws Exception
     {
         if ( StringUtils.isEmpty( url ) )
@@ -484,8 +544,7 @@ public class PrepareBuildProjectsTaskExe
             return null;
         }
 
-        ProjectScmRoot scmRoot =
-            projectScmRootDao.getProjectScmRootByProjectGroupAndScmRootAddress( pg.getId(), url );
+        ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRootByProjectGroupAndScmRootAddress( pg.getId(), url );
 
         if ( scmRoot != null )
         {
@@ -533,8 +592,8 @@ public class PrepareBuildProjectsTaskExe
     private void waitForPrepareBuildToFinish( int projectGroupId, int scmRootId )
         throws Exception
     {
-        while( buildsManager.isInPrepareBuildQueue( projectGroupId, scmRootId ) || 
-               buildsManager.isProjectGroupCurrentlyPreparingBuild( projectGroupId, scmRootId ) )
+        while ( buildsManager.isInPrepareBuildQueue( projectGroupId, scmRootId ) ||
+            buildsManager.isProjectGroupCurrentlyPreparingBuild( projectGroupId, scmRootId ) )
         {
             Thread.sleep( 10 );
         }
@@ -543,7 +602,7 @@ public class PrepareBuildProjectsTaskExe
     private void waitForBuildToFinish()
         throws Exception
     {
-        while( buildsManager.isBuildInProgress() || isAnyProjectInBuildQueue() )
+        while ( buildsManager.isBuildInProgress() || isAnyProjectInBuildQueue() )
         {
             Thread.sleep( 10 );
         }

Modified: continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml (original)
+++ continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml Mon Aug 13 04:29:09 2012
@@ -70,7 +70,9 @@
       <role>org.codehaus.plexus.redback.role.processor.RoleModelProcessor</role>
       <role-hint>default</role-hint>
       <implementation>org.codehaus.plexus.redback.role.processor.DefaultRoleModelProcessor</implementation>
-      <description>DefaultRoleModelProcessor: inserts the components of the model that can be populated into the rbac manager</description>
+      <description>DefaultRoleModelProcessor: inserts the components of the model that can be populated into the rbac
+        manager
+      </description>
       <requirements>
         <requirement>
           <role>org.codehaus.plexus.redback.rbac.RBACManager</role>
@@ -95,7 +97,8 @@
       <role>org.codehaus.plexus.redback.role.template.RoleTemplateProcessor</role>
       <role-hint>default</role-hint>
       <implementation>org.codehaus.plexus.redback.role.template.DefaultRoleTemplateProcessor</implementation>
-      <description>DefaultRoleTemplateProcessor: inserts the components of a template into the rbac manager</description>
+      <description>DefaultRoleTemplateProcessor: inserts the components of a template into the rbac manager
+      </description>
       <requirements>
         <requirement>
           <role>org.codehaus.plexus.redback.rbac.RBACManager</role>
@@ -110,7 +113,7 @@
       <implementation>org.codehaus.plexus.redback.role.DefaultRoleManager</implementation>
       <instantiation-strategy>singleton</instantiation-strategy>
       <description>RoleProfileManager:</description>
-      <requirements>        
+      <requirements>
         <requirement>
           <role>org.codehaus.plexus.redback.role.validator.RoleModelValidator</role>
           <role-hint>default</role-hint>

Modified: continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml (original)
+++ continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml Mon Aug 13 04:29:09 2012
@@ -19,12 +19,12 @@
 
 <plexus>
   <components>
-   
+
     <component>
       <role>org.springframework.mail.javamail.JavaMailSender</role>
       <implementation>org.apache.continuum.notification.mail.MockJavaMailSender</implementation>
       <role-hint>continuum</role-hint>
-    </component>    
+    </component>
 
     <component>
       <role>org.apache.maven.continuum.notification.Notifier</role>

Modified: continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml (original)
+++ continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml Mon Aug 13 04:29:09 2012
@@ -55,7 +55,7 @@
           <role>org.apache.maven.continuum.reports.surefire.ReportTestSuiteGenerator</role>
           <field-name>reportTestSuiteGenerator</field-name>
           <role-hint>default</role-hint>
-        </requirement>         
+        </requirement>
       </requirements>
       <configuration>
         <fromMailbox>continuum@localhost</fromMailbox>

Modified: continuum/trunk/continuum-data-management/continuum-legacy/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/continuum-legacy/pom.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/continuum-legacy/pom.xml (original)
+++ continuum/trunk/continuum-data-management/continuum-legacy/pom.xml Mon Aug 13 04:29:09 2012
@@ -18,7 +18,8 @@
   ~ under the License.
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <parent>
     <artifactId>continuum-data-management</artifactId>
     <groupId>org.apache.continuum</groupId>
@@ -70,10 +71,11 @@
             <phase>process-classes</phase>
             <configuration>
               <tasks>
-                <move file="target/classes/META-INF/package.jdorepl" tofile="target/classes/META-INF/package.jdorepl109" />
-                <move file="target/classes/META-INF/package.jdo" tofile="target/classes/META-INF/package.jdo109" />
-                <delete file="target/classes/package.jdo" />
-                <delete file="target/classes/package.jdorepl" />
+                <move file="target/classes/META-INF/package.jdorepl"
+                      tofile="target/classes/META-INF/package.jdorepl109"/>
+                <move file="target/classes/META-INF/package.jdo" tofile="target/classes/META-INF/package.jdo109"/>
+                <delete file="target/classes/package.jdo"/>
+                <delete file="target/classes/package.jdorepl"/>
               </tasks>
             </configuration>
             <goals>
@@ -86,8 +88,8 @@
             <phase>process-classes</phase>
             <configuration>
               <tasks>
-                <copy file="target/classes/META-INF/package.jdorepl109" todir="target/classes" />
-                <copy file="target/classes/META-INF/package.jdo109" todir="target/classes" />
+                <copy file="target/classes/META-INF/package.jdorepl109" todir="target/classes"/>
+                <copy file="target/classes/META-INF/package.jdo109" todir="target/classes"/>
               </tasks>
             </configuration>
             <goals>

Modified: continuum/trunk/continuum-data-management/continuum-legacy/src/main/mdo/continuum.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/continuum-legacy/src/main/mdo/continuum.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/continuum-legacy/src/main/mdo/continuum.xml (original)
+++ continuum/trunk/continuum-data-management/continuum-legacy/src/main/mdo/continuum.xml Mon Aug 13 04:29:09 2012
@@ -900,7 +900,7 @@
           <name>type</name>
           <version>1.1.0+</version>
           <type>String</type>
-          <description>type of the buid defintion</description>          
+          <description>type of the buid defintion</description>
         </field>
         <field>
           <name>schedule</name>
@@ -939,7 +939,7 @@
           <description>
             true if this buildDefinition is a template
           </description>
-        </field>        
+        </field>
       </fields>
     </class>
     <class>
@@ -972,8 +972,8 @@
           <name>type</name>
           <version>1.1.0+</version>
           <type>String</type>
-          <description>type of the buid BuildDefinitionTemplate use for default</description>          
-        </field>                                
+          <description>type of the buid BuildDefinitionTemplate use for default</description>
+        </field>
         <field xml.reference="true" stash.part="true" jpox.fetch-groups="build-template-build-definitions">
           <name>buildDefinitions</name>
           <version>1.1.0+</version>
@@ -1250,8 +1250,8 @@
       </fields>
       <codeSegments>
         <codeSegment>
-           <version>1.1.0+</version>
-           <code><![CDATA[
+          <version>1.1.0+</version>
+          <code><![CDATA[
     public final static int NEW = 1;
     public final static int OK = 2;
     public final static int FAILED = 3;

Modified: continuum/trunk/continuum-data-management/data-management-api/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/data-management-api/pom.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/data-management-api/pom.xml (original)
+++ continuum/trunk/continuum-data-management/data-management-api/pom.xml Mon Aug 13 04:29:09 2012
@@ -18,7 +18,8 @@
   ~ under the License.
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <parent>
     <artifactId>continuum-data-management</artifactId>
     <groupId>org.apache.continuum</groupId>

Modified: continuum/trunk/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DataManagementException.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DataManagementException.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DataManagementException.java (original)
+++ continuum/trunk/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DataManagementException.java Mon Aug 13 04:29:09 2012
@@ -21,6 +21,7 @@ package org.apache.maven.continuum.manag
 
 /**
  * Exception wrapper for application errors that can't be recovered from.
+ *
  * @version $Id$
  */
 public class DataManagementException

Modified: continuum/trunk/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DataManagementTool.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DataManagementTool.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DataManagementTool.java (original)
+++ continuum/trunk/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DataManagementTool.java Mon Aug 13 04:29:09 2012
@@ -24,6 +24,7 @@ import java.io.IOException;
 
 /**
  * Delegate to the correct data management tool.
+ *
  * @version $Id$
  */
 public interface DataManagementTool

Modified: continuum/trunk/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DatabaseFactoryConfigurator.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DatabaseFactoryConfigurator.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DatabaseFactoryConfigurator.java (original)
+++ continuum/trunk/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DatabaseFactoryConfigurator.java Mon Aug 13 04:29:09 2012
@@ -20,7 +20,6 @@ package org.apache.maven.continuum.manag
  */
 
 /**
- * 
  * @version $Id$
  */
 public interface DatabaseFactoryConfigurator

Modified: continuum/trunk/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DatabaseParams.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DatabaseParams.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DatabaseParams.java (original)
+++ continuum/trunk/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DatabaseParams.java Mon Aug 13 04:29:09 2012
@@ -23,6 +23,7 @@ import java.util.Properties;
 
 /**
  * Bean for storing database parameters.
+ *
  * @version $Id$
  */
 public class DatabaseParams

Modified: continuum/trunk/continuum-data-management/data-management-cli/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/data-management-cli/pom.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/data-management-cli/pom.xml (original)
+++ continuum/trunk/continuum-data-management/data-management-cli/pom.xml Mon Aug 13 04:29:09 2012
@@ -18,7 +18,8 @@
   ~ under the License.
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <parent>
     <artifactId>continuum-data-management</artifactId>
     <groupId>org.apache.continuum</groupId>
@@ -125,7 +126,7 @@
               <shadedArtifactAttached>true</shadedArtifactAttached>
               <shadedClassifierName>app</shadedClassifierName>
               <transformers>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer" />
+                <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"/>
                 <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                   <resource>META-INF/spring.handlers</resource>
                 </transformer>

Modified: continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/DataManagementCli.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/DataManagementCli.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/DataManagementCli.java (original)
+++ continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/DataManagementCli.java Mon Aug 13 04:29:09 2012
@@ -73,6 +73,7 @@ import java.util.Properties;
 /**
  * An application for performing database upgrades from old Continuum and Redback versions. A suitable tool until it
  * is natively incorporated into Continuum itself.
+ *
  * @version $Id$
  */
 public class DataManagementCli
@@ -175,7 +176,7 @@ public class DataManagementCli
             Logger.getRootLogger().setLevel( Level.INFO );
             Logger.getLogger( "JPOX" ).setLevel( Level.WARN );
         }
-        
+
         if ( command.settings != null && !command.settings.isFile() )
         {
             System.err.println( command.settings + " not exists or is not a file." );
@@ -214,7 +215,7 @@ public class DataManagementCli
 
         PlexusClassPathXmlApplicationContext classPathApplicationContext = new PlexusClassPathXmlApplicationContext(
             new String[]{"classpath*:/META-INF/spring-context.xml", "classpath*:/META-INF/plexus/components.xml",
-            		"classpath*:/META-INF/plexus/plexus.xml"} );
+                "classpath*:/META-INF/plexus/plexus.xml"} );
 
         PlexusContainerAdapter container = new PlexusContainerAdapter();
         container.setApplicationContext( classPathApplicationContext );
@@ -222,12 +223,10 @@ public class DataManagementCli
         initializeWagon( container, setting );
 
         List<Artifact> artifacts = new ArrayList<Artifact>();
-        artifacts.addAll(
-            downloadArtifact( container, params.getGroupId(), params.getArtifactId(),
-                                            params.getVersion(), setting ) );
-        artifacts.addAll(
-            downloadArtifact( container, "org.apache.continuum", managementArtifactId,
-                                            applicationVersion, setting ) );
+        artifacts.addAll( downloadArtifact( container, params.getGroupId(), params.getArtifactId(), params.getVersion(),
+                                            setting ) );
+        artifacts.addAll( downloadArtifact( container, "org.apache.continuum", managementArtifactId, applicationVersion,
+                                            setting ) );
         artifacts.addAll( downloadArtifact( container, "jpox", "jpox", databaseFormat.getJpoxVersion(), setting ) );
 
         List<String> jars = new ArrayList<String>();
@@ -293,16 +292,16 @@ public class DataManagementCli
         classPathApplicationContext.setClassLoader( newClassLoader );
 
         PlexusFileSystemXmlApplicationContext fileSystemApplicationContext = new PlexusFileSystemXmlApplicationContext(
-             (String[]) jars.toArray( new String[jars.size()] ), classPathApplicationContext );
+            (String[]) jars.toArray( new String[jars.size()] ), classPathApplicationContext );
         fileSystemApplicationContext.setClassLoader( newClassLoader );
         container.setApplicationContext( fileSystemApplicationContext );
 
-        DatabaseFactoryConfigurator configurator = (DatabaseFactoryConfigurator) container.lookup( 
-                                DatabaseFactoryConfigurator.class.getName(), configRoleHint );
+        DatabaseFactoryConfigurator configurator = (DatabaseFactoryConfigurator) container.lookup(
+            DatabaseFactoryConfigurator.class.getName(), configRoleHint );
         configurator.configure( params );
 
-        DataManagementTool manager =
-            (DataManagementTool) container.lookup( DataManagementTool.class.getName(), toolRoleHint );
+        DataManagementTool manager = (DataManagementTool) container.lookup( DataManagementTool.class.getName(),
+                                                                            toolRoleHint );
 
         if ( mode == OperationMode.EXPORT )
         {
@@ -379,20 +378,20 @@ public class DataManagementCli
                                                           String version, File setting )
         throws ComponentLookupException, ArtifactNotFoundException, ArtifactResolutionException, IOException
     {
-        ArtifactRepositoryFactory factory =
-            (ArtifactRepositoryFactory) container.lookup( ArtifactRepositoryFactory.ROLE );
+        ArtifactRepositoryFactory factory = (ArtifactRepositoryFactory) container.lookup(
+            ArtifactRepositoryFactory.ROLE );
 
-        DefaultRepositoryLayout layout =
-            (DefaultRepositoryLayout) container.lookup( ArtifactRepositoryLayout.ROLE, "default" );
+        DefaultRepositoryLayout layout = (DefaultRepositoryLayout) container.lookup( ArtifactRepositoryLayout.ROLE,
+                                                                                     "default" );
 
-        ArtifactRepository localRepository =
-            factory.createArtifactRepository( "local", getLocalRepositoryURL( container, setting ), layout, null, null );
+        ArtifactRepository localRepository = factory.createArtifactRepository( "local", getLocalRepositoryURL(
+            container, setting ), layout, null, null );
 
         List<ArtifactRepository> remoteRepositories = new ArrayList<ArtifactRepository>();
-        remoteRepositories.add(
-            factory.createArtifactRepository( "central", "http://repo1.maven.org/maven2", layout, null, null ) );
+        remoteRepositories.add( factory.createArtifactRepository( "central", "http://repo1.maven.org/maven2", layout,
+                                                                  null, null ) );
         //Load extra repositories from active profile
-        
+
         Settings settings = getSettings( container, setting );
         List<String> profileIds = settings.getActiveProfiles();
         Map<String, Profile> profilesAsMap = settings.getProfilesAsMap();
@@ -415,10 +414,10 @@ public class DataManagementCli
                 }
             }
         }
-        
+
         ArtifactFactory artifactFactory = (ArtifactFactory) container.lookup( ArtifactFactory.ROLE );
-        Artifact artifact =
-            artifactFactory.createArtifact( groupId, artifactId, version, Artifact.SCOPE_RUNTIME, "jar" );
+        Artifact artifact = artifactFactory.createArtifact( groupId, artifactId, version, Artifact.SCOPE_RUNTIME,
+                                                            "jar" );
         Artifact dummyArtifact = artifactFactory.createProjectArtifact( "dummy", "dummy", "1.0" );
 
         if ( artifact.isSnapshot() )
@@ -449,11 +448,12 @@ public class DataManagementCli
             listeners = Collections.emptyList();
         }
 
-        ArtifactMetadataSource source =
-            (ArtifactMetadataSource) container.lookup( ArtifactMetadataSource.ROLE, "maven" );
-        ArtifactResolutionResult result =
-            resolver.resolveTransitively( Collections.singleton( artifact ), dummyArtifact, Collections.emptyMap(),
-                                          localRepository, remoteRepositories, source, filter, listeners );
+        ArtifactMetadataSource source = (ArtifactMetadataSource) container.lookup( ArtifactMetadataSource.ROLE,
+                                                                                   "maven" );
+        ArtifactResolutionResult result = resolver.resolveTransitively( Collections.singleton( artifact ),
+                                                                        dummyArtifact, Collections.emptyMap(),
+                                                                        localRepository, remoteRepositories, source,
+                                                                        filter, listeners );
 
         return result.getArtifacts();
     }
@@ -483,8 +483,8 @@ public class DataManagementCli
     private static Settings getSettings( PlexusContainer container, File setting )
         throws ComponentLookupException, IOException
     {
-        MavenSettingsBuilder mavenSettingsBuilder =
-            (MavenSettingsBuilder) container.lookup( MavenSettingsBuilder.class.getName() );
+        MavenSettingsBuilder mavenSettingsBuilder = (MavenSettingsBuilder) container.lookup(
+            MavenSettingsBuilder.class.getName() );
         try
         {
             if ( setting != null )
@@ -515,25 +515,25 @@ public class DataManagementCli
     private static class Commands
     {
 
-        @Argument(description = "Display help information", value = "help", alias = "h")
+        @Argument( description = "Display help information", value = "help", alias = "h" )
         private boolean help;
 
-        @Argument(description = "Display version information", value = "version", alias = "v")
+        @Argument( description = "Display version information", value = "version", alias = "v" )
         private boolean version;
 
         @Argument(
             description = "The JDBC URL for the Continuum database that contains the data to convert, or to import the data into",
-            value = "buildsJdbcUrl")
+            value = "buildsJdbcUrl" )
         private String buildsJdbcUrl;
 
         @Argument(
             description = "The JDBC URL for the Redback database that contains the data to convert, or to import the data into",
-            value = "usersJdbcUrl")
+            value = "usersJdbcUrl" )
         private String usersJdbcUrl;
 
         // TODO: ability to use the enum directly would be nice
         @Argument(
-            description = "Format of the database. Valid values are CONTINUUM_103, CONTINUUM_109, CONTINUUM_11. Default is CONTINUUM_11.")
+            description = "Format of the database. Valid values are CONTINUUM_103, CONTINUUM_109, CONTINUUM_11. Default is CONTINUUM_11." )
         private String databaseFormat = DatabaseFormat.CONTINUUM_11.toString();
 
 /* TODO: not yet supported
@@ -544,53 +544,54 @@ public class DataManagementCli
 
         @Argument(
             description = "The directory to export the data to, or import the data from. Default is 'backups' in the current working directory.",
-            value = "directory")
+            value = "directory" )
         private File directory = new File( "backups" );
 
         @Argument(
             description = "Mode of operation. Valid values are IMPORT and EXPORT. Default is EXPORT.",
-            value = "mode")
+            value = "mode" )
         private String mode = OperationMode.EXPORT.toString();
 
         @Argument(
             description = "Whether to overwrite the designated directory if it already exists in export mode. Default is false.",
-            value = "overwrite")
+            value = "overwrite" )
         private boolean overwrite;
 
         @Argument(
             description = "The type of database to use. Currently supported values are DERBY_10_1. The default value is DERBY_10_1.",
-            value = "databaseType")
+            value = "databaseType" )
         private String databaseType = SupportedDatabase.DERBY_10_1.toString();
 
-        @Argument(description = "JDBC driver class", value = "driverClass", required = false)
+        @Argument( description = "JDBC driver class", value = "driverClass", required = false )
         private String driverClass;
 
-        @Argument(description = "JDBC driver groupId", value = "groupId", required = false)
+        @Argument( description = "JDBC driver groupId", value = "groupId", required = false )
         private String groupId;
 
-        @Argument(description = "JDBC driver artifactId", value = "artifactId", required = false)
+        @Argument( description = "JDBC driver artifactId", value = "artifactId", required = false )
         private String artifactId;
 
-        @Argument(description = "Artifact version of the JDBC driver class",
-                  value = "artifactVersion",
-                  required = false)
+        @Argument( description = "Artifact version of the JDBC driver class",
+                   value = "artifactVersion",
+                   required = false )
         private String artifactVersion;
 
-        @Argument(description = "Username", value = "username", required = false)
+        @Argument( description = "Username", value = "username", required = false )
         private String username;
 
-        @Argument(description = "Password", value = "password", required = false)
+        @Argument( description = "Password", value = "password", required = false )
         private String password;
 
         @Argument(
             description = "Turn on debugging information. Default is off.",
-            value = "debug")
+            value = "debug" )
         private boolean debug;
-        
-        @Argument( description = "Alternate path for the user settings file", value = "settings", required = false, alias = "s" )
+
+        @Argument( description = "Alternate path for the user settings file", value = "settings", required = false,
+                   alias = "s" )
         private File settings;
 
-        @Argument(description = "Run on strict mode. Default is false.", value="strict")
+        @Argument( description = "Run on strict mode. Default is false.", value = "strict" )
         private boolean strict;
     }
 

Modified: continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/DatabaseFormat.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/DatabaseFormat.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/DatabaseFormat.java (original)
+++ continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/DatabaseFormat.java Mon Aug 13 04:29:09 2012
@@ -21,6 +21,7 @@ package org.apache.maven.continuum.manag
 
 /**
  * Enumeration of known database formats.
+ *
  * @version $Id$
  */
 public enum DatabaseFormat

Modified: continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/util/PlexusApplicationContextDelegate.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/util/PlexusApplicationContextDelegate.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/util/PlexusApplicationContextDelegate.java (original)
+++ continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/util/PlexusApplicationContextDelegate.java Mon Aug 13 04:29:09 2012
@@ -19,14 +19,6 @@ package org.apache.maven.continuum.manag
  * under the License.
  */
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 import org.codehaus.plexus.spring.PlexusBeanDefinitionDocumentReader;
 import org.codehaus.plexus.spring.PlexusConfigurationPropertyEditor;
 import org.codehaus.plexus.spring.PlexusContainerAdapter;
@@ -41,9 +33,19 @@ import org.springframework.beans.factory
 import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
 import org.springframework.context.ApplicationContext;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 public class PlexusApplicationContextDelegate
 {
-    /** Logger used by this class. */
+    /**
+     * Logger used by this class.
+     */
     protected Logger logger = LoggerFactory.getLogger( getClass() );
 
     private PlexusLifecycleBeanPostProcessor lifecycleBeanPostProcessor;

Modified: continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/util/PlexusFileSystemXmlApplicationContext.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/util/PlexusFileSystemXmlApplicationContext.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/util/PlexusFileSystemXmlApplicationContext.java (original)
+++ continuum/trunk/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/util/PlexusFileSystemXmlApplicationContext.java Mon Aug 13 04:29:09 2012
@@ -19,8 +19,6 @@ package org.apache.maven.continuum.manag
  * under the License.
  */
 
-import java.io.IOException;
-
 import org.codehaus.plexus.spring.PlexusXmlBeanDefinitionReader;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
@@ -30,6 +28,8 @@ import org.springframework.beans.factory
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.FileSystemXmlApplicationContext;
 
+import java.io.IOException;
+
 public class PlexusFileSystemXmlApplicationContext
     extends FileSystemXmlApplicationContext
 {
@@ -75,11 +75,14 @@ public class PlexusFileSystemXmlApplicat
     /**
      * Copied from {@link AbstractXmlApplicationContext}
      * Loads the bean definitions via an XmlBeanDefinitionReader.
+     *
      * @see org.springframework.beans.factory.xml.XmlBeanDefinitionReader
      * @see #initBeanDefinitionReader
      * @see #loadBeanDefinitions
      */
-    protected void loadBeanDefinitions( DefaultListableBeanFactory beanFactory ) throws IOException {
+    protected void loadBeanDefinitions( DefaultListableBeanFactory beanFactory )
+        throws IOException
+    {
         // Create a new XmlBeanDefinitionReader for the given BeanFactory.
         XmlBeanDefinitionReader beanDefinitionReader = new PlexusXmlBeanDefinitionReader( beanFactory );
 

Modified: continuum/trunk/continuum-data-management/data-management-cli/src/main/resources/META-INF/plexus/plexus.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/data-management-cli/src/main/resources/META-INF/plexus/plexus.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/data-management-cli/src/main/resources/META-INF/plexus/plexus.xml (original)
+++ continuum/trunk/continuum-data-management/data-management-cli/src/main/resources/META-INF/plexus/plexus.xml Mon Aug 13 04:29:09 2012
@@ -16,7 +16,7 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-  <!-- $Id$ -->
+<!-- $Id$ -->
 <plexus>
   <components>
     <component>

Modified: continuum/trunk/continuum-data-management/data-management-jdo/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/data-management-jdo/pom.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/data-management-jdo/pom.xml (original)
+++ continuum/trunk/continuum-data-management/data-management-jdo/pom.xml Mon Aug 13 04:29:09 2012
@@ -18,7 +18,8 @@
   ~ under the License.
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <parent>
     <artifactId>continuum-data-management</artifactId>
     <groupId>org.apache.continuum</groupId>

Modified: continuum/trunk/continuum-data-management/data-management-jdo/src/main/java/org/apache/maven/continuum/management/JdoDataManagementTool.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/data-management-jdo/src/main/java/org/apache/maven/continuum/management/JdoDataManagementTool.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/data-management-jdo/src/main/java/org/apache/maven/continuum/management/JdoDataManagementTool.java (original)
+++ continuum/trunk/continuum-data-management/data-management-jdo/src/main/java/org/apache/maven/continuum/management/JdoDataManagementTool.java Mon Aug 13 04:29:09 2012
@@ -19,27 +19,6 @@ package org.apache.maven.continuum.manag
  * under the License.
  */
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.jdo.JDOHelper;
-import javax.jdo.PersistenceManagerFactory;
-import javax.xml.stream.XMLStreamException;
-
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.dao.BuildDefinitionTemplateDao;
 import org.apache.continuum.dao.BuildQueueDao;
@@ -75,12 +54,32 @@ import org.apache.maven.continuum.store.
 import org.codehaus.plexus.jdo.ConfigurableJdoFactory;
 import org.codehaus.plexus.jdo.PlexusJdoUtils;
 import org.codehaus.plexus.util.IOUtil;
-import org.codehaus.plexus.util.dag.CycleDetectedException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import javax.jdo.JDOHelper;
+import javax.jdo.PersistenceManagerFactory;
+import javax.xml.stream.XMLStreamException;
+
 /**
  * JDO implementation the database management tool API.
+ *
  * @version $Id$
  * @plexus.component role="org.apache.maven.continuum.management.DataManagementTool" role-hint="continuum-jdo"
  */
@@ -108,7 +107,7 @@ public class JdoDataManagementTool
      * @plexus.requirement
      */
     private RepositoryPurgeConfigurationDao repositoryPurgeConfigurationDao;
-    
+
     /**
      * @plexus.requirement
      */
@@ -207,7 +206,8 @@ public class JdoDataManagementTool
         database.setRepositoryPurgeConfigurations(
             repositoryPurgeConfigurationDao.getAllRepositoryPurgeConfigurations() );
         database.setDirectoryPurgeConfigurations( directoryPurgeConfigurationDao.getAllDirectoryPurgeConfigurations() );
-        database.setDistributedDirectoryPurgeConfigurations( distributedDirectoryPurgeConfigurationDao.getAllDistributedDirectoryPurgeConfigurations() );
+        database.setDistributedDirectoryPurgeConfigurations(
+            distributedDirectoryPurgeConfigurationDao.getAllDistributedDirectoryPurgeConfigurations() );
         database.setProjectScmRoots( projectScmRootDao.getAllProjectScmRoots() );
         database.setContinuumReleaseResults( releaseResultDao.getAllContinuumReleaseResults() );
 
@@ -270,7 +270,7 @@ public class JdoDataManagementTool
         PlexusJdoUtils.addObject( pmf.getPersistenceManager(), database.getSystemConfiguration() );
 
         Map<Integer, BuildQueue> buildQueues = new HashMap<Integer, BuildQueue>();
-        for ( BuildQueue buildQueue : (List<BuildQueue>)database.getBuildQueues() )
+        for ( BuildQueue buildQueue : (List<BuildQueue>) database.getBuildQueues() )
         {
             buildQueue = (BuildQueue) PlexusJdoUtils.addObject( pmf.getPersistenceManager(), buildQueue );
             buildQueues.put( buildQueue.getId(), buildQueue );
@@ -310,9 +310,10 @@ public class JdoDataManagementTool
                 profile.setBuilder( installations.get( profile.getBuilder().getInstallationId() ) );
             }
             List environmentVariables = new ArrayList();
-            for (Iterator envIt = profile.getEnvironmentVariables().listIterator(); envIt.hasNext();){
+            for ( Iterator envIt = profile.getEnvironmentVariables().listIterator(); envIt.hasNext(); )
+            {
                 Installation installation = (Installation) envIt.next();
-                environmentVariables.add(installations.get(installation.getInstallationId()));
+                environmentVariables.add( installations.get( installation.getInstallationId() ) );
                 envIt.remove();
             }
             profile.setEnvironmentVariables( environmentVariables );
@@ -325,7 +326,8 @@ public class JdoDataManagementTool
         {
             if ( buildDefinition.getSchedule() != null )
             {
-                buildDefinition.setSchedule( schedules.get( Integer.valueOf( buildDefinition.getSchedule().getId() ) ) );
+                buildDefinition.setSchedule( schedules.get( Integer.valueOf(
+                    buildDefinition.getSchedule().getId() ) ) );
             }
 
             if ( buildDefinition.getProfile() != null )
@@ -333,15 +335,16 @@ public class JdoDataManagementTool
                 buildDefinition.setProfile( profiles.get( Integer.valueOf( buildDefinition.getProfile().getId() ) ) );
             }
 
-            buildDefinition = (BuildDefinition) PlexusJdoUtils.addObject( pmf.getPersistenceManager(), buildDefinition );
+            buildDefinition = (BuildDefinition) PlexusJdoUtils.addObject( pmf.getPersistenceManager(),
+                                                                          buildDefinition );
             buildDefinitions.put( Integer.valueOf( buildDefinition.getId() ), buildDefinition );
         }
 
         Map<Integer, LocalRepository> localRepositories = new HashMap<Integer, LocalRepository>();
         for ( LocalRepository localRepository : (List<LocalRepository>) database.getLocalRepositories() )
         {
-            localRepository =
-                (LocalRepository) PlexusJdoUtils.addObject( pmf.getPersistenceManager(), localRepository );
+            localRepository = (LocalRepository) PlexusJdoUtils.addObject( pmf.getPersistenceManager(),
+                                                                          localRepository );
             localRepositories.put( Integer.valueOf( localRepository.getId() ), localRepository );
         }
 
@@ -351,21 +354,21 @@ public class JdoDataManagementTool
             ProjectGroup projectGroup = (ProjectGroup) i.next();
 
             // first, we must map up any schedules, etc.
-            projectGroup.setBuildDefinitions( processBuildDefinitions( projectGroup.getBuildDefinitions(), 
-                                                                       schedules, profiles, buildDefinitions ) );
+            projectGroup.setBuildDefinitions( processBuildDefinitions( projectGroup.getBuildDefinitions(), schedules,
+                                                                       profiles, buildDefinitions ) );
 
             for ( Iterator j = projectGroup.getProjects().iterator(); j.hasNext(); )
             {
                 Project project = (Project) j.next();
 
-                project.setBuildDefinitions( processBuildDefinitions( project.getBuildDefinitions(), 
-                                                                      schedules, profiles, buildDefinitions ) );
+                project.setBuildDefinitions( processBuildDefinitions( project.getBuildDefinitions(), schedules,
+                                                                      profiles, buildDefinitions ) );
             }
 
             if ( projectGroup.getLocalRepository() != null )
             {
-                projectGroup.setLocalRepository( localRepositories.get(
-                                                 Integer.valueOf( projectGroup.getLocalRepository().getId() ) ) );
+                projectGroup.setLocalRepository( localRepositories.get( Integer.valueOf(
+                    projectGroup.getLocalRepository().getId() ) ) );
             }
 
             projectGroup = (ProjectGroup) PlexusJdoUtils.addObject( pmf.getPersistenceManager(), projectGroup );
@@ -376,13 +379,13 @@ public class JdoDataManagementTool
         Map<Integer, ProjectScmRoot> projectScmRoots = new HashMap<Integer, ProjectScmRoot>();
         Set<Integer> keys = projectGroups.keySet();
         int id = 1;
-        for( Integer key : keys )
+        for ( Integer key : keys )
         {
             ProjectGroup projectGroup = projectGroups.get( key );
             String url = " ";
-            List<Project> projects =
-                ProjectSorter.getSortedProjects( getProjectsByGroupIdWithDependencies( pmf, projectGroup.getId() ),
-                                                 log );
+            List<Project> projects = ProjectSorter.getSortedProjects( getProjectsByGroupIdWithDependencies( pmf,
+                                                                                                            projectGroup.getId() ),
+                                                                      log );
             for ( Iterator j = projects.iterator(); j.hasNext(); )
             {
                 Project project = (Project) j.next();
@@ -395,7 +398,8 @@ public class JdoDataManagementTool
                     projectScmRoot.setScmRootAddress( url );
                     projectScmRoot.setState( project.getState() );
 
-                    projectScmRoot = (ProjectScmRoot) PlexusJdoUtils.addObject( pmf.getPersistenceManager(), projectScmRoot );
+                    projectScmRoot = (ProjectScmRoot) PlexusJdoUtils.addObject( pmf.getPersistenceManager(),
+                                                                                projectScmRoot );
                     projectScmRoots.put( Integer.valueOf( projectScmRoot.getId() ), projectScmRoot );
                     id++;
                 }
@@ -421,8 +425,7 @@ public class JdoDataManagementTool
         {
             if ( dirPurge.getSchedule() != null )
             {
-                dirPurge.setSchedule( schedules.get(
-                                      Integer.valueOf( dirPurge.getSchedule().getId() ) ) );
+                dirPurge.setSchedule( schedules.get( Integer.valueOf( dirPurge.getSchedule().getId() ) ) );
             }
 
             dirPurge = (DirectoryPurgeConfiguration) PlexusJdoUtils.addObject( pmf.getPersistenceManager(), dirPurge );
@@ -430,8 +433,8 @@ public class JdoDataManagementTool
 
         for ( ContinuumReleaseResult releaseResult : (List<ContinuumReleaseResult>) database.getContinuumReleaseResults() )
         {
-            releaseResult.setProjectGroup( projectGroups.get(
-                                           Integer.valueOf( releaseResult.getProjectGroup().getId() ) ) );
+            releaseResult.setProjectGroup( projectGroups.get( Integer.valueOf(
+                releaseResult.getProjectGroup().getId() ) ) );
 
             ProjectGroup group = releaseResult.getProjectGroup();
 
@@ -441,8 +444,8 @@ public class JdoDataManagementTool
                 {
                     try
                     {
-                        Project proj = 
-                            (Project) PlexusJdoUtils.getObjectById( pmf.getPersistenceManager(), Project.class, project.getId(), null );
+                        Project proj = (Project) PlexusJdoUtils.getObjectById( pmf.getPersistenceManager(),
+                                                                               Project.class, project.getId(), null );
                         releaseResult.setProject( proj );
                     }
                     catch ( Exception e )
@@ -452,24 +455,22 @@ public class JdoDataManagementTool
                 }
             }
 
-            releaseResult =
-                (ContinuumReleaseResult) PlexusJdoUtils.addObject( pmf.getPersistenceManager(), releaseResult );
+            releaseResult = (ContinuumReleaseResult) PlexusJdoUtils.addObject( pmf.getPersistenceManager(),
+                                                                               releaseResult );
         }
 
         for ( BuildDefinitionTemplate template : (List<BuildDefinitionTemplate>) database.getBuildDefinitionTemplates() )
         {
             template.setBuildDefinitions( processBuildDefinitions( template.getBuildDefinitions(), buildDefinitions ) );
 
-            template = 
-                (BuildDefinitionTemplate) PlexusJdoUtils.addObject( pmf.getPersistenceManager(), template );
+            template = (BuildDefinitionTemplate) PlexusJdoUtils.addObject( pmf.getPersistenceManager(), template );
         }
     }
 
     private List<Project> getProjectsByGroupIdWithDependencies( PersistenceManagerFactory pmf, int projectGroupId )
     {
-        List<Project> allProjects =
-            PlexusJdoUtils.getAllObjectsDetached( pmf.getPersistenceManager(), Project.class, "name ascending",
-                                                  "project-dependencies" );
+        List<Project> allProjects = PlexusJdoUtils.getAllObjectsDetached( pmf.getPersistenceManager(), Project.class,
+                                                                          "name ascending", "project-dependencies" );
         List<Project> groupProjects = new ArrayList<Project>();
 
         for ( Project project : allProjects )
@@ -483,9 +484,9 @@ public class JdoDataManagementTool
         return groupProjects;
     }
 
-    private List<BuildDefinition> processBuildDefinitions( List<BuildDefinition> buildDefinitions, 
+    private List<BuildDefinition> processBuildDefinitions( List<BuildDefinition> buildDefinitions,
                                                            Map<Integer, Schedule> schedules,
-                                                           Map<Integer, Profile> profiles, 
+                                                           Map<Integer, Profile> profiles,
                                                            Map<Integer, BuildDefinition> buildDefs )
     {
         List<BuildDefinition> buildDefsList = new ArrayList<BuildDefinition>();
@@ -502,7 +503,7 @@ public class JdoDataManagementTool
                 {
                     def.setSchedule( schedules.get( Integer.valueOf( def.getSchedule().getId() ) ) );
                 }
-    
+
                 if ( def.getProfile() != null )
                 {
                     def.setProfile( profiles.get( Integer.valueOf( def.getProfile().getId() ) ) );
@@ -515,11 +516,11 @@ public class JdoDataManagementTool
         return buildDefsList;
     }
 
-    private List<BuildDefinition> processBuildDefinitions( List<BuildDefinition> buildDefinitions, 
+    private List<BuildDefinition> processBuildDefinitions( List<BuildDefinition> buildDefinitions,
                                                            Map<Integer, BuildDefinition> buildDefs )
     {
         List<BuildDefinition> buildDefsList = new ArrayList<BuildDefinition>();
-        
+
         for ( BuildDefinition buildDefinition : buildDefinitions )
         {
             buildDefsList.add( buildDefs.get( Integer.valueOf( buildDefinition.getId() ) ) );



Mime
View raw message