continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1372260 [15/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/DefaultContinuumTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java Mon Aug 13 04:29:09 2012
@@ -19,17 +19,9 @@ package org.apache.maven.continuum;
  * under the License.
  */
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.continuum.buildmanager.BuildsManager;
 import org.apache.continuum.dao.BuildResultDao;
 import org.apache.continuum.dao.ProjectDao;
-import org.apache.continuum.model.project.ProjectScmRoot;
 import org.apache.continuum.model.release.ContinuumReleaseResult;
 import org.apache.continuum.model.repository.LocalRepository;
 import org.apache.continuum.release.config.ContinuumReleaseDescriptor;
@@ -53,6 +45,13 @@ import org.jmock.integration.junit3.JUni
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -102,8 +101,8 @@ public class DefaultContinuumTest
 
         assertTrue( rootPom.exists() );
 
-        ContinuumProjectBuildingResult result =
-        	continuum.addMavenTwoProject( rootPom.toURI().toURL().toExternalForm(), -1, true, false, true, -1, false );
+        ContinuumProjectBuildingResult result = continuum.addMavenTwoProject( rootPom.toURI().toURL().toExternalForm(),
+                                                                              -1, true, false, true, -1, false );
 
         assertNotNull( result );
 
@@ -129,8 +128,8 @@ public class DefaultContinuumTest
             projects.put( project.getName(), project );
 
             // validate project in project group
-            assertTrue( "project not in project group",
-                        getProjectGroupDao().getProjectGroupByProjectId( project.getId() ) != null );
+            assertTrue( "project not in project group", getProjectGroupDao().getProjectGroupByProjectId(
+                project.getId() ) != null );
         }
 
         assertTrue( "no irc notifier", projects.containsKey( "Continuum IRC Notifier" ) );
@@ -138,7 +137,7 @@ public class DefaultContinuumTest
         assertTrue( "no jabber notifier", projects.containsKey( "Continuum Jabber Notifier" ) );
 
     }
-    
+
 /* test failing intermittently, possibly due to the dodgy for loop
     // handle flat multi-module projects
     public void testAddMavenTwoProjectSetInSingleDirectory()
@@ -227,7 +226,7 @@ public class DefaultContinuumTest
         //            getProjectDao().getProjectByName( "module-b" ).getState() );
     }
 */
-        
+
     public void testUpdateMavenTwoProject()
         throws Exception
     {
@@ -276,7 +275,7 @@ public class DefaultContinuumTest
 
         project = getProjectDao().getProjectByName( "test-project" );
 
-        assertNotNull ( project );
+        assertNotNull( project );
 
         BuildResult buildResult = new BuildResult();
 
@@ -360,8 +359,8 @@ public class DefaultContinuumTest
 
         continuum.addBuildDefinitionToProject( project.getId(), nbd );
 
-        assertTrue( "project lvl build definition not default for project",
-                    continuum.getDefaultBuildDefinition( project.getId() ).getId() == nbd.getId() );
+        assertTrue( "project lvl build definition not default for project", continuum.getDefaultBuildDefinition(
+            project.getId() ).getId() == nbd.getId() );
 
         continuum.removeBuildDefinitionFromProject( project.getId(), nbd.getId() );
 
@@ -493,8 +492,8 @@ public class DefaultContinuumTest
             //expected, check for twice wrapped exception
             if ( e.getCause() != null )
             {
-                assertFalse( exceptionName + " is wrapped in " + exceptionName,
-                             e.getCause().getClass().equals( ContinuumException.class ) );
+                assertFalse( exceptionName + " is wrapped in " + exceptionName, e.getCause().getClass().equals(
+                    ContinuumException.class ) );
             }
         }
     }
@@ -522,54 +521,54 @@ public class DefaultContinuumTest
 
         parallelBuildsManager.removeProjectFromCheckoutQueue( project.getId() );
 
-        assertFalse( "project still exist on the checkout queue",
-                     parallelBuildsManager.isInAnyCheckoutQueue( project.getId() ) );
+        assertFalse( "project still exist on the checkout queue", parallelBuildsManager.isInAnyCheckoutQueue(
+            project.getId() ) );
     }
-    
-    /*public void testCreationOfProjectScmRootDuringInitialization()
-        throws Exception
-    {
-        DefaultContinuum continuum = (DefaultContinuum) getContinuum();
-
-        ProjectGroup defaultProjectGroup =
-            continuum.getProjectGroupByGroupId( ContinuumInitializer.DEFAULT_PROJECT_GROUP_GROUP_ID );
 
-        ProjectScmRoot scmRoot = new ProjectScmRoot();
-        scmRoot.setProjectGroup( defaultProjectGroup );
-        scmRoot.setScmRootAddress( "http://temp.company.com/svn/trunk" );
-        getProjectScmRootDao().addProjectScmRoot( scmRoot );
-        
-        defaultProjectGroup = continuum.getProjectGroupWithProjects( defaultProjectGroup.getId() );
-        assertEquals( 0, defaultProjectGroup.getProjects().size() );
-        
-        Project project = new Project();
-        project.setGroupId( "project1" );
-        project.setArtifactId( "project1" );
-        project.setVersion( "1.0-SNAPSHOT" );
-        project.setScmUrl( "http://temp.company.com/svn/trunk/project1" );
-        defaultProjectGroup.addProject( project );
+    /*public void testCreationOfProjectScmRootDuringInitialization()
+    throws Exception
+{
+    DefaultContinuum continuum = (DefaultContinuum) getContinuum();
 
-        project = new Project();
-        project.setGroupId( "project2" );
-        project.setArtifactId( "project2" );
-        project.setVersion( "1.0-SNAPSHOT" );
-        project.setScmUrl( "http://temp.company.com/svn/trunk/project2" );
-        defaultProjectGroup.addProject( project );
+    ProjectGroup defaultProjectGroup =
+        continuum.getProjectGroupByGroupId( ContinuumInitializer.DEFAULT_PROJECT_GROUP_GROUP_ID );
 
-        project = new Project();
-        project.setGroupId( "project3" );
-        project.setArtifactId( "project3" );
-        project.setVersion( "1.0-SNAPSHOT" );
-        project.setScmUrl( "http://temp.company.com/svn/trunk/project3" );
-        defaultProjectGroup.addProject( project );
-
-        getProjectGroupDao().updateProjectGroup( defaultProjectGroup );
-
-        continuum.initialize();
-
-        List<ProjectScmRoot> scmRoots = continuum.getProjectScmRootByProjectGroup( defaultProjectGroup.getId() );
-        assertEquals( "#scmRoots in the group", 1, scmRoots.size() );
-    }    */
+    ProjectScmRoot scmRoot = new ProjectScmRoot();
+    scmRoot.setProjectGroup( defaultProjectGroup );
+    scmRoot.setScmRootAddress( "http://temp.company.com/svn/trunk" );
+    getProjectScmRootDao().addProjectScmRoot( scmRoot );
+
+    defaultProjectGroup = continuum.getProjectGroupWithProjects( defaultProjectGroup.getId() );
+    assertEquals( 0, defaultProjectGroup.getProjects().size() );
+
+    Project project = new Project();
+    project.setGroupId( "project1" );
+    project.setArtifactId( "project1" );
+    project.setVersion( "1.0-SNAPSHOT" );
+    project.setScmUrl( "http://temp.company.com/svn/trunk/project1" );
+    defaultProjectGroup.addProject( project );
+
+    project = new Project();
+    project.setGroupId( "project2" );
+    project.setArtifactId( "project2" );
+    project.setVersion( "1.0-SNAPSHOT" );
+    project.setScmUrl( "http://temp.company.com/svn/trunk/project2" );
+    defaultProjectGroup.addProject( project );
+
+    project = new Project();
+    project.setGroupId( "project3" );
+    project.setArtifactId( "project3" );
+    project.setVersion( "1.0-SNAPSHOT" );
+    project.setScmUrl( "http://temp.company.com/svn/trunk/project3" );
+    defaultProjectGroup.addProject( project );
+
+    getProjectGroupDao().updateProjectGroup( defaultProjectGroup );
+
+    continuum.initialize();
+
+    List<ProjectScmRoot> scmRoots = continuum.getProjectScmRootByProjectGroup( defaultProjectGroup.getId() );
+    assertEquals( "#scmRoots in the group", 1, scmRoots.size() );
+}    */
 
     public void testAddAntProjectWithdefaultBuildDef()
         throws Exception
