continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1372260 [6/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/ap...
Date Mon, 13 Aug 2012 04:29:28 GMT
Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/manager/BuildAgentPurgeManagerTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/manager/BuildAgentPurgeManagerTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/manager/BuildAgentPurgeManagerTest.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/manager/BuildAgentPurgeManagerTest.java Mon Aug 13 04:29:09 2012
@@ -19,15 +19,7 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.io.File;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-
 import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.comparator.LastModifiedFileComparator;
 import org.apache.continuum.buildagent.configuration.BuildAgentConfigurationService;
 import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 import org.jmock.Expectations;
@@ -35,7 +27,12 @@ import org.jmock.Mockery;
 import org.jmock.integration.junit3.JUnit3Mockery;
 import org.jmock.lib.legacy.ClassImposteriser;
 
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
 import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
 
 /**
  * For CONTINUUM-2658 tests, Support purging of working and release directories of build agents on a schedule
@@ -44,27 +41,27 @@ public class BuildAgentPurgeManagerTest
     extends PlexusInSpringTestCase
 {
     private static final int DAYS_OLD = 2;
-    
+
     private static final int RELEASES_COUNT = 5;
-    
+
     private static final int RELEASES_DAYS_OLD_COUNT = 3;
-    
+
     private static final int WORKING_COUNT = 10;
-    
+
     private static final int WORKING_DAYS_OLD_COUNT = 9;
-    
+
     private static final String DIRECTORY_TYPE_RELEASES = "releases";
-    
+
     private static final String DIRECTORY_TYPE_WORKING = "working";
-    
+
     private Mockery context;
 
     private BuildAgentConfigurationService buildAgentConfigurationService;
 
     private DefaultBuildAgentPurgeManager purgeManager;
-    
+
     private File tempDir;
-    
+
     protected void setUp()
         throws Exception
     {
@@ -78,7 +75,7 @@ public class BuildAgentPurgeManagerTest
         buildAgentConfigurationService = context.mock( BuildAgentConfigurationService.class );
 
         purgeManager.setBuildAgentConfigurationService( buildAgentConfigurationService );
-        
+
         createTestDirectoriesAndFiles();
     }
 
@@ -97,10 +94,10 @@ public class BuildAgentPurgeManagerTest
         context.checking( new Expectations()
         {
             {
-                one( buildAgentConfigurationService ).getWorkingDirectory( );
+                one( buildAgentConfigurationService ).getWorkingDirectory();
                 will( returnValue( tempDir ) );
-                
-                one( buildAgentConfigurationService ).getWorkingDirectory( );
+
+                one( buildAgentConfigurationService ).getWorkingDirectory();
                 will( returnValue( tempDir ) );
             }
         } );
@@ -108,29 +105,30 @@ public class BuildAgentPurgeManagerTest
         //confirm current content of directory
         //2 random files
         assertEquals( RELEASES_COUNT + WORKING_COUNT + 2, tempDir.list().length );
-        
+
         purgeManager.executeDirectoryPurge( DIRECTORY_TYPE_WORKING, 1, 1, true );
-        
+
         //confirm current content of directory
         //working directories deleted
         assertEquals( RELEASES_COUNT + 2, tempDir.list().length );
-        
+
         purgeManager.executeDirectoryPurge( DIRECTORY_TYPE_RELEASES, 1, 1, true );
-        
+
         //confirm current content of directory
         //releases directories deleted
         assertEquals( 2, tempDir.list().length );
-    }    
-    
-    public void testRetentionOnlyPurge() throws Exception
+    }
+
+    public void testRetentionOnlyPurge()
+        throws Exception
     {
         context.checking( new Expectations()
         {
             {
-                one( buildAgentConfigurationService ).getWorkingDirectory( );
+                one( buildAgentConfigurationService ).getWorkingDirectory();
                 will( returnValue( tempDir ) );
-                
-                one( buildAgentConfigurationService ).getWorkingDirectory( );
+
+                one( buildAgentConfigurationService ).getWorkingDirectory();
                 will( returnValue( tempDir ) );
             }
         } );
@@ -138,35 +136,36 @@ public class BuildAgentPurgeManagerTest
         //confirm current content of directory
         //2 random files
         assertEquals( RELEASES_COUNT + WORKING_COUNT + 2, tempDir.list().length );
-        
+
         purgeManager.executeDirectoryPurge( DIRECTORY_TYPE_WORKING, 0, 2, false );
-        
+
         List<String> fileNames = Arrays.asList( tempDir.list() );
-        
-        File[] files =  tempDir.listFiles() ;
-        
+
+        File[] files = tempDir.listFiles();
+
         //confirm current content of directory
         //2 working directories left
         assertEquals( RELEASES_COUNT + 2 + 2, fileNames.size() );
-        
+
         purgeManager.executeDirectoryPurge( DIRECTORY_TYPE_RELEASES, 0, 4, false );
-        
+
         fileNames = Arrays.asList( tempDir.list() );
-        
+
         //confirm current content of directory
         //4 releases directories left
         assertEquals( 4 + 2 + 2, fileNames.size() );
     }
 
-    public void testDaysOldOnlyPurge() throws Exception
+    public void testDaysOldOnlyPurge()
+        throws Exception
     {
         context.checking( new Expectations()
         {
             {
-                one( buildAgentConfigurationService ).getWorkingDirectory( );
+                one( buildAgentConfigurationService ).getWorkingDirectory();
                 will( returnValue( tempDir ) );
-                
-                one( buildAgentConfigurationService ).getWorkingDirectory( );
+
+                one( buildAgentConfigurationService ).getWorkingDirectory();
                 will( returnValue( tempDir ) );
             }
         } );
@@ -174,33 +173,35 @@ public class BuildAgentPurgeManagerTest
         //confirm current content of directory
         //2 random files
         assertEquals( RELEASES_COUNT + WORKING_COUNT + 2, tempDir.list().length );
-        
+
         purgeManager.executeDirectoryPurge( DIRECTORY_TYPE_WORKING, 1, 0, false );
-        
+
         List<String> fileNames = Arrays.asList( tempDir.list() );
-        
+
         //confirm current content of directory
         //days old directories are deleted
         assertEquals( RELEASES_COUNT + ( WORKING_COUNT - WORKING_DAYS_OLD_COUNT ) + 2, fileNames.size() );
-        
+
         purgeManager.executeDirectoryPurge( DIRECTORY_TYPE_RELEASES, 1, 0, false );
-        
+
         fileNames = Arrays.asList( tempDir.list() );
-        
+
         //confirm current content of directory
         //days old directories are deleted
-        assertEquals( ( RELEASES_COUNT - RELEASES_DAYS_OLD_COUNT ) + ( WORKING_COUNT - WORKING_DAYS_OLD_COUNT ) + 2, fileNames.size() );
+        assertEquals( ( RELEASES_COUNT - RELEASES_DAYS_OLD_COUNT ) + ( WORKING_COUNT - WORKING_DAYS_OLD_COUNT ) + 2,
+                      fileNames.size() );
     }
 
-    public void testRetentionAndDaysOldOnlyPurge() throws Exception
+    public void testRetentionAndDaysOldOnlyPurge()
+        throws Exception
     {
         context.checking( new Expectations()
         {
             {
-                one( buildAgentConfigurationService ).getWorkingDirectory( );
+                one( buildAgentConfigurationService ).getWorkingDirectory();
                 will( returnValue( tempDir ) );
-                
-                one( buildAgentConfigurationService ).getWorkingDirectory( );
+
+                one( buildAgentConfigurationService ).getWorkingDirectory();
                 will( returnValue( tempDir ) );
             }
         } );
@@ -208,45 +209,50 @@ public class BuildAgentPurgeManagerTest
         //confirm current content of directory
         //2 random files
         assertEquals( RELEASES_COUNT + WORKING_COUNT + 2, tempDir.list().length );
-        
+
         purgeManager.executeDirectoryPurge( DIRECTORY_TYPE_WORKING, 1, 5, false );
-        
+
         List<String> fileNames = Arrays.asList( tempDir.list() );
-        
+
         //confirm current content of directory
         //days old directories are deleted
         assertEquals( RELEASES_COUNT + Math.max( 5, WORKING_COUNT - WORKING_DAYS_OLD_COUNT ) + 2, fileNames.size() );
-        
+
         purgeManager.executeDirectoryPurge( DIRECTORY_TYPE_RELEASES, 1, 1, false );
-        
+
         fileNames = Arrays.asList( tempDir.list() );
-        
+
         //confirm current content of directory
         //days old directories are deleted
-        assertEquals( Math.max( 1, RELEASES_COUNT - RELEASES_DAYS_OLD_COUNT ) + Math.max( 5, WORKING_COUNT - WORKING_DAYS_OLD_COUNT ) + 2, fileNames.size() );
+        assertEquals( Math.max( 1, RELEASES_COUNT - RELEASES_DAYS_OLD_COUNT ) + Math.max( 5, WORKING_COUNT -
+            WORKING_DAYS_OLD_COUNT ) + 2, fileNames.size() );
     }
-    
-    private void createTestDirectoriesAndFiles() throws Exception
+
+    private void createTestDirectoriesAndFiles()
+        throws Exception
     {
         SimpleDateFormat format = new SimpleDateFormat( "yyyyMMddHHmmss" );
-        tempDir = new File( System.getProperty( "java.io.tmpdir" ) + System.getProperty( "file.separator" ) + format.format( new Date() ) );
+        tempDir = new File( System.getProperty( "java.io.tmpdir" ) + System.getProperty( "file.separator" ) +
+                                format.format( new Date() ) );
         if ( !tempDir.mkdirs() )
         {
             throw new IOException( "Unable to create test directory: " + tempDir.getName() );
         }
-        
+
         createReleasesDirectories( tempDir, RELEASES_COUNT, DAYS_OLD, RELEASES_DAYS_OLD_COUNT );
         createWorkingDirectories( tempDir, WORKING_COUNT, DAYS_OLD, WORKING_DAYS_OLD_COUNT );
         createRandomFile( tempDir, "random.txt" );
         createRandomFile( tempDir, "releases-random.txt" );
     }
-    
-    private void createReleasesDirectories( File parentDir, int count, int daysOld, int daysOldCount ) throws Exception
-    {   
+
+    private void createReleasesDirectories( File parentDir, int count, int daysOld, int daysOldCount )
+        throws Exception
+    {
         int daysOldIndex = 0;
         for ( int x = 1; x <= count; x++ )
         {
-            File file = new File( tempDir.getAbsolutePath() + System.getProperty( "file.separator" ) + "releases-" + x  );
+            File file = new File( tempDir.getAbsolutePath() + System.getProperty( "file.separator" ) + "releases-" +
+                                      x );
             if ( !file.mkdirs() )
             {
                 throw new IOException( "Unable to create test directory: " + file.getName() );
@@ -257,11 +263,12 @@ public class BuildAgentPurgeManagerTest
                 file.setLastModified( daysOldTime );
                 daysOldIndex++;
             }
-            
+
         }
     }
-    
-    private void createWorkingDirectories( File parentDir, int count, int daysOld, int daysOldCount ) throws Exception
+
+    private void createWorkingDirectories( File parentDir, int count, int daysOld, int daysOldCount )
+        throws Exception
     {
         int daysOldIndex = 0;
         for ( int x = 1; x <= count; x++ )
@@ -277,11 +284,12 @@ public class BuildAgentPurgeManagerTest
                 file.setLastModified( daysOldTime );
                 daysOldIndex++;
             }
-            
+
         }
     }
-    
-    private File createRandomFile( File parentDir, String fileName ) throws IOException
+
+    private File createRandomFile( File parentDir, String fileName )
+        throws IOException
     {
         File randomFile = new File( parentDir.getAbsolutePath() + System.getProperty( "file.separator" ) + fileName );
         if ( !randomFile.exists() )
@@ -290,8 +298,9 @@ public class BuildAgentPurgeManagerTest
         }
         return randomFile;
     }
-    
-    private void cleanUpTestDirectoriesAndFiles() throws IOException
+
+    private void cleanUpTestDirectoriesAndFiles()
+        throws IOException
     {
         FileUtils.deleteDirectory( tempDir );
     }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManagerTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManagerTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManagerTest.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManagerTest.java Mon Aug 13 04:29:09 2012
@@ -19,13 +19,6 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
 import org.apache.continuum.buildagent.configuration.BuildAgentConfigurationService;
 import org.apache.continuum.buildagent.model.LocalRepository;
 import org.apache.continuum.buildagent.utils.ContinuumBuildAgentUtil;
@@ -36,6 +29,13 @@ import org.jmock.Mockery;
 import org.jmock.integration.junit3.JUnit3Mockery;
 import org.jmock.lib.legacy.ClassImposteriser;
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
 /**
  * For the CONTINUUM-2391 tests, checking of the local repository details is in ContinuumReleaseManagerStub. An
  * exception is thrown if the set local repository in the repository map is incorrect.
@@ -102,7 +102,7 @@ public class BuildAgentReleaseManagerTes
         {
             fail( "An exception should not have been thrown!" );
         }
-    }    
+    }
 
     // CONTINUUM-2391
     public void testLocalRepositoryNameMismatchedCaseInReleasePrepare()
@@ -129,8 +129,8 @@ public class BuildAgentReleaseManagerTes
 
         try
         {
-            releaseManager.releasePrepare( map, createProperties(), createReleaseVersionMap(),
-                                           createDevVersionMap(), createEnvironmentsMap(), "user" );
+            releaseManager.releasePrepare( map, createProperties(), createReleaseVersionMap(), createDevVersionMap(),
+                                           createEnvironmentsMap(), "user" );
         }
         catch ( ContinuumReleaseException e )
         {
@@ -223,13 +223,8 @@ public class BuildAgentReleaseManagerTes
 
         try
         {
-            releaseManager.releasePerformFromScm(
-                                                  "clean deploy",
-                                                  "",
-                                                  true,
-                                                  repository,
-                                                  "scm:svn:http://svn.example.com/repos/test-project",
-                                                  "user",
+            releaseManager.releasePerformFromScm( "clean deploy", "", true, repository,
+                                                  "scm:svn:http://svn.example.com/repos/test-project", "user",
                                                   "mypasswrd",
                                                   "scm:svn:http://svn.example.com/repos/test-project/tags/test-project-1.0",
                                                   "scm:svn:http://svn.example.com/repos/test-project/tags", null,
@@ -260,12 +255,12 @@ public class BuildAgentReleaseManagerTes
 
         return localRepos;
     }
-    
+
     private Map<String, String> createEnvironmentsMap()
     {
         Map<String, String> environments = new HashMap<String, String>();
         environments.put( "M2_HOME", "/tmp/bin/apache-maven-2.2.1" );
-        
+
         return environments;
     }
 
@@ -273,7 +268,7 @@ public class BuildAgentReleaseManagerTes
     {
         Map<String, String> devVersion = new HashMap<String, String>();
         devVersion.put( "1.1-SNAPSHOT", "1.1-SNAPSHOT" );
-     
+
         return devVersion;
     }
 
@@ -281,7 +276,7 @@ public class BuildAgentReleaseManagerTes
     {
         Map<String, String> releaseVersion = new HashMap<String, String>();
         releaseVersion.put( "1.0", "1.0" );
-        
+
         return releaseVersion;
     }
 
@@ -295,7 +290,7 @@ public class BuildAgentReleaseManagerTes
         properties.put( ContinuumBuildAgentUtil.KEY_PREPARE_GOALS, "clean install" );
         properties.put( ContinuumBuildAgentUtil.KEY_ARGUMENTS, "" );
         properties.put( ContinuumBuildAgentUtil.KEY_SCM_TAG, "test-project-1.0" );
-        
+
         return properties;
     }
 
@@ -307,17 +302,17 @@ public class BuildAgentReleaseManagerTes
         map.put( ContinuumBuildAgentUtil.KEY_GROUP_ID, "1" );
         map.put( ContinuumBuildAgentUtil.KEY_ARTIFACT_ID, "test-project" );
         map.put( ContinuumBuildAgentUtil.KEY_SCM_URL, "scm:svn:http://svn.example.com/repos/test-project/trunk" );
-        
+
         return map;
     }
-    
+
     @SuppressWarnings( "unchecked" )
     private Map createRepositoryMap()
     {
         Map repository = new HashMap();
         repository.put( ContinuumBuildAgentUtil.KEY_USERNAME, "user" );
         repository.put( ContinuumBuildAgentUtil.KEY_LOCAL_REPOSITORY_NAME, "default" );
-        
+
         return repository;
     }
 }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/ContinuumActionStub.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/ContinuumActionStub.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/ContinuumActionStub.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/ContinuumActionStub.java Mon Aug 13 04:29:09 2012
@@ -19,11 +19,11 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.util.Map;
-
 import org.apache.continuum.buildagent.utils.ContinuumBuildAgentUtil;
 import org.codehaus.plexus.action.AbstractAction;
 
+import java.util.Map;
+
 /**
  * This is used for testing the fix for CONTINUUM-2391. See BuildPRrojectTaskExecutorTest.java and
  * BuildProjectTaskExecutorTest.xml for details.

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/ContinuumReleaseManagerStub.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/ContinuumReleaseManagerStub.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/ContinuumReleaseManagerStub.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/ContinuumReleaseManagerStub.java Mon Aug 13 04:29:09 2012
@@ -19,31 +19,32 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.io.File;
-
 import org.apache.continuum.model.repository.LocalRepository;
 import org.apache.maven.continuum.release.ContinuumReleaseException;
 import org.apache.maven.continuum.release.ContinuumReleaseManagerListener;
 import org.apache.maven.continuum.release.DefaultContinuumReleaseManager;
 
+import java.io.File;
+
 public class ContinuumReleaseManagerStub
     extends DefaultContinuumReleaseManager
 {
     public void perform( String releaseId, File buildDirectory, String goals, String arguments,
-                         boolean useReleaseProfile, ContinuumReleaseManagerListener listener, LocalRepository repository )
+                         boolean useReleaseProfile, ContinuumReleaseManagerListener listener,
+                         LocalRepository repository )
         throws ContinuumReleaseException
     {
-        if( !repository.getName().equalsIgnoreCase( "default" ) )
+        if ( !repository.getName().equalsIgnoreCase( "default" ) )
         {
             throw new ContinuumReleaseException( "Incorrect local repository name!" );
         }
-        
-        if( !repository.getLocation().equals( "/home/user/.m2/repository" ) )
+
+        if ( !repository.getLocation().equals( "/home/user/.m2/repository" ) )
         {
             throw new ContinuumReleaseException( "Incorrect local repository location!" );
         }
-        
-        if( !repository.getLayout().equals( "default" ) )
+
+        if ( !repository.getLayout().equals( "default" ) )
         {
             throw new ContinuumReleaseException( "Incorrect local repository layout!" );
         }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutorTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutorTest.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutorTest.java Mon Aug 13 04:29:09 2012
@@ -19,13 +19,6 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.continuum.buildagent.build.execution.ContinuumAgentBuildExecutor;
 import org.apache.continuum.buildagent.build.execution.manager.BuildAgentBuildExecutorManager;
 import org.apache.continuum.buildagent.buildcontext.BuildContext;
@@ -48,6 +41,13 @@ import org.jmock.Mockery;
 import org.jmock.integration.junit3.JUnit3Mockery;
 import org.jmock.lib.legacy.ClassImposteriser;
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 public class BuildProjectTaskExecutorTest
     extends PlexusInSpringTestCase
 {
@@ -84,8 +84,8 @@ public class BuildProjectTaskExecutorTes
     public void testBuildProjectLocalRepository()
         throws Exception
     {
-        BuildProjectTaskExecutor buildProjectExecutor =
-            (BuildProjectTaskExecutor) lookup( TaskExecutor.class, "build-agent" );
+        BuildProjectTaskExecutor buildProjectExecutor = (BuildProjectTaskExecutor) lookup( TaskExecutor.class,
+                                                                                           "build-agent" );
 
         buildProjectExecutor.setBuildAgentBuildExecutorManager( buildAgentBuildExecutorManager );
 
@@ -133,7 +133,8 @@ public class BuildProjectTaskExecutorTes
                 one( buildAgentManager ).shouldBuild( with( any( Map.class ) ) );
                 will( returnValue( true ) );
 
-                one( buildAgentBuildExecutorManager ).getBuildExecutor( ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR );
+                one( buildAgentBuildExecutorManager ).getBuildExecutor(
+                    ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR );
                 will( returnValue( executor ) );
 
                 one( buildAgentConfigurationService ).getWorkingDirectory( 1 );
@@ -166,8 +167,8 @@ public class BuildProjectTaskExecutorTes
     public void testBuildProjectWithConfiguredInstallationsFromBuildAgent()
         throws Exception
     {
-        BuildProjectTaskExecutor buildProjectExecutor =
-            (BuildProjectTaskExecutor) lookup( TaskExecutor.class, "build-agent" );
+        BuildProjectTaskExecutor buildProjectExecutor = (BuildProjectTaskExecutor) lookup( TaskExecutor.class,
+                                                                                           "build-agent" );
 
         buildProjectExecutor.setBuildAgentBuildExecutorManager( buildAgentBuildExecutorManager );
 
@@ -222,7 +223,7 @@ public class BuildProjectTaskExecutorTes
                 will( returnValue( true ) );
 
                 one( buildAgentBuildExecutorManager ).getBuildExecutor(
-                                                                        ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR );
+                    ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR );
                 will( returnValue( executor ) );
 
                 one( buildAgentConfigurationService ).getWorkingDirectory( 1 );
@@ -246,8 +247,8 @@ public class BuildProjectTaskExecutorTes
         {
             buildProjectExecutor.executeTask( createBuildProjectTask() );
 
-            Map<String, String> environments =
-                (Map<String, String>) buildContext.getActionContext().get( ContinuumBuildAgentUtil.KEY_ENVIRONMENTS );
+            Map<String, String> environments = (Map<String, String>) buildContext.getActionContext().get(
+                ContinuumBuildAgentUtil.KEY_ENVIRONMENTS );
             assertEquals( 2, environments.size() );
             assertTrue( environments.containsKey( "M2_HOME" ) );
             assertTrue( environments.containsKey( "EXTRA_VAR" ) );
@@ -264,8 +265,8 @@ public class BuildProjectTaskExecutorTes
     public void testBuildProjectWithNoConfiguredInstallationsFromBuildAgent()
         throws Exception
     {
-        BuildProjectTaskExecutor buildProjectExecutor =
-            (BuildProjectTaskExecutor) lookup( TaskExecutor.class, "build-agent" );
+        BuildProjectTaskExecutor buildProjectExecutor = (BuildProjectTaskExecutor) lookup( TaskExecutor.class,
+                                                                                           "build-agent" );
 
         buildProjectExecutor.setBuildAgentBuildExecutorManager( buildAgentBuildExecutorManager );
 
@@ -313,7 +314,8 @@ public class BuildProjectTaskExecutorTes
                 one( buildAgentManager ).shouldBuild( with( any( Map.class ) ) );
                 will( returnValue( true ) );
 
-                one( buildAgentBuildExecutorManager ).getBuildExecutor( ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR );
+                one( buildAgentBuildExecutorManager ).getBuildExecutor(
+                    ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR );
                 will( returnValue( executor ) );
 
                 one( buildAgentConfigurationService ).getWorkingDirectory( 1 );
@@ -337,8 +339,8 @@ public class BuildProjectTaskExecutorTes
         {
             buildProjectExecutor.executeTask( createBuildProjectTask() );
 
-            Map<String, String> environments =
-                (Map<String, String>) buildContext.getActionContext().get( ContinuumBuildAgentUtil.KEY_ENVIRONMENTS );
+            Map<String, String> environments = (Map<String, String>) buildContext.getActionContext().get(
+                ContinuumBuildAgentUtil.KEY_ENVIRONMENTS );
             assertEquals( 1, environments.size() );
             assertTrue( environments.containsKey( "M2_HOME" ) );
             assertEquals( "/tmp/apache-maven-2.2.1", environments.get( "M2_HOME" ) );
@@ -351,9 +353,8 @@ public class BuildProjectTaskExecutorTes
 
     private BuildProjectTask createBuildProjectTask()
     {
-        BuildProjectTask task =
-            new BuildProjectTask( 1, 1, new BuildTrigger( 1 ), "Test Project", "Default Build Definition",
-                                  new ScmResult(), 1 );
+        BuildProjectTask task = new BuildProjectTask( 1, 1, new BuildTrigger( 1 ), "Test Project",
+                                                      "Default Build Definition", new ScmResult(), 1 );
         return task;
     }
 

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/buildagent-config/continuum-buildagent-edit.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/buildagent-config/continuum-buildagent-edit.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/buildagent-config/continuum-buildagent-edit.xml (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/buildagent-config/continuum-buildagent-edit.xml Mon Aug 13 04:29:09 2012
@@ -27,7 +27,7 @@ under the License.
       <name>Maven 2.2.1 Installation</name>
       <type>Tool</type>
       <varName>M2_HOME</varName>
-      <varValue>/tmp/apache-maven-2.2.1</varValue>      
+      <varValue>/tmp/apache-maven-2.2.1</varValue>
     </installation>
   </installations>
 </continuum-buildagent-configuration>
\ No newline at end of file

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/buildagent-config/continuum-buildagent.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/buildagent-config/continuum-buildagent.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/buildagent-config/continuum-buildagent.xml (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/buildagent-config/continuum-buildagent.xml Mon Aug 13 04:29:09 2012
@@ -27,7 +27,7 @@ under the License.
       <name>Maven 2.2.1 Installation</name>
       <type>Tool</type>
       <varName>M2_HOME</varName>
-      <varValue>/tmp/apache-maven-2.2.1</varValue>      
+      <varValue>/tmp/apache-maven-2.2.1</varValue>
     </installation>
   </installations>
   <localRepositories>

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutorTest.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutorTest.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutorTest.xml (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutorTest.xml Mon Aug 13 04:29:09 2012
@@ -22,7 +22,7 @@
     <component>
       <role>org.codehaus.plexus.action.Action</role>
       <role-hint>update-project-from-agent-working-directory</role-hint>
-     <implementation>org.apache.continuum.buildagent.stubs.ContinuumActionStub</implementation>
+      <implementation>org.apache.continuum.buildagent.stubs.ContinuumActionStub</implementation>
     </component>
     <component>
       <role>org.codehaus.plexus.action.Action</role>

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-jetty/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-jetty/pom.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-jetty/pom.xml (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-jetty/pom.xml Mon Aug 13 04:29:09 2012
@@ -17,7 +17,8 @@ KIND, either express or implied.  See th
 specific language governing permissions and limitations
 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">
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <artifactId>continuum-buildagent</artifactId>
@@ -51,7 +52,7 @@ under the License.
       <groupId>org.mortbay.jetty</groupId>
       <artifactId>jsp-2.1-jetty</artifactId>
       <scope>runtime</scope>
-    </dependency>    
+    </dependency>
     <dependency>
       <groupId>org.mortbay.jetty</groupId>
       <artifactId>jetty-plus</artifactId>
@@ -60,7 +61,7 @@ under the License.
   </dependencies>
   <build>
     <plugins>
-       <plugin>
+      <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>appassembler-maven-plugin</artifactId>
         <configuration>
@@ -73,7 +74,7 @@ under the License.
               </commandLineArguments>
               <platforms>
                 <platform>jsw</platform>
-              </platforms>              
+              </platforms>
               <generatorConfigurations>
                 <generatorConfiguration>
                   <generator>jsw</generator>
@@ -133,9 +134,9 @@ under the License.
                   <systemProperty>jetty.logs=%CONTINUUM_BUILDAGENT_BASE%/logs</systemProperty>
                   <systemProperty>java.io.tmpdir=%CONTINUUM_BUILDAGENT_BASE%/tmp</systemProperty>
                 </systemProperties>
-              </jvmSettings> 
+              </jvmSettings>
             </daemon>
-          </daemons>          
+          </daemons>
           <repoPath>lib</repoPath>
           <repositoryLayout>flat</repositoryLayout>
           <assembleDirectory>target/generated-resources/appassembler/jsw/continuum-buildagent</assembleDirectory>
@@ -174,9 +175,9 @@ under the License.
             <configuration>
               <tasks>
                 <copy todir="target/generated-resources/appassembler/jsw/continuum-buildagent/conf">
-                  <fileset dir="src/main/conf" />                  
+                  <fileset dir="src/main/conf"/>
                 </copy>
-                <mkdir dir="target/generated-resources/appassembler/jsw/continuum-buildagent/logs" />      
+                <mkdir dir="target/generated-resources/appassembler/jsw/continuum-buildagent/logs"/>
               </tasks>
             </configuration>
             <goals>

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-jetty/src/main/assembly/bin.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-jetty/src/main/assembly/bin.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-jetty/src/main/assembly/bin.xml (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-jetty/src/main/assembly/bin.xml Mon Aug 13 04:29:09 2012
@@ -24,7 +24,7 @@
     <format>zip</format>
   </formats>
   <fileSets>
-    <fileSet>      
+    <fileSet>
       <directory>target/generated-resources/appassembler/jsw/continuum-buildagent/apps</directory>
       <outputDirectory>apps</outputDirectory>
     </fileSet>
@@ -40,7 +40,7 @@
         <exclude>maven-metadata-appassembler.xml</exclude>
       </excludes>
       <fileMode>0755</fileMode>
-    </fileSet> 
+    </fileSet>
     <fileSet>
       <directory>target/generated-resources/appassembler/jsw/continuum-buildagent/logs</directory>
       <outputDirectory>logs</outputDirectory>
@@ -48,8 +48,8 @@
     <fileSet>
       <directory>target/generated-resources/appassembler/jsw/continuum-buildagent/bin</directory>
       <outputDirectory>bin</outputDirectory>
-      <includes>   
-         <include>continuum-buildagent</include>           
+      <includes>
+        <include>continuum-buildagent</include>
       </includes>
       <fileMode>0755</fileMode>
       <lineEnding>unix</lineEnding>
@@ -57,20 +57,20 @@
     <fileSet>
       <directory>target/generated-resources/appassembler/jsw/continuum-buildagent/bin</directory>
       <outputDirectory>bin</outputDirectory>
-      <includes>   
-         <include>wrapper-linux-x86-32</include>
-         <include>wrapper-linux-x86-64</include>
-         <include>wrapper-macosx-universal-32</include>
-         <include>wrapper-solaris-x86-32</include>
-         <include>wrapper-solaris-sparc-32</include>
-         <include>wrapper-solaris-sparc-64</include>
+      <includes>
+        <include>wrapper-linux-x86-32</include>
+        <include>wrapper-linux-x86-64</include>
+        <include>wrapper-macosx-universal-32</include>
+        <include>wrapper-solaris-x86-32</include>
+        <include>wrapper-solaris-sparc-32</include>
+        <include>wrapper-solaris-sparc-64</include>
       </includes>
       <fileMode>0755</fileMode>
     </fileSet>
     <fileSet>
       <directory>target/generated-resources/appassembler/jsw/continuum-buildagent/bin</directory>
       <outputDirectory>bin</outputDirectory>
-      <includes>        
+      <includes>
         <include>continuum-buildagent.bat</include>
       </includes>
       <fileMode>0755</fileMode>
@@ -79,7 +79,7 @@
     <fileSet>
       <directory>target/generated-resources/appassembler/jsw/continuum-buildagent/bin</directory>
       <outputDirectory>bin</outputDirectory>
-      <includes>   
+      <includes>
         <include>wrapper-windows-x86-32.exe</include>
       </includes>
       <fileMode>0755</fileMode>

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/pom.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/pom.xml (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/pom.xml Mon Aug 13 04:29:09 2012
@@ -17,7 +17,8 @@
     specific language governing permissions and limitations
     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-buildagent</artifactId>
     <groupId>org.apache.continuum</groupId>
@@ -63,7 +64,7 @@
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
-    </dependency>      
+    </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-slf4j-logging</artifactId>
@@ -130,7 +131,7 @@
       <scope>runtime</scope>
     </dependency>
   </dependencies>
-  
+
   <build>
     <plugins>
       <plugin>
@@ -165,7 +166,7 @@
           <contextFile>${basedir}/src/test/tomcat/tomcat-context-continuum.xml</contextFile>
           <systemProperties>
             <appserver.base>${project.build.directory}/appserver-base</appserver.base>
-          </systemProperties>          
+          </systemProperties>
         </configuration>
       </plugin>
       <plugin>
@@ -179,7 +180,7 @@
             <configuration>
               <tasks>
                 <copy todir="${project.build.directory}/appserver-base">
-                  <fileset dir="src/appserver-base" />
+                  <fileset dir="src/appserver-base"/>
                 </copy>
               </tasks>
             </configuration>

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/jetty-env.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/jetty-env.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/jetty-env.xml (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/jetty-env.xml Mon Aug 13 04:29:09 2012
@@ -20,4 +20,4 @@
 
 <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
 
-<Configure class="org.mortbay.jetty.webapp.WebAppContext" />
+<Configure class="org.mortbay.jetty.webapp.WebAppContext"/>

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/java/org/apache/continuum/web/startup/BuildAgentStartup.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/java/org/apache/continuum/web/startup/BuildAgentStartup.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/java/org/apache/continuum/web/startup/BuildAgentStartup.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/java/org/apache/continuum/web/startup/BuildAgentStartup.java Mon Aug 13 04:29:09 2012
@@ -19,9 +19,6 @@ package org.apache.continuum.web.startup
  * under the License.
  */
 
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-
 import org.codehaus.plexus.spring.PlexusToSpringUtils;
 import org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor;
 import org.slf4j.Logger;
@@ -29,6 +26,9 @@ import org.slf4j.LoggerFactory;
 import org.springframework.web.context.WebApplicationContext;
 import org.springframework.web.context.support.WebApplicationContextUtils;
 
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
 public class BuildAgentStartup
     implements ServletContextListener
 {
@@ -49,22 +49,22 @@ public class BuildAgentStartup
     {
         log.info( "Initializing Build Agent Task Queue Executor" );
 
-        WebApplicationContext wac =
-            WebApplicationContextUtils.getRequiredWebApplicationContext( sce.getServletContext() );
+        WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(
+            sce.getServletContext() );
 
-        TaskQueueExecutor buildAgent = (TaskQueueExecutor) wac.getBean(
-            PlexusToSpringUtils.buildSpringId( TaskQueueExecutor.class, "build-agent" ) );
+        TaskQueueExecutor buildAgent = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils.buildSpringId(
+            TaskQueueExecutor.class, "build-agent" ) );
 
-        TaskQueueExecutor prepareBuildAgent = (TaskQueueExecutor) wac.getBean(
-            PlexusToSpringUtils.buildSpringId( TaskQueueExecutor.class, "prepare-build-agent" ) );
+        TaskQueueExecutor prepareBuildAgent = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils.buildSpringId(
+            TaskQueueExecutor.class, "prepare-build-agent" ) );
 
-        TaskQueueExecutor prepareRelease = (TaskQueueExecutor) wac.getBean(
-            PlexusToSpringUtils.buildSpringId( TaskQueueExecutor.class, "prepare-release" ) );
+        TaskQueueExecutor prepareRelease = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils.buildSpringId(
+            TaskQueueExecutor.class, "prepare-release" ) );
 