@@ -578,8 +577,8 @@ public class DefaultContinuumTest
 
         Project project = new Project();
         project.setScmUrl( "scmUrl" );
-        ProjectGroup defaultProjectGroup =
-            continuum.getProjectGroupByGroupId( ContinuumInitializer.DEFAULT_PROJECT_GROUP_GROUP_ID );
+        ProjectGroup defaultProjectGroup = continuum.getProjectGroupByGroupId(
+            ContinuumInitializer.DEFAULT_PROJECT_GROUP_GROUP_ID );
         int projectId = continuum.addProject( project, ContinuumBuildExecutorConstants.ANT_BUILD_EXECUTOR,
                                               defaultProjectGroup.getId() );
         assertEquals( 1, continuum.getProjectGroupWithProjects( defaultProjectGroup.getId() ).getProjects().size() );
@@ -648,7 +647,7 @@ public class DefaultContinuumTest
         defaultGroup.addProject( project );
         getProjectGroupDao().updateProjectGroup( defaultGroup );
         project = getProjectDao().getProjectByName( "test-project" );
-        assertNotNull ( project );
+        assertNotNull( project );
         assertEquals( 0, continuum.getAllContinuumReleaseResults().size() );
 
         ReleaseResult result = new ReleaseResult();
@@ -664,19 +663,20 @@ public class DefaultContinuumTest
         continuum.getReleaseManager().getReleaseResults().put( "test-release-id", result );
         continuum.getReleaseManager().getPreparedReleases().put( "test-release-id", descriptor );
 
-        ContinuumReleaseResult releaseResult = continuum.addContinuumReleaseResult( project.getId(), "test-release-id", "prepare" );
+        ContinuumReleaseResult releaseResult = continuum.addContinuumReleaseResult( project.getId(), "test-release-id",
+                                                                                    "prepare" );
 
         releaseResult = continuum.addContinuumReleaseResult( releaseResult );
 
-        List<ContinuumReleaseResult> releaseResults =
-            continuum.getContinuumReleaseResultsByProjectGroup( defaultGroup.getId() );
+        List<ContinuumReleaseResult> releaseResults = continuum.getContinuumReleaseResultsByProjectGroup(
+            defaultGroup.getId() );
         assertEquals( 1, releaseResults.size() );
         assertEquals( releaseResult, releaseResults.get( 0 ) );
 
         continuum.removeContinuumReleaseResult( releaseResult.getId() );
         assertEquals( 0, continuum.getAllContinuumReleaseResults().size() );
-        assertEquals( defaultGroup,
-                      continuum.getProjectGroupByGroupId( ContinuumInitializer.DEFAULT_PROJECT_GROUP_GROUP_ID ) );
+        assertEquals( defaultGroup, continuum.getProjectGroupByGroupId(
+            ContinuumInitializer.DEFAULT_PROJECT_GROUP_GROUP_ID ) );
     }
 
     public void testBuildProjectWhileProjectIsInReleaseStage()
@@ -702,11 +702,12 @@ public class DefaultContinuumTest
 
                 one( taskQueueManager ).isProjectInReleaseStage( "org.apache.continuum:continuum-core" );
                 will( returnValue( true ) );
-            }} );
+            }
+        } );
 
         try
         {
-        	continuum.buildProject( 1, "test-user" );
+            continuum.buildProject( 1, "test-user" );
             fail( "An exception should have been thrown." );
         }
         catch ( ContinuumException e )
@@ -748,11 +749,12 @@ public class DefaultContinuumTest
 
                 one( taskQueueManager ).isProjectInReleaseStage( "org.apache.continuum:continuum-core" );
                 will( returnValue( true ) );
-            }} );
+            }
+        } );
 
         try
         {
-        	continuum.buildProjectGroup( 1, new BuildTrigger( 1, "test-user" ) );
+            continuum.buildProjectGroup( 1, new BuildTrigger( 1, "test-user" ) );
             fail( "An exception should have been thrown." );
         }
         catch ( ContinuumException e )

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java Mon Aug 13 04:29:09 2012
@@ -19,11 +19,6 @@ package org.apache.maven.continuum.build
  * under the License.
  */
 
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.AbstractContinuumTest;
@@ -41,6 +36,11 @@ import org.codehaus.plexus.taskqueue.Tas
 import org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor;
 import org.codehaus.plexus.util.FileUtils;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
 /**
  * @author <a href="mailto:kenney@apache.org">Kenney Westerhof</a>
  */
@@ -62,8 +62,8 @@ public class BuildProjectTaskExecutorTes
         {
             super.setUp();
 
-            projectBuilder =
-                (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
+            projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
+                                                               MavenTwoContinuumProjectBuilder.ID );
 
             buildQueue = (TaskQueue) lookup( TaskQueue.ROLE, "build-project" );
 
@@ -246,8 +246,10 @@ public class BuildProjectTaskExecutorTes
 
         // projectGroup = continuumStore.addProjectGroup( projectGroup );
 
-        BuildProjectTask task = new BuildProjectTask( project.getId(), buildDefinition.getId(), new BuildTrigger( 0, "" ),
-        		                                 project.getName(), buildDefinition.getDescription(), null, projectGroupId );
+        BuildProjectTask task = new BuildProjectTask( project.getId(), buildDefinition.getId(), new BuildTrigger( 0,
+                                                                                                                  "" ),
+                                                      project.getName(), buildDefinition.getDescription(), null,
+                                                      projectGroupId );
 
         task.setMaxExecutionTime( maxRunTime );
 

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java Mon Aug 13 04:29:09 2012
@@ -21,8 +21,8 @@ package org.apache.maven.continuum.build
 
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.dao.BuildResultDao;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.continuum.model.project.ProjectScmRoot;
+import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.AbstractContinuumTest;
 import org.apache.maven.continuum.core.action.AbstractContinuumAction;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorConstants;
@@ -37,7 +37,6 @@ import org.apache.maven.continuum.projec
 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileWriter;
-import java.io.IOException;
 import java.util.Calendar;
 import java.util.List;
 import java.util.Map;
@@ -46,11 +45,11 @@ public class DefaultBuildControllerTest
     extends AbstractContinuumTest
 {
     private DefaultBuildController controller;
-    
+
     private static String FORCED_BUILD_USER = "TestUsername";
-    
+
     private static String SCHEDULE_NAME = "TEST_SCHEDULE";
-    
+
     int projectId1;
 
     int projectId2;
@@ -108,7 +107,7 @@ public class DefaultBuildControllerTest
         projectId2 = addProject( project2 ).getId();
         buildDefinitionId2 = buildDefinitionDao.getDefaultBuildDefinition( projectId2 ).getId();
         createPomFile( getProjectDao().getProjectWithAllDetails( projectId2 ) );
-        
+
         controller = (DefaultBuildController) lookup( BuildController.ROLE );
     }
 
@@ -138,15 +137,15 @@ public class DefaultBuildControllerTest
     private BuildContext getScheduledBuildContext()
         throws Exception
     {
-        return controller.initializeBuildContext( projectId2, buildDefinitionId2,
-                          new BuildTrigger( ContinuumProjectState.TRIGGER_SCHEDULED ), new ScmResult() );
+        return controller.initializeBuildContext( projectId2, buildDefinitionId2, new BuildTrigger(
+            ContinuumProjectState.TRIGGER_SCHEDULED ), new ScmResult() );
     }
 
     private BuildContext getForcedBuildContext()
         throws Exception
     {
-        return controller.initializeBuildContext( projectId2, buildDefinitionId2,
-                          new BuildTrigger( ContinuumProjectState.TRIGGER_FORCED, FORCED_BUILD_USER ), new ScmResult() );
+        return controller.initializeBuildContext( projectId2, buildDefinitionId2, new BuildTrigger(
+            ContinuumProjectState.TRIGGER_FORCED, FORCED_BUILD_USER ), new ScmResult() );
     }
 
     private BuildContext getContext( int hourOfLastExecution )
@@ -156,8 +155,8 @@ public class DefaultBuildControllerTest
         BuildResult oldBuildResult = new BuildResult();
         oldBuildResult.setEndTime( Calendar.getInstance().getTimeInMillis() + ( hourOfLastExecution * 3600000 ) );
         context.setOldBuildResult( oldBuildResult );
-        context.setScmResult( new ScmResult() );     
-                      
+        context.setScmResult( new ScmResult() );
+
         Map<String, Object> actionContext = context.getActionContext();
         ProjectScmRoot projectScmRoot = new ProjectScmRoot();
         projectScmRoot.setId( 1 );
@@ -238,10 +237,10 @@ public class DefaultBuildControllerTest
         throws Exception
     {
         BuildTrigger buildTrigger = new BuildTrigger( ContinuumProjectState.TRIGGER_SCHEDULED, "test-user" );
-        
-        BuildContext context = controller.initializeBuildContext( projectId2, buildDefinitionId2,
-                                                                  buildTrigger, new ScmResult() );
-        
+
+        BuildContext context = controller.initializeBuildContext( projectId2, buildDefinitionId2, buildTrigger,
+                                                                  new ScmResult() );
+
         String contextTriggeredBy = context.getBuildTrigger().getTriggeredBy();
         assertFalse( "test-user".equals( contextTriggeredBy ) );
         assertEquals( SCHEDULE_NAME, contextTriggeredBy );
@@ -251,15 +250,15 @@ public class DefaultBuildControllerTest
         throws Exception
     {
         File workingDirectory = getTestFile( "target/working-directory" );
-        
+
         if ( !workingDirectory.exists() )
         {
             workingDirectory.mkdir();
         }
-        
+
         return workingDirectory;
     }
-    
+
     private File getWorkingDirectory( Project project )
         throws Exception
     {
@@ -273,23 +272,23 @@ public class DefaultBuildControllerTest
 
         return projectDir;
     }
-    
+
     private void createPomFile( Project project )
         throws Exception
     {
         File pomFile = new File( getWorkingDirectory( project ), "pom.xml" );
-        
+
         BufferedWriter out = new BufferedWriter( new FileWriter( pomFile ) );
         out.write( "<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\">\n" );
+                       "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\">\n" );
         out.write( "<modelVersion>4.0.0</modelVersion>\n" );
         out.write( "<groupId>" + project.getGroupId() + "</groupId>\n" );
         out.write( "<artifactId>" + project.getArtifactId() + "</artifactId>\n" );
         out.write( "<version>" + project.getVersion() + "</version>\n" );
         out.write( "<scm>\n" );
-        out.write( "<connection>" + "scm:local|" + getWorkingDirectory().getAbsolutePath() + 
-                   "|" + project.getId() + "</connection>\n" );
+        out.write( "<connection>" + "scm:local|" + getWorkingDirectory().getAbsolutePath() +
+                       "|" + project.getId() + "</connection>\n" );
         out.write( "</scm>" );
 
         if ( project.getDependencies().size() > 0 )
@@ -311,7 +310,7 @@ public class DefaultBuildControllerTest
 
         out.write( "</project>" );
         out.close();
-        
+
         System.out.println( "pom file created" );
     }
 }

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionServiceTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionServiceTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionServiceTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionServiceTest.java Mon Aug 13 04:29:09 2012
@@ -18,8 +18,6 @@
  */
 package org.apache.maven.continuum.builddefinition;
 
-import java.util.List;
-
 import org.apache.continuum.dao.DaoUtils;
 import org.apache.maven.continuum.AbstractContinuumTest;
 import org.apache.maven.continuum.model.project.BuildDefinition;