-        TaskQueueExecutor performRelease = (TaskQueueExecutor) wac.getBean(
-            PlexusToSpringUtils.buildSpringId( TaskQueueExecutor.class, "perform-release" ) );
+        TaskQueueExecutor performRelease = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils.buildSpringId(
+            TaskQueueExecutor.class, "perform-release" ) );
 
-        TaskQueueExecutor rollbackRelease = (TaskQueueExecutor) wac.getBean(
-            PlexusToSpringUtils.buildSpringId( TaskQueueExecutor.class, "rollback-release" ) );
+        TaskQueueExecutor rollbackRelease = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils.buildSpringId(
+            TaskQueueExecutor.class, "rollback-release" ) );
     }
 }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/resources/META-INF/continuum/continuum-configuration.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/resources/META-INF/continuum/continuum-configuration.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/resources/META-INF/continuum/continuum-configuration.xml (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/resources/META-INF/continuum/continuum-configuration.xml Mon Aug 13 04:29:09 2012
@@ -21,9 +21,9 @@
 
 <configuration>
   <system/>
-  <jndi prefix="java:comp/env" config-optional="true"/>  
+  <jndi prefix="java:comp/env" config-optional="true"/>
   <xml fileName="${appserver.base}/conf/continuum-buildagent.xml" config-optional="true"
        config-forceCreate="true" config-name="org.apache.continuum"/>
   <xml fileName="${user.home}/.m2/continuum-buildagent.xml" config-optional="true"
-       config-forceCreate="true" config-name="org.apache.continuum.user"/>  
+       config-forceCreate="true" config-name="org.apache.continuum.user"/>
 </configuration>

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/resources/META-INF/plexus/application.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/resources/META-INF/plexus/application.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/resources/META-INF/plexus/application.xml (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/resources/META-INF/plexus/application.xml Mon Aug 13 04:29:09 2012
@@ -19,10 +19,10 @@
   -->
 <plexus>
   <components>
-   
+
     <!--
-     | Logger manager
-     -->
+    | Logger manager
+    -->
     <component>
       <role>org.codehaus.plexus.logging.LoggerManager</role>
       <implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation>
@@ -30,7 +30,7 @@
     </component>
 
   </components>
-  
+
   <lifecycle-handler-manager implementation="org.codehaus.plexus.lifecycle.DefaultLifecycleHandlerManager">
     <default-lifecycle-handler-id>plexus</default-lifecycle-handler-id>
     <lifecycle-handlers>

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/resources/applicationContext.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/resources/applicationContext.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/resources/applicationContext.xml (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/resources/applicationContext.xml Mon Aug 13 04:29:09 2012
@@ -3,8 +3,9 @@
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-  
-  <bean id="slaveBuildAgentTransportServer" lazy-init="true" scope="singleton" class="org.apache.continuum.distributed.transport.slave.SlaveBuildAgentTransportServer">
+
+  <bean id="slaveBuildAgentTransportServer" lazy-init="true" scope="singleton"
+        class="org.apache.continuum.distributed.transport.slave.SlaveBuildAgentTransportServer">
     <constructor-arg ref="continuumBuildAgentService"/>
   </bean>
 
@@ -16,7 +17,8 @@
     </constructor-arg>
   </bean>
 
-  <bean name="xmlRpcAuthenticator" class="org.apache.continuum.distributed.transport.slave.SlaveBuildAgentTransportAuthenticator">
+  <bean name="xmlRpcAuthenticator"
+        class="org.apache.continuum.distributed.transport.slave.SlaveBuildAgentTransportAuthenticator">
     <constructor-arg ref="buildAgentConfigurationService"/>
   </bean>
 </beans>

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/resources/log4j.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/resources/log4j.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/resources/log4j.xml (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/resources/log4j.xml Mon Aug 13 04:29:09 2012
@@ -3,34 +3,34 @@
 
 <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
   <appender name="rolling" class="org.apache.log4j.DailyRollingFileAppender">
-    <param name="file" value="${appserver.base}/logs/continuum-buildagent.log" />
-    <param name="append" value="true" />
-    <param name="datePattern" value="'.'yyyy-MM-dd" />
+    <param name="file" value="${appserver.base}/logs/continuum-buildagent.log"/>
+    <param name="append" value="true"/>
+    <param name="datePattern" value="'.'yyyy-MM-dd"/>
     <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="%d [%t] %-5p %c %x - %m%n"/>
     </layout>
   </appender>
 
-<!--
-  <logger name="org.apache.continuum.buildagent">
-    <level value="info"/>
-  </logger>
-  
-  <logger name="org.apache.continuum.web">
-    <level value="info"/>
-  </logger>
+  <!--
+    <logger name="org.apache.continuum.buildagent">
+      <level value="info"/>
+    </logger>
 
-  <logger name="org.apache.continuum.distributed">
-    <level value="info"/>
-  </logger>
--->
+    <logger name="org.apache.continuum.web">
+      <level value="info"/>
+    </logger>
+
+    <logger name="org.apache.continuum.distributed">
+      <level value="info"/>
+    </logger>
+  -->
 
   <logger name="org.springframework">
     <level value="error"/>
   </logger>
 
   <root>
-    <priority value="info" />
-    <appender-ref ref="rolling" />
+    <priority value="info"/>
+    <appender-ref ref="rolling"/>
   </root>
 </log4j:configuration>

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/webapp/WEB-INF/web.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/webapp/WEB-INF/web.xml Mon Aug 13 04:29:09 2012
@@ -23,12 +23,12 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
   <display-name>Continuum Distributed Build Transport Tests</display-name>
-  
+
   <context-param>
     <param-name>contextClass</param-name>
     <param-value>org.codehaus.plexus.spring.PlexusWebApplicationContext</param-value>
   </context-param>
-  
+
   <context-param>
     <param-name>contextConfigLocation</param-name>
     <param-value>
@@ -38,16 +38,16 @@
       classpath*:/META-INF/plexus/application.xml
     </param-value>
   </context-param>
-  
+
   <listener>
     <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
   </listener>
-  
+
   <listener>
     <!-- TODO: some Spring technique for this? -->
-  	<listener-class>org.apache.continuum.web.startup.BuildAgentStartup</listener-class>
+    <listener-class>org.apache.continuum.web.startup.BuildAgentStartup</listener-class>
   </listener>
-  
+
   <servlet>
     <servlet-name>SlaveXmlRpcServlet</servlet-name>
     <servlet-class>
@@ -67,7 +67,7 @@
     </init-param>
     <load-on-startup>1</load-on-startup>
   </servlet>
-  
+
   <servlet>
     <servlet-name>WorkingCopyServlet</servlet-name>
     <servlet-class>

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/test/tomcat/tomcat-context-continuum-buildagent.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/test/tomcat/tomcat-context-continuum-buildagent.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/test/tomcat/tomcat-context-continuum-buildagent.xml (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/test/tomcat/tomcat-context-continuum-buildagent.xml Mon Aug 13 04:29:09 2012
@@ -17,5 +17,5 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-  <Context path="/continuum" />
+<Context path="/continuum"/>
   
\ No newline at end of file

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webdav-client/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webdav-client/pom.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webdav-client/pom.xml (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webdav-client/pom.xml Mon Aug 13 04:29:09 2012
@@ -1,6 +1,7 @@
 <?xml version="1.0"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.continuum</groupId>

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webdav-client/src/main/java/org/apache/continuum/buildagent/webdav/client/WorkingCopyWebdavClient.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webdav-client/src/main/java/org/apache/continuum/buildagent/webdav/client/WorkingCopyWebdavClient.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webdav-client/src/main/java/org/apache/continuum/buildagent/webdav/client/WorkingCopyWebdavClient.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webdav-client/src/main/java/org/apache/continuum/buildagent/webdav/client/WorkingCopyWebdavClient.java Mon Aug 13 04:29:09 2012
@@ -101,7 +101,7 @@ public class WorkingCopyWebdavClient
         HttpGet httpGet = new HttpGet( uri );
 
         httpClient.getCredentialsProvider().setCredentials( new AuthScope( uri.getHost(), uri.getPort() ),
-                                                new UsernamePasswordCredentials( username, password ) );
+                                                            new UsernamePasswordCredentials( username, password ) );
 
         HttpHost targetHost = new HttpHost( url.getHost(), url.getPort(), url.getProtocol() );
 
@@ -119,7 +119,8 @@ public class WorkingCopyWebdavClient
         System.out.println( "Response status code :: " + httpResponse.getStatusLine().getStatusCode() );
 
         InputStream is = IOUtils.toInputStream( EntityUtils.toString( httpResponse.getEntity(),
-                                                                      EntityUtils.getContentCharSet( httpResponse.getEntity() ) ) );
+                                                                      EntityUtils.getContentCharSet(
+                                                                          httpResponse.getEntity() ) ) );
         String content = IOUtils.toString( is );
 
         System.out.println( "Content :: " + content );
@@ -129,7 +130,7 @@ public class WorkingCopyWebdavClient
         throws IOException, URISyntaxException, DavException
     {
         int idx = filePath.lastIndexOf( "/" );
-        if( idx != -1 )
+        if ( idx != -1 )
         {
             filePath = StringUtils.substring( filePath, 0, idx + 1 );
         }
@@ -146,20 +147,22 @@ public class WorkingCopyWebdavClient
         MultiStatus multiStatus = pFind.getResponseBodyAsMultiStatus();
         MultiStatusResponse[] responses = multiStatus.getResponses();
         MultiStatusResponse currResponse;
-        System.out.println("Folders and files in " + filePath + ":");
+        System.out.println( "Folders and files in " + filePath + ":" );
 
-        for( int i = 0; i < responses.length; i++ )
+        for ( int i = 0; i < responses.length; i++ )
         {
             currResponse = responses[i];
-            if ( !( currResponse.getHref().equals( uri.toString() ) || currResponse.getHref().equals( uri.toString() + "/") ) )
+            if ( !( currResponse.getHref().equals( uri.toString() ) || currResponse.getHref().equals(
+                uri.toString() + "/" ) ) )
             {
                 String currResponseHref = StringUtils.trim( currResponse.getHref() );
 
                 System.out.println( "\nResource url :: " + currResponseHref );
 
-                DavProperty displayNameDavProperty = currResponse.getProperties( HttpStatus.SC_OK ).get( "displayname" );
+                DavProperty displayNameDavProperty = currResponse.getProperties( HttpStatus.SC_OK ).get(
+                    "displayname" );
                 String displayName;
-                if( displayNameDavProperty != null )
+                if ( displayNameDavProperty != null )
                 {
                     displayName = (String) displayNameDavProperty.getValue();
                 }
@@ -176,7 +179,7 @@ public class WorkingCopyWebdavClient
 
                 System.out.println( "Returned status code :: " + httpGet.getStatusCode() );
 
-                if( httpGet.getStatusCode() == HttpStatus.SC_OK )
+                if ( httpGet.getStatusCode() == HttpStatus.SC_OK )
                 {
                     InputStream is = httpGet.getResponseBodyAsStream();
 
@@ -202,17 +205,18 @@ public class WorkingCopyWebdavClient
         int maxHostConnections = 20;
 
         HttpConnectionManagerParams params = new HttpConnectionManagerParams();
-        params.setMaxConnectionsPerHost(hostConfig, maxHostConnections);
+        params.setMaxConnectionsPerHost( hostConfig, maxHostConnections );
 
         HttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager();
-        connectionManager.setParams(params);
+        connectionManager.setParams( params );
 
-        org.apache.commons.httpclient.HttpClient client = new org.apache.commons.httpclient.HttpClient(connectionManager);
+        org.apache.commons.httpclient.HttpClient client = new org.apache.commons.httpclient.HttpClient(
+            connectionManager );
 
         Credentials creds = new org.apache.commons.httpclient.UsernamePasswordCredentials( username, password );
 
-        client.getState().setCredentials(org.apache.commons.httpclient.auth.AuthScope.ANY, creds);
-        client.setHostConfiguration(hostConfig);
+        client.getState().setCredentials( org.apache.commons.httpclient.auth.AuthScope.ANY, creds );
+        client.setHostConfiguration( hostConfig );
         client.getParams().setAuthenticationPreemptive( true );
 
         client.executeMethod( hostConfig, pFind );

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/pom.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/pom.xml (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/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">
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.continuum</groupId>

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavResource.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavResource.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavResource.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavResource.java Mon Aug 13 04:29:09 2012
@@ -19,16 +19,7 @@ package org.apache.continuum.webdav;
  * under the License.
  */
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.activation.MimetypesFileTypeMap;
-
 import org.apache.commons.io.IOUtils;
-import org.apache.continuum.webdav.util.IndexWriter;
 import org.apache.jackrabbit.util.Text;
 import org.apache.jackrabbit.webdav.DavException;
 import org.apache.jackrabbit.webdav.DavResource;
@@ -57,6 +48,13 @@ import org.joda.time.format.ISODateTimeF
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import javax.activation.MimetypesFileTypeMap;
+
 public class ContinuumBuildAgentDavResource
     implements DavResource
 {
@@ -82,9 +80,9 @@ public class ContinuumBuildAgentDavResou
 
     public static final String SUPPORTED_METHODS = "OPTIONS, GET, HEAD, TRACE, PROPFIND";
 
-    public ContinuumBuildAgentDavResource( String localResource, String logicalResource,
-                                           DavSession session, ContinuumBuildAgentDavResourceLocator locator,
-                                           DavResourceFactory factory, MimetypesFileTypeMap mimeTypes )
+    public ContinuumBuildAgentDavResource( String localResource, String logicalResource, DavSession session,
+                                           ContinuumBuildAgentDavResourceLocator locator, DavResourceFactory factory,
+                                           MimetypesFileTypeMap mimeTypes )
     {
         this.localResource = new File( localResource );
         this.logicalResource = logicalResource;
@@ -138,7 +136,7 @@ public class ContinuumBuildAgentDavResou
                 parentPath = "/";
             }
 
-            DavResourceLocator parentloc = locator.getFactory().createResourceLocator( locator.getPrefix(), 
+            DavResourceLocator parentloc = locator.getFactory().createResourceLocator( locator.getPrefix(),
                                                                                        parentPath );
 
             try

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavResourceFactory.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavResourceFactory.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavResourceFactory.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavResourceFactory.java Mon Aug 13 04:29:09 2012
@@ -19,11 +19,6 @@ package org.apache.continuum.webdav;
  * under the License.
  */
 
-import java.io.File;
-
-import javax.activation.MimetypesFileTypeMap;
-import javax.servlet.http.HttpServletResponse;
-
 import org.apache.continuum.buildagent.configuration.BuildAgentConfigurationService;
 import org.apache.continuum.webdav.util.WebdavMethodUtil;
 import org.apache.continuum.webdav.util.WorkingCopyPathUtil;
@@ -37,6 +32,10 @@ import org.apache.jackrabbit.webdav.DavS
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+import javax.activation.MimetypesFileTypeMap;
+import javax.servlet.http.HttpServletResponse;
+
 /**
  * @plexus.component role="org.apache.continuum.webdav.ContinuumBuildAgentDavResourceFactory"
  */
@@ -63,8 +62,8 @@ public class ContinuumBuildAgentDavResou
     public DavResource createResource( final DavResourceLocator locator, final DavSession davSession )
         throws DavException
     {
-        ContinuumBuildAgentDavResourceLocator continuumLocator = 
-            checkLocatorIsInstanceOfContinuumBuildAgentLocator( locator );
+        ContinuumBuildAgentDavResourceLocator continuumLocator = checkLocatorIsInstanceOfContinuumBuildAgentLocator(
+            locator );
 
         String logicalResource = WorkingCopyPathUtil.getLogicalResource( locator.getResourcePath() );
         if ( logicalResource.startsWith( "/" ) )
@@ -74,7 +73,8 @@ public class ContinuumBuildAgentDavResou
 
         File resourceFile = getResourceFile( continuumLocator.getProjectId(), logicalResource );
 
-        if ( !resourceFile.exists() || ( continuumLocator.getHref( false ).endsWith( "/" ) && !resourceFile.isDirectory() ) )
+        if ( !resourceFile.exists() || ( continuumLocator.getHref( false ).endsWith( "/" ) &&
+            !resourceFile.isDirectory() ) )
         {
             // force a resource not found
             log.error( "Resource file '" + resourceFile.getAbsolutePath() + "' does not exist" );
@@ -86,12 +86,12 @@ public class ContinuumBuildAgentDavResou
         }
     }
 
-    public DavResource createResource( DavResourceLocator locator, DavServletRequest request, 
+    public DavResource createResource( DavResourceLocator locator, DavServletRequest request,
                                        DavServletResponse response )
         throws DavException
     {
-        ContinuumBuildAgentDavResourceLocator continuumLocator = 
-            checkLocatorIsInstanceOfContinuumBuildAgentLocator( locator );
+        ContinuumBuildAgentDavResourceLocator continuumLocator = checkLocatorIsInstanceOfContinuumBuildAgentLocator(
+            locator );
 
         if ( !WebdavMethodUtil.isReadMethod( request.getMethod() ) )
         {
@@ -107,7 +107,8 @@ public class ContinuumBuildAgentDavResou
 
         File resourceFile = getResourceFile( continuumLocator.getProjectId(), logicalResource );
 
-        if ( !resourceFile.exists() || ( continuumLocator.getHref( false ).endsWith( "/" ) && !resourceFile.isDirectory() ) )
+        if ( !resourceFile.exists() || ( continuumLocator.getHref( false ).endsWith( "/" ) &&
+            !resourceFile.isDirectory() ) )
         {
             // force a resource not found
             log.error( "Resource file '" + resourceFile.getAbsolutePath() + "' does not exist" );
@@ -134,7 +135,8 @@ public class ContinuumBuildAgentDavResou
         this.buildAgentConfigurationService = buildAgentConfigurationService;
     }
 
-    private ContinuumBuildAgentDavResourceLocator checkLocatorIsInstanceOfContinuumBuildAgentLocator( DavResourceLocator locator )
+    private ContinuumBuildAgentDavResourceLocator checkLocatorIsInstanceOfContinuumBuildAgentLocator(
+        DavResourceLocator locator )
         throws DavException
     {
         if ( !( locator instanceof ContinuumBuildAgentDavResourceLocator ) )
@@ -169,7 +171,7 @@ public class ContinuumBuildAgentDavResou
     protected DavResource createResource( File resourceFile, String logicalResource, DavSession session,
                                           ContinuumBuildAgentDavResourceLocator locator )
     {
-        return new ContinuumBuildAgentDavResource( resourceFile.getAbsolutePath(), logicalResource, session, 
-                                                   locator, this, mimeTypes );
+        return new ContinuumBuildAgentDavResource( resourceFile.getAbsolutePath(), logicalResource, session, locator,
+                                                   this, mimeTypes );
     }
 }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavResourceLocator.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavResourceLocator.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavResourceLocator.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavResourceLocator.java Mon Aug 13 04:29:09 2012
@@ -36,9 +36,8 @@ public class ContinuumBuildAgentDavResou
 
     private final int projectId;
 
-    public ContinuumBuildAgentDavResourceLocator( String prefix, String resourcePath, 
-                                                  DavLocatorFactory davLocatorFactory,
-                                                  int projectId )
+    public ContinuumBuildAgentDavResourceLocator( String prefix, String resourcePath,
+                                                  DavLocatorFactory davLocatorFactory, int projectId )
     {
         this.prefix = prefix;
         this.davLocatorFactory = davLocatorFactory;
@@ -57,7 +56,7 @@ public class ContinuumBuildAgentDavResou
 
         String path = resourcePath;
 
-        if ( !resourcePath.startsWith("/") )
+        if ( !resourcePath.startsWith( "/" ) )
         {
             path = "/" + resourcePath;
         }
@@ -79,7 +78,7 @@ public class ContinuumBuildAgentDavResou
     public String getHref( boolean isCollection )
     {
         // avoid doubled trailing '/' for the root item
-        String suffix = ( isCollection && !isRootLocation() && !href.endsWith("/") ) ? "/" : "";
+        String suffix = ( isCollection && !isRootLocation() && !href.endsWith( "/" ) ) ? "/" : "";
         return href + suffix;
     }
 
@@ -115,7 +114,7 @@ public class ContinuumBuildAgentDavResou
 
     /**
      * Computes the hash code from the href, which is built using the final fields prefix and resourcePath.
-     * 
+     *
      * @return the hash code
      */
     public int hashCode()
@@ -141,7 +140,7 @@ public class ContinuumBuildAgentDavResou
     /**
      * Equality of path is achieved if the specified object is a <code>DavResourceLocator</code> object with the same
      * hash code.
-     * 
+     *
      * @param obj the object to compare to
      * @return <code>true</code> if the 2 objects are equal; <code>false</code> otherwise
      */

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavSession.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavSession.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavSession.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavSession.java Mon Aug 13 04:29:09 2012
@@ -19,10 +19,10 @@ package org.apache.continuum.webdav;
  * under the License.
  */
 
-import java.util.HashSet;
-
 import org.apache.jackrabbit.webdav.DavSession;
 
+import java.util.HashSet;
+
 public class ContinuumBuildAgentDavSession
     implements DavSession
 {

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavSessionProvider.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavSessionProvider.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavSessionProvider.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/ContinuumBuildAgentDavSessionProvider.java Mon Aug 13 04:29:09 2012
@@ -44,7 +44,7 @@ public class ContinuumBuildAgentDavSessi
     public boolean attachSession( WebdavRequest request )
         throws DavException
     {
-        if( !isAuthorized( request ) )
+        if ( !isAuthorized( request ) )
         {
             throw new DavException( HttpServletResponse.SC_UNAUTHORIZED );
         }
@@ -56,7 +56,7 @@ public class ContinuumBuildAgentDavSessi
 
     public void releaseSession( WebdavRequest request )
     {
-        request.setDavSession(null);
+        request.setDavSession( null );
     }
 
     private boolean isAuthorized( WebdavRequest request )
@@ -82,7 +82,7 @@ public class ContinuumBuildAgentDavSessi
                 password = token.substring( delim + 1 );
             }
 
-            if( buildAgentConfigurationService.getSharedSecretPassword() != null &&
+            if ( buildAgentConfigurationService.getSharedSecretPassword() != null &&
                 buildAgentConfigurationService.getSharedSecretPassword().equals( password ) )
             {
                 log.debug( "Password matches configured shared key in continuum build agent." );

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/WorkingCopyServlet.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/WorkingCopyServlet.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/WorkingCopyServlet.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/WorkingCopyServlet.java Mon Aug 13 04:29:09 2012
@@ -19,11 +19,6 @@ package org.apache.continuum.webdav;
  * under the License.
  */
 
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
 import org.apache.continuum.buildagent.configuration.BuildAgentConfigurationService;
 import org.apache.jackrabbit.webdav.DavException;
 import org.apache.jackrabbit.webdav.DavLocatorFactory;
@@ -45,6 +40,10 @@ import org.springframework.web.context.W
 import org.springframework.web.context.support.WebApplicationContextUtils;
 
 import java.io.IOException;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 public class WorkingCopyServlet
     extends AbstractWebdavServlet
@@ -82,9 +81,8 @@ public class WorkingCopyServlet
 
         // DeltaV requires 'Cache-Control' header for all methods except 'VERSION-CONTROL' and 'REPORT'.
         int methodCode = DavMethods.getMethodCode( request.getMethod() );
-        boolean noCache =
-            DavMethods.isDeltaVMethod( webdavRequest )
-                && !( DavMethods.DAV_VERSION_CONTROL == methodCode || DavMethods.DAV_REPORT == methodCode );
+        boolean noCache = DavMethods.isDeltaVMethod( webdavRequest ) &&
+            !( DavMethods.DAV_VERSION_CONTROL == methodCode || DavMethods.DAV_REPORT == methodCode );
         WebdavResponse webdavResponse = new WebdavResponseImpl( response, noCache );
         DavResource resource = null;
 
@@ -97,8 +95,8 @@ public class WorkingCopyServlet
             }
 
             // check matching if=header for lock-token relevant operations
-            resource =
-                getResourceFactory().createResource( webdavRequest.getRequestLocator(), webdavRequest, webdavResponse );
+            resource = getResourceFactory().createResource( webdavRequest.getRequestLocator(), webdavRequest,
+                                                            webdavResponse );
 
             if ( !isPreconditionValid( webdavRequest, resource ) )
             {
@@ -135,18 +133,17 @@ public class WorkingCopyServlet
 
     public synchronized void initServers( ServletConfig servletConfig )
     {
-        WebApplicationContext wac =
-            WebApplicationContextUtils.getRequiredWebApplicationContext( servletConfig.getServletContext() );
+        WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(
+            servletConfig.getServletContext() );
 
-        resourceFactory =
-            (DavResourceFactory) wac.getBean( PlexusToSpringUtils.
-                                              buildSpringId( ContinuumBuildAgentDavResourceFactory.class ) );
+        resourceFactory = (DavResourceFactory) wac.getBean( PlexusToSpringUtils.
+            buildSpringId( ContinuumBuildAgentDavResourceFactory.class ) );
 
-        BuildAgentConfigurationService buildAgentConfigurationService = (BuildAgentConfigurationService)
-            wac.getBean( PlexusToSpringUtils.buildSpringId( BuildAgentConfigurationService.class ) );
+        BuildAgentConfigurationService buildAgentConfigurationService = (BuildAgentConfigurationService) wac.getBean(
+            PlexusToSpringUtils.buildSpringId( BuildAgentConfigurationService.class ) );
 
         locatorFactory = new ContinuumBuildAgentDavLocatorFactory();
-        sessionProvider = new ContinuumBuildAgentDavSessionProvider( buildAgentConfigurationService);
+        sessionProvider = new ContinuumBuildAgentDavSessionProvider( buildAgentConfigurationService );
     }
 
     @Override

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/util/IndexWriter.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/util/IndexWriter.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/util/IndexWriter.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/util/IndexWriter.java Mon Aug 13 04:29:09 2012
@@ -19,6 +19,10 @@ package org.apache.continuum.webdav.util
  * under the License.
  */
 
+import org.apache.commons.lang.StringUtils;
+import org.apache.jackrabbit.webdav.DavResource;
+import org.apache.jackrabbit.webdav.io.OutputContext;
+
 import java.io.File;
 import java.io.PrintWriter;
 import java.util.ArrayList;
@@ -27,14 +31,10 @@ import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 
-import org.apache.commons.lang.StringUtils;
-import org.apache.jackrabbit.webdav.DavResource;
-import org.apache.jackrabbit.webdav.io.OutputContext;
-
 public class IndexWriter
 {
     private final String logicalResource;
-    
+
     private final List<File> localResources;
 
     public IndexWriter( DavResource resource, File localResource, String logicalResource )
@@ -88,7 +88,7 @@ public class IndexWriter
             writer.println( "<li><a href=\"../\">" + parentName + "</a> <i><small>(Parent)</small></i></li>" );
             writer.println( "</ul>" );
         }
-        
+
         writer.println( "</ul>" );
     }
 
@@ -103,9 +103,9 @@ public class IndexWriter
     {
         for ( File localResource : localResources )
         {
-            List<File> files = new ArrayList<File>( Arrays.asList( localResource.listFiles() ) ); 
+            List<File> files = new ArrayList<File>( Arrays.asList( localResource.listFiles() ) );
             Collections.sort( files );
-            
+
             for ( File file : files )
             {
                 writeHyperlink( writer, file.getName(), file.isDirectory() );
@@ -114,13 +114,14 @@ public class IndexWriter
     }
 
     private void writeHyperlink( PrintWriter writer, String resourceName, boolean directory )
-    {        
-        if ( directory && !"CVS".equals( resourceName ) && !".svn".equals( resourceName ) && !"SCCS".equals( resourceName ) )
+    {
+        if ( directory && !"CVS".equals( resourceName ) && !".svn".equals( resourceName ) && !"SCCS".equals(
+            resourceName ) )
         {
             writer.println( "<li><a href=\"" + resourceName + "/\">" + resourceName + "</a></li>" );
         }
         else if ( !directory && !".cvsignore".equals( resourceName ) && !"vssver.scc".equals( resourceName ) &&
-                !".DS_Store".equals( resourceName ) && !"release.properties".equals( resourceName ) )
+            !".DS_Store".equals( resourceName ) && !"release.properties".equals( resourceName ) )
         {
             writer.println( "<li><a href=\"" + resourceName + "\">" + resourceName + "</a></li>" );
         }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/util/WebdavMethodUtil.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/util/WebdavMethodUtil.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/util/WebdavMethodUtil.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/util/WebdavMethodUtil.java Mon Aug 13 04:29:09 2012
@@ -19,12 +19,12 @@ package org.apache.continuum.webdav.util
  * under the License.
  */
 
+import org.apache.commons.lang.StringUtils;
+
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Locale;
 
-import org.apache.commons.lang.StringUtils;
-
 public class WebdavMethodUtil
 {
     private static final List<String> READ_METHODS;

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/util/WorkingCopyPathUtil.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/util/WorkingCopyPathUtil.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/util/WorkingCopyPathUtil.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webdav/src/main/java/org/apache/continuum/webdav/util/WorkingCopyPathUtil.java Mon Aug 13 04:29:09 2012
@@ -36,23 +36,23 @@ public class WorkingCopyPathUtil
         if ( requestPathInfo.startsWith( "/" ) )
         {
             requestPathInfo = requestPathInfo.substring( 1 );
-        }        
+        }
 
         int slash = requestPathInfo.indexOf( '/' );
         if ( slash > 0 )
-        {   
+        {
             logicalResource = requestPathInfo.substring( slash );
-         
-            if (logicalResource.endsWith( "/.." ) )
+
+            if ( logicalResource.endsWith( "/.." ) )
             {
                 logicalResource += "/";
             }
-            
+
             if ( logicalResource != null && logicalResource.startsWith( "//" ) )
             {
                 logicalResource = logicalResource.substring( 1 );
             }
-            
+
             if ( logicalResource == null )
             {
                 logicalResource = "/";
@@ -79,7 +79,7 @@ public class WorkingCopyPathUtil
         }
 
         int projectId = 0;
-        
+
         try
         {
             // Find first element, if slash exists.
@@ -109,13 +109,13 @@ public class WorkingCopyPathUtil
         {
             return "/";
         }
-        
-        String joinedString = StringUtils.join( parts, '/' );        
-        if( href.endsWith( "/" ) )
+
+        String joinedString = StringUtils.join( parts, '/' );
+        if ( href.endsWith( "/" ) )
         {
             joinedString = joinedString + "/";
         }
-        
+
         return joinedString;
     }
 }



Mime
View raw message