@@ -29,6 +27,8 @@ import org.apache.maven.continuum.model.
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.List;
+
 /**
  * @author <a href="mailto:olamy@apache.org">olamy</a>
  * @version $Id$
@@ -72,8 +72,8 @@ public class DefaultBuildDefinitionServi
         buildDefinitionTemplate = new BuildDefinitionTemplate();
         buildDefinitionTemplate.setName( "test" );
         buildDefinitionTemplate = getBuildDefinitionService().addBuildDefinitionTemplate( buildDefinitionTemplate );
-        buildDefinitionTemplate =
-            getBuildDefinitionService().addBuildDefinitionInTemplate( buildDefinitionTemplate, buildDefinition, false );
+        buildDefinitionTemplate = getBuildDefinitionService().addBuildDefinitionInTemplate( buildDefinitionTemplate,
+                                                                                            buildDefinition, false );
 
 
     }
@@ -168,14 +168,14 @@ public class DefaultBuildDefinitionServi
         assertEquals( 5, all.size() );
 
     }
-    
+
     public void testAddDuplicateBuildDefinitionTemplate()
-	      throws Exception
-	  {
-	      BuildDefinitionTemplate template = new BuildDefinitionTemplate();
-	      template.setName( "test" );
-	      
-	      template = getBuildDefinitionService().addBuildDefinitionTemplate( template );
-	      assertNull( template );
-	  }
+        throws Exception
+    {
+        BuildDefinitionTemplate template = new BuildDefinitionTemplate();
+        template.setName( "test" );
+
+        template = getBuildDefinitionService().addBuildDefinitionTemplate( template );
+        assertNull( template );
+    }
 }

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java Mon Aug 13 04:29:09 2012
@@ -134,7 +134,8 @@ public class BuildQueueTest
         throws Exception
     {
         ProjectGroup group = getDefaultProjectGroup();
-        buildQueue.put( new BuildProjectTask( projectId, 0, new BuildTrigger( trigger, "" ), null, null, null, group.getId() ) );
+        buildQueue.put( new BuildProjectTask( projectId, 0, new BuildTrigger( trigger, "" ), null, null, null,
+                                              group.getId() ) );
     }
 
     private void assertNextBuildIs( int expectedProjectId )

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataTest.java Mon Aug 13 04:29:09 2012
@@ -19,9 +19,6 @@ package org.apache.maven.continuum.core.
  * under the License.
  */
 
-import java.util.HashMap;
-import java.util.Map;
-
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorConstants;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildDefinitionTemplate;
@@ -34,9 +31,12 @@ import org.apache.maven.settings.MavenSe
 import org.apache.maven.settings.Settings;
 import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.logging.console.ConsoleLogger;
+import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 import org.jmock.Mock;
 import org.jmock.MockObjectTestCase;
-import org.codehaus.plexus.spring.PlexusInSpringTestCase;
+
+import java.util.HashMap;
+import java.util.Map;
 
 public class CreateProjectsFromMetadataTest
     extends MockObjectTestCase
@@ -52,35 +52,34 @@ public class CreateProjectsFromMetadataT
         result = new ContinuumProjectBuildingResult();
         action = new CreateProjectsFromMetadataAction();
         action.enableLogging( new ConsoleLogger( Logger.LEVEL_DEBUG, "" ) );
-        
+
         recordBuildProjectFromHttp();
     }
-    
+
     private void recordBuildProjectFromHttp()
-            throws Exception
+        throws Exception
     {
         result = new ContinuumProjectBuildingResult();
         Mock projectBuilderManagerMock = mock( ContinuumProjectBuilderManager.class );
-        
-        action.setProjectBuilderManager( (ContinuumProjectBuilderManager) projectBuilderManagerMock.proxy() );        
+
+        action.setProjectBuilderManager( (ContinuumProjectBuilderManager) projectBuilderManagerMock.proxy() );
         action.setUrlValidator( new ContinuumUrlValidator() );
-        
+
         Mock projectBuilder = mock( ContinuumProjectBuilder.class );
-        
-        projectBuilderManagerMock.expects( once() ).method( "getProjectBuilder" )
-            .will( returnValue( projectBuilder.proxy() ) );
-        projectBuilder.expects( once() ).method( "buildProjectsFromMetadata" )
-            .will( returnValue( result ) );
-        projectBuilder.expects( once() ).method( "getDefaultBuildDefinitionTemplate" )
-            .will( returnValue( getDefaultBuildDefinitionTemplate() ) );        
+
+        projectBuilderManagerMock.expects( once() ).method( "getProjectBuilder" ).will( returnValue(
+            projectBuilder.proxy() ) );
+        projectBuilder.expects( once() ).method( "buildProjectsFromMetadata" ).will( returnValue( result ) );
+        projectBuilder.expects( once() ).method( "getDefaultBuildDefinitionTemplate" ).will( returnValue(
+            getDefaultBuildDefinitionTemplate() ) );
     }
-    
+
     private void invokeBuildSettings()
     {
         Mock mavenSettingsBuilderMock = mock( MavenSettingsBuilder.class );
         action.setMavenSettingsBuilder( (MavenSettingsBuilder) mavenSettingsBuilderMock.proxy() );
         mavenSettingsBuilderMock.expects( once() ).method( "buildSettings" ).will( returnValue( new Settings() ) );
-     }
+    }
 
     private BuildDefinitionTemplate getDefaultBuildDefinitionTemplate()
         throws Exception
@@ -102,14 +101,15 @@ public class CreateProjectsFromMetadataT
         return bdt;
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings( "unchecked" )
     public void testExecuteWithNonRecursiveMode()
         throws Exception
     {
-    	invokeBuildSettings();
-    	
+        invokeBuildSettings();
+
         Map<String, Object> context = new HashMap<String, Object>();
-        CreateProjectsFromMetadataAction.setUrl( context, "http://svn.apache.org/repos/asf/maven/continuum/trunk/pom.xml" );
+        CreateProjectsFromMetadataAction.setUrl( context,
+                                                 "http://svn.apache.org/repos/asf/maven/continuum/trunk/pom.xml" );
         CreateProjectsFromMetadataAction.setProjectBuilderId( context, "id" );
         CreateProjectsFromMetadataAction.setLoadRecursiveProject( context, true );
         context.put( CreateProjectsFromMetadataAction.KEY_CHECKOUT_PROJECTS_IN_SINGLE_DIRECTORY, false );
@@ -126,11 +126,12 @@ public class CreateProjectsFromMetadataT
     public void testExecuteWithRecursiveMode()
         throws Exception
     {
-    	invokeBuildSettings();
-    	
+        invokeBuildSettings();
+
         Map<String, Object> context = new HashMap<String, Object>();
-        CreateProjectsFromMetadataAction.setUrl( context, "http://svn.apache.org/repos/asf/maven/archiva/trunk/pom.xml" );
-        CreateProjectsFromMetadataAction.setProjectBuilderId( context,  "id" );
+        CreateProjectsFromMetadataAction.setUrl( context,
+                                                 "http://svn.apache.org/repos/asf/maven/archiva/trunk/pom.xml" );
+        CreateProjectsFromMetadataAction.setProjectBuilderId( context, "id" );
         CreateProjectsFromMetadataAction.setLoadRecursiveProject( context, false );
         context.put( CreateProjectsFromMetadataAction.KEY_CHECKOUT_PROJECTS_IN_SINGLE_DIRECTORY, false );
 
@@ -142,11 +143,11 @@ public class CreateProjectsFromMetadataT
             "Should not have errors but had " + result.getErrorsAsString() + " (this test requires internet access)",
             result.hasErrors() );
     }
-    
-            
+
+
     public void testExecuteWithCheckoutProjectsInSingleDirectory()
         throws Exception
-    {   
+    {
         Project project = new Project();
         project.setGroupId( "org.apache.continuum" );
         project.setArtifactId( "parent-project" );
@@ -154,9 +155,9 @@ public class CreateProjectsFromMetadataT
         project.setId( 6 );
         project.setName( "parent-project" );
         project.setScmUrl( "scm:local:src/test-projects:flat-multi-module/parent-project" );
-        
+
         this.result.addProject( project );
-        
+
         project = new Project();
         project.setGroupId( "org.apache.continuum" );
         project.setArtifactId( "module-a" );
@@ -164,9 +165,9 @@ public class CreateProjectsFromMetadataT
         project.setId( 7 );
         project.setName( "module-a" );
         project.setScmUrl( "scm:local:src/test-projects:flat-multi-module/module-a" );
-        
+
         this.result.addProject( project );
-        
+
         project = new Project();
         project.setGroupId( "org.apache.continuum" );
         project.setArtifactId( "module-b" );
@@ -174,13 +175,13 @@ public class CreateProjectsFromMetadataT
         project.setId( 8 );
         project.setName( "module-b" );
         project.setScmUrl( "scm:local:src/test-projects:flat-multi-module/module-b" );
-        
+
         this.result.addProject( project );
-                        
+
         // assert using scm url set in root!
         Map<String, Object> context = new HashMap<String, Object>();
-        CreateProjectsFromMetadataAction.setUrl( context, "file://" + PlexusInSpringTestCase.getBasedir()
-            + "/src/test-projects/flat-multi-module/parent-project/pom.xml" );
+        CreateProjectsFromMetadataAction.setUrl( context, "file://" + PlexusInSpringTestCase.getBasedir() +
+            "/src/test-projects/flat-multi-module/parent-project/pom.xml" );
         CreateProjectsFromMetadataAction.setProjectBuilderId( context, "id" );
         CreateProjectsFromMetadataAction.setLoadRecursiveProject( context, true );
         context.put( CreateProjectsFromMetadataAction.KEY_CHECKOUT_PROJECTS_IN_SINGLE_DIRECTORY, true );
@@ -193,14 +194,15 @@ public class CreateProjectsFromMetadataT
             "Should not have errors but had " + result.getErrorsAsString() + " (this test requires internet access)",
             result.hasErrors() );
         assertEquals( "Incorrect SCM Root Url for flat multi-module project.",
-                      "scm:local:src/test-projects:flat-multi-module/", AbstractContinuumAction.getProjectScmRootUrl( context, "" ) );
+                      "scm:local:src/test-projects:flat-multi-module/", AbstractContinuumAction.getProjectScmRootUrl(
+            context, "" ) );
     }
 
     public void testExecuteFlatMultiModuleProjectThatStartsWithTheSameLetter()
         throws Exception
     {
-    	invokeBuildSettings();
-    	
+        invokeBuildSettings();
+
         Project project = new Project();
         project.setGroupId( "com.example.flat" );
         project.setArtifactId( "flat-parent" );
@@ -234,9 +236,9 @@ public class CreateProjectsFromMetadataT
         Map<String, Object> context = new HashMap<String, Object>();
         CreateProjectsFromMetadataAction.setUrl( context,
                                                  "http://svn.apache.org/repos/asf/continuum/sandbox/flat-example/flat-parent/pom.xml" );
-        CreateProjectsFromMetadataAction.setProjectBuilderId( context,  "id" );
+        CreateProjectsFromMetadataAction.setProjectBuilderId( context, "id" );
         CreateProjectsFromMetadataAction.setLoadRecursiveProject( context, true );
-	    context.put( CreateProjectsFromMetadataAction.KEY_CHECKOUT_PROJECTS_IN_SINGLE_DIRECTORY, false );
+        context.put( CreateProjectsFromMetadataAction.KEY_CHECKOUT_PROJECTS_IN_SINGLE_DIRECTORY, false );
 
         action.execute( context );
 
@@ -246,8 +248,8 @@ public class CreateProjectsFromMetadataT
             "Should not have errors but had " + result.getErrorsAsString() + " (this test requires internet access)",
             result.hasErrors() );
 
-        assertEquals(
-            "Wrong scm root url created", "scm:svn:http://svn.apache.org/repos/asf/continuum/sandbox/flat-example/",
-            AbstractContinuumAction.getProjectScmRootUrl( context, null ) );
+        assertEquals( "Wrong scm root url created",
+                      "scm:svn:http://svn.apache.org/repos/asf/continuum/sandbox/flat-example/",
+                      AbstractContinuumAction.getProjectScmRootUrl( context, null ) );
     }
 }

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorTest.java Mon Aug 13 04:29:09 2012
@@ -19,11 +19,7 @@ package org.apache.maven.continuum.execu
  * under the License.
  */
 
-import java.io.File;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
+import junit.framework.TestCase;
 import org.apache.continuum.utils.shell.ExecutionResult;
 import org.apache.continuum.utils.shell.ShellCommandHelper;
 import org.apache.maven.continuum.configuration.ConfigurationService;
@@ -36,7 +32,10 @@ import org.apache.maven.continuum.utils.
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 
-import junit.framework.TestCase;
+import java.io.File;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 public class ContinuumBuildExecutorTest
     extends TestCase
@@ -109,7 +108,8 @@ public class ContinuumBuildExecutorTest
                 one( helper ).executeShellCommand( chrootJailFile, "sudo", toSystemPath( cmd ), output, project.getId(),
                                                    environments );
                 will( returnValue( result ) );
-            }} );
+            }
+        } );
 
         executor.executeShellCommand( project, executable, arguments, output, environments, null, null );
 
@@ -138,7 +138,8 @@ public class ContinuumBuildExecutorTest
             return null;
         }
 
-        public ContinuumBuildExecutionResult build( Project project, BuildDefinition buildDefinition, File buildOutput, List<Project> projectsWithCommonScmRoot, String projectScmRootUrl )
+        public ContinuumBuildExecutionResult build( Project project, BuildDefinition buildDefinition, File buildOutput,
+                                                    List<Project> projectsWithCommonScmRoot, String projectScmRootUrl )
             throws ContinuumBuildExecutorException
         {
             // TODO Auto-generated method stub

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManagerTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManagerTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManagerTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManagerTest.java Mon Aug 13 04:29:09 2012
@@ -46,8 +46,8 @@ public class DefaultBuildExecutorManager
     public void testMavenTwoBuildExecutorDependencyInjection()
         throws Exception
     {
-        MavenTwoBuildExecutor executor =
-            (MavenTwoBuildExecutor) builderManager.getBuildExecutor( MavenTwoBuildExecutor.ID );
+        MavenTwoBuildExecutor executor = (MavenTwoBuildExecutor) builderManager.getBuildExecutor(
+            MavenTwoBuildExecutor.ID );
 
         assertCommonFields( executor );
         assertNotNull( executor.getBuilderHelper() );
@@ -58,8 +58,8 @@ public class DefaultBuildExecutorManager
     public void testMavenOneBuildExecutorDependencyInjection()
         throws Exception
     {
-        MavenOneBuildExecutor executor =
-            (MavenOneBuildExecutor) builderManager.getBuildExecutor( MavenOneBuildExecutor.ID );
+        MavenOneBuildExecutor executor = (MavenOneBuildExecutor) builderManager.getBuildExecutor(
+            MavenOneBuildExecutor.ID );
 
         assertCommonFields( executor );
         assertNotNull( executor.getMetadataHelper() );

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java Mon Aug 13 04:29:09 2012
@@ -19,17 +19,17 @@ package org.apache.maven.continuum.execu
  * under the License.
  */
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
 import org.apache.maven.continuum.AbstractContinuumTest;
 import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.codehaus.plexus.util.FileUtils;
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutorTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutorTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutorTest.java Mon Aug 13 04:29:09 2012
@@ -19,10 +19,6 @@ package org.apache.maven.continuum.execu
  * under the License.
  */
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.maven.continuum.AbstractContinuumTest;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.model.project.BuildDefinition;
@@ -30,16 +26,20 @@ import org.apache.maven.continuum.model.
 import org.apache.maven.continuum.model.scm.ChangeFile;
 import org.apache.maven.continuum.model.scm.ChangeSet;
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * @author olamy
- * @since 1.2.3
  * @version $Id$
+ * @since 1.2.3
  */
 public class MavenTwoBuildExecutorTest
     extends AbstractContinuumTest
 {
-       
-    
+
+
     @Override
     protected String getSpringConfigLocation()
     {
@@ -52,15 +52,16 @@ public class MavenTwoBuildExecutorTest
         MavenTwoBuildExecutor executor = (MavenTwoBuildExecutor) lookup( ContinuumBuildExecutor.class, "maven2" );
         BuildDefinition buildDefinition = new BuildDefinition();
         buildDefinition.setArguments( "-N" );
-        Project continuumProject = new Project(){
+        Project continuumProject = new Project()
+        {
             {
                 setVersion( "1.0.3" );
             }
         };
-        assertFalse( executor.shouldBuild( new ArrayList<ChangeSet>(), continuumProject, new File( "target/test-classes/projects/continuum" ),
-                                           buildDefinition ) );
+        assertFalse( executor.shouldBuild( new ArrayList<ChangeSet>(), continuumProject, new File(
+            "target/test-classes/projects/continuum" ), buildDefinition ) );
     }
-    
+
     public void testShouldNotBuildNonRecursiveChangeInAModule()
         throws Exception
     {
@@ -74,7 +75,7 @@ public class MavenTwoBuildExecutorTest
             }
         };
         final ChangeFile changeFile = new ChangeFile();
-        changeFile.setName( "continuum-notifiers/pom.xml");
+        changeFile.setName( "continuum-notifiers/pom.xml" );
         ChangeSet changeSet = new ChangeSet()
         {
             {
@@ -83,10 +84,10 @@ public class MavenTwoBuildExecutorTest
         };
         List<ChangeSet> changeSets = new ArrayList<ChangeSet>();
         changeSets.add( changeSet );
-        assertFalse( executor.shouldBuild(changeSets , continuumProject,
-                                           new File( "target/test-classes/projects/continuum" ), buildDefinition ) );
-    }    
-    
+        assertFalse( executor.shouldBuild( changeSets, continuumProject, new File(
+            "target/test-classes/projects/continuum" ), buildDefinition ) );
+    }
+
     public void testShouldBuildRecursiveChangeInAModule()
         throws Exception
     {
@@ -109,7 +110,7 @@ public class MavenTwoBuildExecutorTest
         };
         List<ChangeSet> changeSets = new ArrayList<ChangeSet>();
         changeSets.add( changeSet );
-        assertTrue( executor.shouldBuild( changeSets, continuumProject,
-                                          new File( "target/test-classes/projects/continuum" ), buildDefinition ) );
-    }       
+        assertTrue( executor.shouldBuild( changeSets, continuumProject, new File(
+            "target/test-classes/projects/continuum" ), buildDefinition ) );
+    }
 }

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m2/TestMavenBuilderHelper.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m2/TestMavenBuilderHelper.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m2/TestMavenBuilderHelper.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m2/TestMavenBuilderHelper.java Mon Aug 13 04:29:09 2012
@@ -18,8 +18,6 @@
  */
 package org.apache.maven.continuum.execution.maven.m2;
 
-import java.io.File;
-
 import org.apache.maven.continuum.AbstractContinuumTest;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.apache.maven.project.MavenProject;
@@ -27,6 +25,8 @@ import org.codehaus.plexus.util.StringUt
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+
 /**
  * @author <a href="mailto:olamy@apache.org">olamy</a>
  * @version $Id$

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializerTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializerTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializerTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializerTest.java Mon Aug 13 04:29:09 2012
@@ -38,8 +38,8 @@ public class DefaultContinuumInitializer
         super.setUp();
         DaoUtils daoUtils = (DaoUtils) lookup( DaoUtils.class.getName() );
         daoUtils.eraseDatabase();
-        ContinuumInitializer continuumInitializer =
-            (ContinuumInitializer) lookup( ContinuumInitializer.ROLE, "default" );
+        ContinuumInitializer continuumInitializer = (ContinuumInitializer) lookup( ContinuumInitializer.ROLE,
+                                                                                   "default" );
         continuumInitializer.initialize();
     }
 

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java Mon Aug 13 04:29:09 2012
@@ -45,8 +45,8 @@ public class ContinuumNotificationDispat
     public void testNotificationDispatcher()
         throws Exception
     {
-        ContinuumNotificationDispatcher notificationDispatcher =
-            (ContinuumNotificationDispatcher) lookup( ContinuumNotificationDispatcher.ROLE );
+        ContinuumNotificationDispatcher notificationDispatcher = (ContinuumNotificationDispatcher) lookup(
+            ContinuumNotificationDispatcher.ROLE );
 
         Project project = addProject( "Notification Dispatcher Test Project" );
 

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java Mon Aug 13 04:29:09 2012
@@ -19,16 +19,6 @@ package org.apache.maven.continuum.notif
  * under the License.
  */
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.mail.Address;
-import javax.mail.internet.InternetAddress;
-import javax.mail.internet.MimeMessage;
-import javax.mail.internet.MimeMessage.RecipientType;
-
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.dao.BuildResultDao;
 import org.apache.continuum.notification.mail.MockJavaMailSender;
@@ -46,6 +36,15 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.mail.javamail.JavaMailSender;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.mail.Address;
+import javax.mail.internet.InternetAddress;
+import javax.mail.internet.MimeMessage;
+import javax.mail.internet.MimeMessage.RecipientType;
+
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -95,8 +94,8 @@ public class MailContinuumNotifierTest
         build = brDao.getLatestBuildResultForProjectWithDetails( project.getId() );
         assertEquals( ContinuumProjectState.OK, build.getState() );
 
-        MimeMessage mailMessage =
-            sendNotificationAndGetMessage( project, build, buildDef, "lots out build output", toOverride );
+        MimeMessage mailMessage = sendNotificationAndGetMessage( project, build, buildDef, "lots out build output",
+                                                                 toOverride );
 
         assertEquals( "[continuum] BUILD SUCCESSFUL: foo.bar Test Project", mailMessage.getSubject() );
 
@@ -158,10 +157,10 @@ public class MailContinuumNotifierTest
         {
             assertEquals( "foo@bar", ( (InternetAddress) tos[0] ).getAddress() );
         }
-        assertTrue( "The template isn't loaded correctly.",
-                    ( (String) mailMessage.getContent() ).indexOf( "#shellBuildResult()" ) < 0 );
-        assertTrue( "The template isn't loaded correctly.",
-                    ( (String) mailMessage.getContent() ).indexOf( "Build statistics" ) > 0 );
+        assertTrue( "The template isn't loaded correctly.", ( (String) mailMessage.getContent() ).indexOf(
+            "#shellBuildResult()" ) < 0 );
+        assertTrue( "The template isn't loaded correctly.", ( (String) mailMessage.getContent() ).indexOf(
+            "Build statistics" ) > 0 );
 
         String mailContent = (String) mailMessage.getContent();
 

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilderTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilderTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilderTest.java Mon Aug 13 04:29:09 2012
@@ -19,12 +19,11 @@ package org.apache.maven.continuum.proje
  * under the License.
  */
 
-import java.net.URL;
-
 import junit.framework.TestCase;
-
 import org.apache.maven.continuum.model.project.BuildDefinitionTemplate;
 
+import java.net.URL;
+
 /**
  * Test for {@link AbstractContinuumProjectBuilder}
  *
@@ -69,7 +68,8 @@ public abstract class AbstractContinuumP
         }
 
         public ContinuumProjectBuildingResult buildProjectsFromMetadata( URL url, String username, String password,
-        					boolean recursiveProjects, boolean checkoutInSingleDirectory )
+                                                                         boolean recursiveProjects,
+                                                                         boolean checkoutInSingleDirectory )
             throws ContinuumProjectBuilderException
         {
             return null;
@@ -77,7 +77,8 @@ public abstract class AbstractContinuumP
 
         public ContinuumProjectBuildingResult buildProjectsFromMetadata( URL url, String username, String password,
                                                                          boolean recursiveProjects,
-                                                                         BuildDefinitionTemplate buildDefinitionTemplate, boolean checkoutInSingleDirectory )
+                                                                         BuildDefinitionTemplate buildDefinitionTemplate,
+                                                                         boolean checkoutInSingleDirectory )
             throws ContinuumProjectBuilderException
         {
             return null;

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java Mon Aug 13 04:29:09 2012
@@ -39,8 +39,8 @@ public class MavenOneContinuumProjectBui
     public void testBuildingAProjectFromMetadataWithACompleteMaven1Pom()
         throws Exception
     {
-        ContinuumProjectBuilder projectBuilder =
-            (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenOneContinuumProjectBuilder.ID );
+        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
+                                                                                   MavenOneContinuumProjectBuilder.ID );
 
         BuildDefinition bd = new BuildDefinition();
 
@@ -62,8 +62,8 @@ public class MavenOneContinuumProjectBui
         bdt = service.addBuildDefinitionTemplate( bdt );
         bdt = service.addBuildDefinitionInTemplate( bdt, bd, false );
 
-        ContinuumProjectBuildingResult result = projectBuilder.buildProjectsFromMetadata(
-        		getTestFile( "src/test/resources/projects/maven-1.pom.xml" ).toURL(), null, null, false, bdt, false );
+        ContinuumProjectBuildingResult result = projectBuilder.buildProjectsFromMetadata( getTestFile(
+            "src/test/resources/projects/maven-1.pom.xml" ).toURL(), null, null, false, bdt, false );
 
         assertOnResult( result );
 
@@ -72,14 +72,15 @@ public class MavenOneContinuumProjectBui
     public void testBuildingAProjectFromMetadataWithACompleteMaven1PomWithDefaultBuildDef()
         throws Exception
     {
-        ContinuumProjectBuilder projectBuilder =
-            (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenOneContinuumProjectBuilder.ID );
+        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
+                                                                                   MavenOneContinuumProjectBuilder.ID );
 
         BuildDefinitionService service = (BuildDefinitionService) lookup( BuildDefinitionService.class );
 
-        ContinuumProjectBuildingResult result = projectBuilder.buildProjectsFromMetadata(
-            getTestFile( "src/test/resources/projects/maven-1.pom.xml" ).toURL(), null, null, false,
-            service.getDefaultMavenOneBuildDefinitionTemplate(), false );
+        ContinuumProjectBuildingResult result = projectBuilder.buildProjectsFromMetadata( getTestFile(
+            "src/test/resources/projects/maven-1.pom.xml" ).toURL(), null, null, false,
+                                                                                          service.getDefaultMavenOneBuildDefinitionTemplate(),
+                                                                                          false );
 
         assertOnResult( result );
 

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java (original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java Mon Aug 13 04:29:09 2012
@@ -19,12 +19,6 @@ package org.apache.maven.continuum.proje
  * under the License.
  */
 
-import java.io.File;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.maven.continuum.AbstractContinuumTest;
 import org.apache.maven.continuum.builddefinition.BuildDefinitionService;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorConstants;
@@ -39,7 +33,12 @@ import org.apache.maven.continuum.projec
 import org.codehaus.plexus.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.codehaus.plexus.spring.PlexusInSpringTestCase;
+
+import java.io.File;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -53,8 +52,8 @@ public class MavenTwoContinuumProjectBui
     public void testGetEmailAddressWhenTypeIsSetToEmail()
         throws Exception
     {
-        ContinuumProjectBuilder projectBuilder =
-            (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
+        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
+                                                                                   MavenTwoContinuumProjectBuilder.ID );
 
         File pom = getTestFile( "src/test/repository/maven-builder-helper-1.xml" );
 
@@ -94,8 +93,8 @@ public class MavenTwoContinuumProjectBui
     public void testGetEmailAddressWhenTypeIsntSet()
         throws Exception
     {
-        ContinuumProjectBuilder projectBuilder =
-            (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
+        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
+                                                                                   MavenTwoContinuumProjectBuilder.ID );
 
         File pom = getTestFile( "src/test/repository/maven-builder-helper-2.xml" );
 
@@ -135,8 +134,8 @@ public class MavenTwoContinuumProjectBui
     public void testGetScmUrlWithParams()
         throws Exception
     {
-        ContinuumProjectBuilder projectBuilder =
-            (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
+        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
+                                                                                   MavenTwoContinuumProjectBuilder.ID );
 
         File pom = getTestFile( "src/test/repository/maven-builder-helper-3.xml" );
 
@@ -168,8 +167,8 @@ public class MavenTwoContinuumProjectBui
     public void testCreateProjectsWithModules()
         throws Exception
     {
-        ContinuumProjectBuilder projectBuilder =
-            (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
+        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
+                                                                                   MavenTwoContinuumProjectBuilder.ID );
 
         URL url = getClass().getClassLoader().getResource( "projects/continuum/pom.xml" );
 
@@ -236,11 +235,11 @@ public class MavenTwoContinuumProjectBui
         assertMavenTwoProject( "Continuum IRC Notifier", projects );
         assertMavenTwoProject( "Continuum Jabber Notifier", projects );
 
-        assertEquals( "continuum-parent-notifiers",
-                      ( projects.get( "Continuum IRC Notifier" ) ).getParent().getArtifactId() );
+        assertEquals( "continuum-parent-notifiers", ( projects.get(
+            "Continuum IRC Notifier" ) ).getParent().getArtifactId() );
 
-        assertEquals( "continuum-parent-notifiers",
-                      ( projects.get( "Continuum Jabber Notifier" ) ).getParent().getArtifactId() );
+        assertEquals( "continuum-parent-notifiers", ( projects.get(
+            "Continuum Jabber Notifier" ) ).getParent().getArtifactId() );
 
         assertDependency( "Continuum Model", "Continuum Web", projects );
     }
@@ -248,8 +247,8 @@ public class MavenTwoContinuumProjectBui
     public void testCreateProjectsWithModuleswithParentPomIsntPomXml()
         throws Exception
     {
-        ContinuumProjectBuilder projectBuilder =
-            (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
+        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
+                                                                                   MavenTwoContinuumProjectBuilder.ID );
 
         URL url = getClass().getClassLoader().getResource( "projects/continuum/pom_ci.xml" );
 
@@ -314,11 +313,11 @@ public class MavenTwoContinuumProjectBui
         assertMavenTwoProject( "Continuum IRC Notifier", projects );
         assertMavenTwoProject( "Continuum Jabber Notifier", projects );
 
-        assertEquals( "continuum-parent-notifiers",
-                      ( projects.get( "Continuum IRC Notifier" ) ).getParent().getArtifactId() );
+        assertEquals( "continuum-parent-notifiers", ( projects.get(
+            "Continuum IRC Notifier" ) ).getParent().getArtifactId() );
 
-        assertEquals( "continuum-parent-notifiers",
-                      ( projects.get( "Continuum Jabber Notifier" ) ).getParent().getArtifactId() );
+        assertEquals( "continuum-parent-notifiers", ( projects.get(
+            "Continuum Jabber Notifier" ) ).getParent().getArtifactId() );
 
         assertDependency( "Continuum Model", "Continuum Web", projects );
     }
@@ -327,8 +326,8 @@ public class MavenTwoContinuumProjectBui
         throws Exception
     {
 
-        ContinuumProjectBuilder projectBuilder =
-            (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
+        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
+                                                                                   MavenTwoContinuumProjectBuilder.ID );
 
         URL url = getClass().getClassLoader().getResource( "projects/continuum/continuum-core/pom.xml" );
 
@@ -391,61 +390,61 @@ public class MavenTwoContinuumProjectBui
 
         assertEquals( 0, projectGroup.getProjects().size() );
     }
-    
-	public void testCreateProjectWithFlatStructure()
-	    throws Exception
-	{
-	    ContinuumProjectBuilder projectBuilder =
-	        (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
-	
-	    URL url = getTestFile( "/src/test-projects/flat-multi-module/parent-project/pom.xml" ).toURL();
-	
-	    ContinuumProjectBuildingResult result = projectBuilder.buildProjectsFromMetadata( url, null, null, true, true );
-	    
-	    Project rootProject = result.getRootProject();
-	    assertEquals( "Incorrect root project", "parent-project", rootProject.getArtifactId() );
-	    
-	    List<Project> projects = result.getProjects();
-	    for( Project project : projects )
-	    {
-	        if( project.getName().equals( "parent-project" ) )
-	        {
-	            assertEquals( "Incorrect scm url for parent-project",
-	                          "scm:local:src/test-projects:flat-multi-module/parent-project", project.getScmUrl() );
-	        }
-	        else if( project.getName().equals( "module-a" ) )
-	        {
-	            assertEquals( "Incorrect scm url for parent-project",
-	                          "scm:local:src/test-projects:flat-multi-module/module-a", project.getScmUrl() );
-	        }
-	        else if ( project.getName().equals( "module-b" ) )
-	        {
-	            assertEquals( "Incorrect scm url for parent-project",
-	                          "scm:local:src/test-projects:flat-multi-module/module-b", project.getScmUrl() );
-	        }
-	        else if ( project.getName().equals( "module-d" ) )
-	        {
-	            assertEquals( "Incorrect scm url for module-d",
-	                          "scm:local:src/test-projects:flat-multi-module/module-c/module-d", project.getScmUrl() );
-	        }
-	        else
-	        {
-	            fail( "Unknown project: " + project.getName() );
-	        }
-	    }
-	}
+
+    public void testCreateProjectWithFlatStructure()
+        throws Exception
+    {
+        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
+                                                                                   MavenTwoContinuumProjectBuilder.ID );
+
+        URL url = getTestFile( "/src/test-projects/flat-multi-module/parent-project/pom.xml" ).toURL();
+
+        ContinuumProjectBuildingResult result = projectBuilder.buildProjectsFromMetadata( url, null, null, true, true );
+
+        Project rootProject = result.getRootProject();
+        assertEquals( "Incorrect root project", "parent-project", rootProject.getArtifactId() );
+
+        List<Project> projects = result.getProjects();
+        for ( Project project : projects )
+        {
+            if ( project.getName().equals( "parent-project" ) )
+            {
+                assertEquals( "Incorrect scm url for parent-project",
+                              "scm:local:src/test-projects:flat-multi-module/parent-project", project.getScmUrl() );
+            }
+            else if ( project.getName().equals( "module-a" ) )
+            {
+                assertEquals( "Incorrect scm url for parent-project",
+                              "scm:local:src/test-projects:flat-multi-module/module-a", project.getScmUrl() );
+            }
+            else if ( project.getName().equals( "module-b" ) )
+            {
+                assertEquals( "Incorrect scm url for parent-project",
+                              "scm:local:src/test-projects:flat-multi-module/module-b", project.getScmUrl() );
+            }
+            else if ( project.getName().equals( "module-d" ) )
+            {
+                assertEquals( "Incorrect scm url for module-d",
+                              "scm:local:src/test-projects:flat-multi-module/module-c/module-d", project.getScmUrl() );
+            }
+            else
+            {
+                fail( "Unknown project: " + project.getName() );
+            }
+        }
+    }
 
     // CONTINUUM-2563
     public void testCreateMultiModuleProjectLoadRecursiveProjectsIsFalse()
         throws Exception
     {
-        ContinuumProjectBuilder projectBuilder =
-            (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
+        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
+                                                                                   MavenTwoContinuumProjectBuilder.ID );
 
         URL url = getClass().getClassLoader().getResource( "projects/continuum/pom.xml" );
 
-        ContinuumProjectBuildingResult result =
-            projectBuilder.buildProjectsFromMetadata( url, null, null, false, false );
+        ContinuumProjectBuildingResult result = projectBuilder.buildProjectsFromMetadata( url, null, null, false,
+                                                                                          false );
 
         assertNotNull( result );
 



Mime
View raw message