continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r684085 [5/6] - in /continuum/trunk: ./ continuum-api/src/main/java/org/apache/continuum/dao/ continuum-api/src/main/java/org/apache/maven/continuum/store/ continuum-base/continuum-configuration/ continuum-commons/ continuum-commons/src/mai...
Date Fri, 08 Aug 2008 20:48:17 GMT
Modified: continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/AbstractPurgeExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/AbstractPurgeExecutorTest.java?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/AbstractPurgeExecutorTest.java (original)
+++ continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/AbstractPurgeExecutorTest.java Fri Aug  8 13:48:14 2008
@@ -19,10 +19,6 @@
  * under the License.
  */
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.commons.io.FileUtils;
 import org.apache.continuum.model.repository.DirectoryPurgeConfiguration;
 import org.apache.continuum.model.repository.RepositoryPurgeConfiguration;
@@ -30,43 +26,47 @@
 import org.apache.continuum.purge.task.PurgeTask;
 import org.codehaus.plexus.taskqueue.execution.TaskExecutor;
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * @author Maria Catherine Tan
  */
 public abstract class AbstractPurgeExecutorTest
     extends AbstractPurgeTest
 {
-    private static final String[] jar_extensions = new String[] { ".jar", ".jar.md5", ".jar.sha1" };
-        
-    private static final String[] pom_extensions = new String[] { ".pom", ".pom.md5", ".pom.sha1" };
-    
-    private static final String[] metadata_extensions = new String[] { ".xml", ".xml.sha1", ".xml.md5" };
-     
+    private static final String[] jar_extensions = new String[]{".jar", ".jar.md5", ".jar.sha1"};
+
+    private static final String[] pom_extensions = new String[]{".pom", ".pom.md5", ".pom.sha1"};
+
+    private static final String[] metadata_extensions = new String[]{".xml", ".xml.sha1", ".xml.md5"};
+
     public static final String TEST_MAVEN_METADATA = "maven-metadata-central";
-    
+
     private RepositoryPurgeConfiguration repoConfig;
-    
+
     private DirectoryPurgeConfiguration dirConfig;
-    
+
     protected TaskExecutor purgeExecutor;
-    
+
     protected PurgeTask purgeDefaultRepoTask;
-    
+
     protected PurgeTask purgeReleasesDirTask;
-    
+
     protected PurgeTask purgeBuildOutputDirTask;
 
     protected void setUp()
         throws Exception
     {
         super.setUp();
-        
+
         if ( purgeExecutor == null )
         {
             purgeExecutor = (TaskExecutor) lookup( TaskExecutor.class.getName(), "purge" );
         }
     }
-    
+
     protected void tearDown()
         throws Exception
     {
@@ -76,18 +76,18 @@
         FileUtils.deleteDirectory( getReleasesDirectoryLocation() );
         FileUtils.deleteDirectory( getBuildOutputDirectoryLocation() );
     }
-    
+
     protected PurgeTask getDaysOldRepoPurgeTask()
         throws Exception
     {
         repoConfig = new RepositoryPurgeConfiguration();
         repoConfig.setRepository( defaultRepository );
         repoConfig.setDaysOlder( TEST_DAYS_OLDER );
-        repoConfig = getStore().addRepositoryPurgeConfiguration( repoConfig );
-        
+        repoConfig = repositoryPurgeConfigurationDao.addRepositoryPurgeConfiguration( repoConfig );
+
         return new PurgeTask( repoConfig.getId() );
     }
-    
+
     protected PurgeTask getRetentionCountRepoPurgeTask()
         throws Exception
     {
@@ -95,11 +95,11 @@
         repoConfig.setRepository( defaultRepository );
         repoConfig.setDaysOlder( -1 );
         repoConfig.setRetentionCount( TEST_RETENTION_COUNT );
-        repoConfig = getStore().addRepositoryPurgeConfiguration( repoConfig );
-        
+        repoConfig = repositoryPurgeConfigurationDao.addRepositoryPurgeConfiguration( repoConfig );
+
         return new PurgeTask( repoConfig.getId() );
     }
-    
+
     protected PurgeTask getReleasedSnapshotsRepoPurgeTask()
         throws Exception
     {
@@ -108,11 +108,11 @@
         repoConfig.setDaysOlder( -1 );
         repoConfig.setRetentionCount( TEST_RETENTION_COUNT );
         repoConfig.setDeleteReleasedSnapshots( true );
-        repoConfig = getStore().addRepositoryPurgeConfiguration( repoConfig );
-        
+        repoConfig = repositoryPurgeConfigurationDao.addRepositoryPurgeConfiguration( repoConfig );
+
         return new PurgeTask( repoConfig.getId() );
     }
-    
+
     protected PurgeTask getDaysOldReleasesDirPurgeTask()
         throws Exception
     {
@@ -120,11 +120,11 @@
         dirConfig.setDirectoryType( TEST_RELEASES_DIRECTORY_TYPE );
         dirConfig.setLocation( getReleasesDirectoryLocation().getAbsolutePath() );
         dirConfig.setDaysOlder( TEST_DAYS_OLDER );
-        dirConfig = getStore().addDirectoryPurgeConfiguration( dirConfig );
-        
+        dirConfig = directoryPurgeConfigurationDao.addDirectoryPurgeConfiguration( dirConfig );
+
         return new PurgeTask( dirConfig.getId() );
     }
-    
+
     protected PurgeTask getDaysOldBuildOutputDirPurgeTask()
         throws Exception
     {
@@ -132,11 +132,11 @@
         dirConfig.setDirectoryType( TEST_BUILDOUTPUT_DIRECTORY_TYPE );
         dirConfig.setLocation( getBuildOutputDirectoryLocation().getAbsolutePath() );
         dirConfig.setDaysOlder( TEST_DAYS_OLDER );
-        dirConfig = getStore().addDirectoryPurgeConfiguration( dirConfig );
-        
+        dirConfig = directoryPurgeConfigurationDao.addDirectoryPurgeConfiguration( dirConfig );
+
         return new PurgeTask( dirConfig.getId() );
     }
-    
+
     protected PurgeTask getRetentionCountReleasesDirPurgeTask()
         throws Exception
     {
@@ -145,11 +145,11 @@
         dirConfig.setLocation( getReleasesDirectoryLocation().getAbsolutePath() );
         dirConfig.setDaysOlder( -1 );
         dirConfig.setRetentionCount( TEST_RETENTION_COUNT );
-        dirConfig = getStore().addDirectoryPurgeConfiguration( dirConfig );
-        
+        dirConfig = directoryPurgeConfigurationDao.addDirectoryPurgeConfiguration( dirConfig );
+
         return new PurgeTask( dirConfig.getId() );
     }
-    
+
     protected PurgeTask getRetentionCountBuildOutputDirPurgeTask()
         throws Exception
     {
@@ -158,40 +158,40 @@
         dirConfig.setLocation( getBuildOutputDirectoryLocation().getAbsolutePath() );
         dirConfig.setDaysOlder( -1 );
         dirConfig.setRetentionCount( TEST_RETENTION_COUNT );
-        dirConfig = getStore().addDirectoryPurgeConfiguration( dirConfig );
-        
+        dirConfig = directoryPurgeConfigurationDao.addDirectoryPurgeConfiguration( dirConfig );
+
         return new PurgeTask( dirConfig.getId() );
     }
-    
+
     protected PurgeTask getCleanAllDefaultRepoPurgeTask()
         throws Exception
     {
         return new PurgeTask( defaultRepoPurge.getId() );
     }
-    
+
     protected PurgeTask getCleanAllReleasesDirPurgeTask()
         throws Exception
     {
         return new PurgeTask( defaultReleasesDirPurge.getId() );
     }
-    
+
     protected PurgeTask getCleanAllBuildOutputDirPurgeTask()
         throws Exception
     {
         return new PurgeTask( defaultBuildOutputDirPurge.getId() );
     }
-    
+
     protected void setLastModified( String dirPath, long lastModified, boolean recurse )
     {
         File dir = new File( dirPath );
-        
+
         if ( recurse )
         {
             File[] contents = dir.listFiles();
             for ( int i = 0; i < contents.length; i++ )
             {
                 contents[i].setLastModified( lastModified );
-                
+
                 if ( contents[i].list() != null && contents[i].list().length > 0 )
                 {
                     setLastModified( contents[i].getAbsolutePath(), lastModified, true );
@@ -203,14 +203,14 @@
             dir.setLastModified( lastModified );
         }
     }
-    
+
     protected void assertIsEmpty( File dir )
     {
         File[] files = dir.listFiles();
-        
+
         assertEquals( "Directory should be clean: " + dir.getName(), 0, files.length );
     }
-    
+
     protected void assertDeleted( String path )
     {
         assertFalse( "File should have been deleted: " + path, new File( path ).exists() );
@@ -220,135 +220,130 @@
     {
         assertTrue( "File should exist: " + path, new File( path ).exists() );
     }
-    
+
     protected void assertMetadataDeleted( String projectRoot )
     {
         assertDeleted( projectRoot + "/" + TEST_MAVEN_METADATA + ".xml" );
         assertDeleted( projectRoot + "/" + TEST_MAVEN_METADATA + ".xml.sha1" );
         assertDeleted( projectRoot + "/" + TEST_MAVEN_METADATA + ".xml.md5" );
     }
-    
+
     protected void populateDefaultRepositoryForRetentionCount()
         throws Exception
     {
         prepareTestFolders();
-        
+
         List<String> versions = new ArrayList<String>();
         versions.add( "1.0RC1-20070504.153317-1" );
         versions.add( "1.0RC1-20070504.160758-2" );
         versions.add( "1.0RC1-20070505.090015-3" );
         versions.add( "1.0RC1-20070506.090132-4" );
 
-        createDefaultRepoFiles( "/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT",
-                                "jruby-rake-plugin", versions );
-        
+        createDefaultRepoFiles( "/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT", "jruby-rake-plugin", versions );
+
         versions = new ArrayList<String>();
         versions.add( "1.1.2-20070427.065136-1" );
         versions.add( "1.1.2-20070615.105019-3" );
         versions.add( "1.1.2-20070506.163513-2" );
 
-        createDefaultRepoFiles( "/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT",
-                                "castor-anttasks", versions );
+        createDefaultRepoFiles( "/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT", "castor-anttasks", versions );
     }
-    
+
     protected void populateDefaultRepository()
         throws Exception
     {
         prepareTestFolders();
-        
+
         List<String> versions = new ArrayList<String>();
         versions.add( "1.1.2-20070427.065136-1" );
         versions.add( "1.1.2-20070506.163513-2" );
         versions.add( "1.1.2-20070615.105019-3" );
-        
-        createDefaultRepoFiles( "/org/apache/maven/plugins/maven-assembly-plugin/1.1.2-SNAPSHOT", 
+
+        createDefaultRepoFiles( "/org/apache/maven/plugins/maven-assembly-plugin/1.1.2-SNAPSHOT",
                                 "maven-assembly-plugin", versions );
-        
+
         versions = new ArrayList<String>();
         versions.add( "2.2-20061118.060401-2" );
         versions.add( "2.2-20070513.034619-5" );
         versions.add( "2.2-SNAPSHOT" );
-        
-        createDefaultRepoFiles( "/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT",
-                                "maven-install-plugin", versions );
+
+        createDefaultRepoFiles( "/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT", "maven-install-plugin",
+                                versions );
     }
-    
+
     protected void populateDefaultRepositoryForReleasedSnapshots()
         throws Exception
     {
         populateDefaultRepository();
-        
+
         List<String> versions = new ArrayList<String>();
         versions.add( "2.2" );
-        
-        createDefaultRepoFiles( "/org/apache/maven/plugins/maven-plugin-plugin/2.2",
-                                "maven-plugin-plugin", versions );
-        
+
+        createDefaultRepoFiles( "/org/apache/maven/plugins/maven-plugin-plugin/2.2", "maven-plugin-plugin", versions );
+
         versions = new ArrayList<String>();
         versions.add( "2.3" );
-        createDefaultRepoFiles( "/org/apache/maven/plugins/maven-plugin-plugin/2.3",
-                                "maven-plugin-plugin", versions );
-        
+        createDefaultRepoFiles( "/org/apache/maven/plugins/maven-plugin-plugin/2.3", "maven-plugin-plugin", versions );
+
         versions = new ArrayList<String>();
         versions.add( "2.3-SNAPSHOT" );
-        createDefaultRepoFiles( "/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT",
-                                "maven-plugin-plugin", versions );
+        createDefaultRepoFiles( "/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT", "maven-plugin-plugin",
+                                versions );
     }
-    
+
     protected void populateReleasesDirectory()
         throws Exception
     {
         prepareTestFolders();
-        
+
         String repoPath = getReleasesDirectoryLocation().getAbsolutePath();
-        
-        String[] folders = new String[] { "1", "releases-4234729018", "", "releases-1234567809",
-                                          "releases-1234567890" };
-        
+
+        String[] folders = new String[]{"1", "releases-4234729018", "", "releases-1234567809", "releases-1234567890"};
+
         for ( int i = 0; i < folders.length; i++ )
         {
             File dir = new File( repoPath, folders[i] );
             dir.mkdir();
         }
     }
-    
+
     protected void populateBuildOutputDirectory()
         throws Exception
     {
         prepareTestFolders();
-        
+
         String repoPath = getBuildOutputDirectoryLocation().getAbsolutePath();
-        
+
         File projectDir1 = new File( repoPath, "1" );
         projectDir1.mkdir();
-        
+
         File projectDir2 = new File( repoPath, "2" );
         projectDir2.mkdir();
-        
-        String[] buildOutputs1 = new String[] { "1", "3", "6" };
-        String[] buildOutputs2 = new String[] { "4", "7", "9" }; 
-        
+
+        String[] buildOutputs1 = new String[]{"1", "3", "6"};
+        String[] buildOutputs2 = new String[]{"4", "7", "9"};
+
         for ( int i = 0; i < 3; i++ )
         {
             File outputDir1 = new File( projectDir1.getAbsolutePath(), buildOutputs1[i] );
             outputDir1.mkdir();
-            
+
             File outputFile1 = new File( projectDir1.getAbsolutePath(), buildOutputs1[i] + ".log.txt" );
             outputFile1.createNewFile();
-            
+
             File outputDir2 = new File( projectDir2.getAbsolutePath(), buildOutputs2[i] );
             outputDir2.mkdir();
-            
+
             File outputFile2 = new File( projectDir2.getAbsolutePath(), buildOutputs2[i] + ".log.txt" );
             outputFile2.createNewFile();
         }
     }
-    
+
     private void createDefaultRepoFiles( String versionPath, String artifactId, List<String> versions )
         throws Exception
     {
         String repoPath = getDefaultRepositoryLocation().getAbsolutePath();
-        
+
         File versionDir = new File( repoPath + versionPath );
         if ( !versionDir.exists() )
         {
@@ -357,33 +352,28 @@
             // create maven-metadata* files
             for ( int i = 0; i < metadata_extensions.length; i++ )
             {
-                File metadata = 
-                    new File( versionDir.getParentFile().getAbsolutePath(),
-                              TEST_MAVEN_METADATA + metadata_extensions[i] );
+                File metadata = new File( versionDir.getParentFile().getAbsolutePath(),
+                                          TEST_MAVEN_METADATA + metadata_extensions[i] );
                 metadata.createNewFile();
             }
         }
-        
+
         for ( String version : versions )
         {
             for ( int i = 0; i < jar_extensions.length; i++ )
             {
-                File file =
-                    new File( versionDir.getAbsolutePath(), artifactId + "-" +
-                              version + jar_extensions[i] );
+                File file = new File( versionDir.getAbsolutePath(), artifactId + "-" + version + jar_extensions[i] );
                 file.createNewFile();
             }
-            
+
             for ( int i = 0; i < pom_extensions.length; i++ )
             {
-                File file =
-                    new File( versionDir.getAbsolutePath(), artifactId + "-" +
-                              version + pom_extensions[i] );
+                File file = new File( versionDir.getAbsolutePath(), artifactId + "-" + version + pom_extensions[i] );
                 file.createNewFile();
             }
         }
     }
-    
+
     private void prepareTestFolders()
         throws Exception
     {

Modified: continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/CleanAllPurgeExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/CleanAllPurgeExecutorTest.java?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/CleanAllPurgeExecutorTest.java (original)
+++ continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/CleanAllPurgeExecutorTest.java Fri Aug  8 13:48:14 2008
@@ -1,12 +1,12 @@
 package org.apache.continuum.purge.executor;
 
+import org.apache.commons.io.filefilter.DirectoryFileFilter;
+import org.apache.maven.archiva.consumers.core.repository.ArtifactFilenameFilter;
+
 import java.io.File;
 import java.io.FileFilter;
 import java.io.FilenameFilter;
 
-import org.apache.commons.io.filefilter.DirectoryFileFilter;
-import org.apache.maven.archiva.consumers.core.repository.ArtifactFilenameFilter;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -36,63 +36,63 @@
         throws Exception
     {
         super.setUp();
-        
+
         purgeDefaultRepoTask = getCleanAllDefaultRepoPurgeTask();
-        
+
         purgeReleasesDirTask = getCleanAllReleasesDirPurgeTask();
-        
+
         purgeBuildOutputDirTask = getCleanAllBuildOutputDirPurgeTask();
     }
-    
+
     public void testCleanAllRepositoryPurging()
         throws Exception
     {
         populateDefaultRepository();
-        
+
         purgeExecutor.executeTask( purgeDefaultRepoTask );
-        
+
         assertIsEmpty( getDefaultRepositoryLocation() );
     }
-    
+
     public void testCleanAllReleasesPurging()
         throws Exception
     {
         populateReleasesDirectory();
-        
+
         File workingDir = getReleasesDirectoryLocation();
-        
+
         FilenameFilter filter = new ArtifactFilenameFilter( "releases-" );
-        
+
         File[] releasesDir = workingDir.listFiles( filter );
-        
+
         assertExists( workingDir.getAbsolutePath() + "/1" );
-        
+
         assertEquals( "check # of releases directory", 3, releasesDir.length );
-        
+
         purgeExecutor.executeTask( purgeReleasesDirTask );
-        
+
         // check if no releases dir
-        
+
         releasesDir = workingDir.listFiles( filter );
-        
+
         assertEquals( "releases directory must be empty", 0, releasesDir.length );
-        
+
         assertExists( workingDir.getAbsolutePath() + "/1" );
     }
-    
+
     public void testCleanAllBuildOutputPurging()
         throws Exception
     {
         populateBuildOutputDirectory();
-        
+
         File buildOutputDir = getBuildOutputDirectoryLocation();
-        
+
         purgeExecutor.executeTask( purgeBuildOutputDirTask );
-        
+
         FileFilter filter = DirectoryFileFilter.DIRECTORY;
-        
+
         File[] projectsDir = buildOutputDir.listFiles( filter );
-        
+
         for ( File projectDir : projectsDir )
         {
             assertIsEmpty( projectDir );

Modified: continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/DaysOldDirectoryPurgeExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/DaysOldDirectoryPurgeExecutorTest.java?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/DaysOldDirectoryPurgeExecutorTest.java (original)
+++ continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/DaysOldDirectoryPurgeExecutorTest.java Fri Aug  8 13:48:14 2008
@@ -29,46 +29,46 @@
         throws Exception
     {
         super.setUp();
-        
+
         purgeReleasesDirTask = getDaysOldReleasesDirPurgeTask();
-        
+
         purgeBuildOutputDirTask = getDaysOldBuildOutputDirPurgeTask();
     }
-    
+
     public void testReleasesDirPurgingByLastModified()
         throws Exception
     {
         populateReleasesDirectory();
-        
+
         String dirPath = getReleasesDirectoryLocation().getAbsolutePath();
-        
+
         setLastModified( dirPath, 1179382029, true );
         setLastModified( dirPath + "/releases-1234567809", 1023453892, false );
-        
+
         purgeExecutor.executeTask( purgeReleasesDirTask );
-        
+
         assertDeleted( dirPath + "/releases-1234567809" );
-        
+
         assertExists( dirPath + "/1" );
         assertExists( dirPath + "/releases-1234567890" );
         assertExists( dirPath + "/releases-4234729018" );
     }
-    
+
     public void testReleasesDirPurgingByOrderOfDeletion()
         throws Exception
     {
         populateReleasesDirectory();
-        
+
         String dirPath = getReleasesDirectoryLocation().getAbsolutePath();
-        
-        setLastModified( dirPath + "/releases-4234729018", new Long("1234567809"), false );
-        setLastModified( dirPath + "/releases-1234567809", new Long("4234729018"), false );
-        setLastModified( dirPath + "/releases-1234567890", new Long("2234567890"), false );
-        
+
+        setLastModified( dirPath + "/releases-4234729018", new Long( "1234567809" ), false );
+        setLastModified( dirPath + "/releases-1234567809", new Long( "4234729018" ), false );
+        setLastModified( dirPath + "/releases-1234567890", new Long( "2234567890" ), false );
+
         purgeExecutor.executeTask( purgeReleasesDirTask );
-        
+
         assertDeleted( dirPath + "/releases-4234729018" );
-        
+
         assertExists( dirPath + "/1" );
         assertExists( dirPath + "/releases-1234567890" );
         assertExists( dirPath + "/releases-1234567809" );
@@ -78,68 +78,68 @@
         throws Exception
     {
         populateBuildOutputDirectory();
-        
+
         String dirPath = getBuildOutputDirectoryLocation().getAbsolutePath();
-        
+
         setLastModified( dirPath, 1179382029, true );
         setLastModified( dirPath + "/1/1", 1023453892, false );
         setLastModified( dirPath + "/1/1.log.txt", 1023453892, false );
         setLastModified( dirPath + "/2/4", 1023453892, false );
         setLastModified( dirPath + "/2/4.log.txt", 1023453892, false );
-        
+
         purgeExecutor.executeTask( purgeBuildOutputDirTask );
-        
+
         assertDeleted( dirPath + "/1/1" );
         assertDeleted( dirPath + "/1/1.log.txt" );
-        
+
         assertExists( dirPath + "/1/3" );
         assertExists( dirPath + "/1/3.log.txt" );
         assertExists( dirPath + "/1/6" );
         assertExists( dirPath + "/1/6.log.txt" );
-        
+
         assertDeleted( dirPath + "/2/4" );
         assertDeleted( dirPath + "/2/4.log.txt" );
-        
+
         assertExists( dirPath + "/2/7" );
         assertExists( dirPath + "/2/7.log.txt" );
         assertExists( dirPath + "/2/9" );
         assertExists( dirPath + "/2/9.log.txt" );
     }
-    
+
     public void testBuildOutputPurgingByOrderOfDeletion()
         throws Exception
     {
         populateBuildOutputDirectory();
-        
+
         String dirPath = getBuildOutputDirectoryLocation().getAbsolutePath();
-        
-        setLastModified( dirPath + "/1/6", new Long("1234567809"), false );
-        setLastModified( dirPath + "/1/6.log.txt", new Long("1234567809"), false );
-        setLastModified( dirPath + "/1/1", new Long("4234729018"), false );
-        setLastModified( dirPath + "/1/1.log.txt", new Long("4234729018"), false );
-        setLastModified( dirPath + "/1/3", new Long("2234567890"), false );
-        setLastModified( dirPath + "/1/3.log.txt", new Long("2234567890"), false );
-        
-        setLastModified( dirPath + "/2/7", new Long("1234567809"), false );
-        setLastModified( dirPath + "/2/7.log.txt", new Long("1234567809"), false );
-        setLastModified( dirPath + "/2/4", new Long("4234729018"), false );
-        setLastModified( dirPath + "/2/4.log.txt", new Long("4234729018"), false );
-        setLastModified( dirPath + "/2/9", new Long("2234567890"), false );
-        setLastModified( dirPath + "/2/9.log.txt", new Long("2234567890"), false );
-        
+
+        setLastModified( dirPath + "/1/6", new Long( "1234567809" ), false );
+        setLastModified( dirPath + "/1/6.log.txt", new Long( "1234567809" ), false );
+        setLastModified( dirPath + "/1/1", new Long( "4234729018" ), false );
+        setLastModified( dirPath + "/1/1.log.txt", new Long( "4234729018" ), false );
+        setLastModified( dirPath + "/1/3", new Long( "2234567890" ), false );
+        setLastModified( dirPath + "/1/3.log.txt", new Long( "2234567890" ), false );
+
+        setLastModified( dirPath + "/2/7", new Long( "1234567809" ), false );
+        setLastModified( dirPath + "/2/7.log.txt", new Long( "1234567809" ), false );
+        setLastModified( dirPath + "/2/4", new Long( "4234729018" ), false );
+        setLastModified( dirPath + "/2/4.log.txt", new Long( "4234729018" ), false );
+        setLastModified( dirPath + "/2/9", new Long( "2234567890" ), false );
+        setLastModified( dirPath + "/2/9.log.txt", new Long( "2234567890" ), false );
+
         purgeExecutor.executeTask( purgeBuildOutputDirTask );
-        
+
         assertDeleted( dirPath + "/1/6" );
         assertDeleted( dirPath + "/1/6.log.txt" );
-        
+
         assertExists( dirPath + "/1/3" );
         assertExists( dirPath + "/1/3.log.txt" );
         assertExists( dirPath + "/1/1" );
         assertExists( dirPath + "/1/1.log.txt" );
-        
+
         assertDeleted( dirPath + "/2/7" );
         assertDeleted( dirPath + "/2/7.log.txt" );
-        
+
         assertExists( dirPath + "/2/4" );
         assertExists( dirPath + "/2/4.log.txt" );
         assertExists( dirPath + "/2/9" );

Modified: continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/DaysOldRepositoryPurgeExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/DaysOldRepositoryPurgeExecutorTest.java?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/DaysOldRepositoryPurgeExecutorTest.java (original)
+++ continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/DaysOldRepositoryPurgeExecutorTest.java Fri Aug  8 13:48:14 2008
@@ -31,23 +31,23 @@
         super.setUp();
 
         populateDefaultRepository();
-        
+
         purgeDefaultRepoTask = getDaysOldRepoPurgeTask();
     }
-    
+
     public void testDefaultRepoPurgingByLastModified()
         throws Exception
-    {   
-        String repoRoot = getDefaultRepositoryLocation().getAbsolutePath(); 
-        
+    {
+        String repoRoot = getDefaultRepositoryLocation().getAbsolutePath();
+
         String projectRoot = repoRoot + "/org/apache/maven/plugins/maven-install-plugin";
 
         setLastModified( projectRoot + "/2.2-SNAPSHOT/", 1179382029, true );
-        
+
         purgeExecutor.executeTask( purgeDefaultRepoTask );
 
         assertMetadataDeleted( projectRoot );
-        
+
         assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar" );
         assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.md5" );
         assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.sha1" );
@@ -70,40 +70,40 @@
         assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.pom.md5" );
         assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.pom.sha1" );
     }
-    
+
     public void testDefaultRepoOrderOfDeletion()
         throws Exception
     {
-       String repoRoot = getDefaultRepositoryLocation().getAbsolutePath();
-       
-       String projectRoot = repoRoot + "/org/apache/maven/plugins/maven-assembly-plugin";
-       
-       setLastModified( projectRoot + "/1.1.2-SNAPSHOT/", 1179382029, true );
-       
-       purgeExecutor.executeTask( purgeDefaultRepoTask );
-       
-       assertMetadataDeleted( projectRoot );
-       
-       assertDeleted( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.jar" );
-       assertDeleted( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.jar.sha1" );
-       assertDeleted( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.jar.md5" );
-       assertDeleted( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.pom" );
-       assertDeleted( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.pom.sha1" );
-       assertDeleted( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.pom.md5" );
-
-       // the following should not have been deleted
-       assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070506.163513-2.jar" );
-       assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070506.163513-2.jar.sha1" );
-       assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070506.163513-2.jar.md5" );
-       assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070506.163513-2.pom" );
-       assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070506.163513-2.pom.sha1" );
-       assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070506.163513-2.pom.md5" );
-
-       assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.jar" );
-       assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.jar.sha1" );
-       assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.jar.md5" );
-       assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.pom" );
-       assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.pom.sha1" );
-       assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.pom.md5" );
+        String repoRoot = getDefaultRepositoryLocation().getAbsolutePath();
+
+        String projectRoot = repoRoot + "/org/apache/maven/plugins/maven-assembly-plugin";
+
+        setLastModified( projectRoot + "/1.1.2-SNAPSHOT/", 1179382029, true );
+
+        purgeExecutor.executeTask( purgeDefaultRepoTask );
+
+        assertMetadataDeleted( projectRoot );
+
+        assertDeleted( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.jar" );
+        assertDeleted( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.jar.sha1" );
+        assertDeleted( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.jar.md5" );
+        assertDeleted( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.pom" );
+        assertDeleted( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.pom.sha1" );
+        assertDeleted( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.pom.md5" );
+
+        // the following should not have been deleted
+        assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070506.163513-2.jar" );
+        assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070506.163513-2.jar.sha1" );
+        assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070506.163513-2.jar.md5" );
+        assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070506.163513-2.pom" );
+        assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070506.163513-2.pom.sha1" );
+        assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070506.163513-2.pom.md5" );
+
+        assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.jar" );
+        assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.jar.sha1" );
+        assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.jar.md5" );
+        assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.pom" );
+        assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.pom.sha1" );
+        assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.pom.md5" );
     }
 }

Modified: continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/ReleasedSnapshotsRepositoryPurgeExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/ReleasedSnapshotsRepositoryPurgeExecutorTest.java?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/ReleasedSnapshotsRepositoryPurgeExecutorTest.java (original)
+++ continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/ReleasedSnapshotsRepositoryPurgeExecutorTest.java Fri Aug  8 13:48:14 2008
@@ -29,27 +29,27 @@
         throws Exception
     {
         super.setUp();
-        
+
         populateDefaultRepositoryForReleasedSnapshots();
-        
+
         purgeDefaultRepoTask = getReleasedSnapshotsRepoPurgeTask();
     }
-    
+
     public void testDefaultRepoReleasedSnapshotsPurging()
         throws Exception
     {
         String repoRoot = getDefaultRepositoryLocation().getAbsolutePath();
-        
+
         String projectRoot1 = repoRoot + "/org/apache/maven/plugins/maven-assembly-plugin";
         String projectRoot2 = repoRoot + "/org/apache/maven/plugins/maven-install-plugin";
         String projectRoot3 = repoRoot + "/org/apache/maven/plugins/maven-plugin-plugin";
-        
+
         purgeExecutor.executeTask( purgeDefaultRepoTask );
-        
+
         assertMetadataDeleted( projectRoot1 );
         assertMetadataDeleted( projectRoot2 );
         assertMetadataDeleted( projectRoot3 );
-        
+
         assertDeleted( projectRoot1 + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.jar" );
         assertDeleted( projectRoot1 + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.jar.sha1" );
         assertDeleted( projectRoot1 + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.jar.md5" );
@@ -70,7 +70,7 @@
         assertExists( projectRoot1 + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.pom" );
         assertExists( projectRoot1 + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.pom.sha1" );
         assertExists( projectRoot1 + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.pom.md5" );
-        
+
         assertDeleted( projectRoot2 + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar" );
         assertDeleted( projectRoot2 + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.md5" );
         assertDeleted( projectRoot2 + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.sha1" );
@@ -91,7 +91,7 @@
         assertExists( projectRoot2 + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.pom" );
         assertExists( projectRoot2 + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.pom.md5" );
         assertExists( projectRoot2 + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.pom.sha1" );
-        
+
         // check if the snapshot version was removed
         assertDeleted( projectRoot3 + "/2.3-SNAPSHOT" );
         assertDeleted( projectRoot3 + "/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.jar" );
@@ -109,7 +109,7 @@
         assertExists( projectRoot3 + "/2.2/maven-plugin-plugin-2.2.pom" );
         assertExists( projectRoot3 + "/2.2/maven-plugin-plugin-2.2.pom.md5" );
         assertExists( projectRoot3 + "/2.2/maven-plugin-plugin-2.2.pom.sha1" );
-        
+
         assertExists( projectRoot3 + "/2.3" );
         assertExists( projectRoot3 + "/2.3/maven-plugin-plugin-2.3.jar" );
         assertExists( projectRoot3 + "/2.3/maven-plugin-plugin-2.3.jar.md5" );

Modified: continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/RetentionCountDirectoryPurgeExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/RetentionCountDirectoryPurgeExecutorTest.java?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/RetentionCountDirectoryPurgeExecutorTest.java (original)
+++ continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/RetentionCountDirectoryPurgeExecutorTest.java Fri Aug  8 13:48:14 2008
@@ -1,12 +1,12 @@
 package org.apache.continuum.purge.executor;
 
+import org.apache.commons.io.filefilter.DirectoryFileFilter;
+import org.apache.maven.archiva.consumers.core.repository.ArtifactFilenameFilter;
+
 import java.io.File;
 import java.io.FileFilter;
 import java.io.FilenameFilter;
 
-import org.apache.commons.io.filefilter.DirectoryFileFilter;
-import org.apache.maven.archiva.consumers.core.repository.ArtifactFilenameFilter;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -36,67 +36,67 @@
         throws Exception
     {
         super.setUp();
-        
+
         purgeReleasesDirTask = getRetentionCountReleasesDirPurgeTask();
-        
+
         purgeBuildOutputDirTask = getRetentionCountBuildOutputDirPurgeTask();
     }
-    
+
     public void testReleasesDirPurging()
         throws Exception
     {
         populateReleasesDirectory();
-        
+
         String dirPath = getReleasesDirectoryLocation().getAbsolutePath();
         FilenameFilter filter = new ArtifactFilenameFilter( "releases-" );
-        
+
         File[] workingDir = new File( dirPath ).listFiles();
         File[] releasesDir = new File( dirPath ).listFiles( filter );
-        
+
         assertEquals( "# of folders inside working directory", 4, workingDir.length );
         assertEquals( "# of releases folders inside working directory", 3, releasesDir.length );
         assertExists( dirPath + "/1" );
-        
+
         purgeExecutor.executeTask( purgeReleasesDirTask );
-        
+
         workingDir = new File( dirPath ).listFiles();
         releasesDir = new File( dirPath ).listFiles( filter );
-        
+
         assertEquals( "# of folders inside working directory", 3, workingDir.length );
         assertEquals( "# of releases folders inside working directory", 2, releasesDir.length );
         assertExists( dirPath + "/1" );
     }
-    
+
     public void testBuildOutputDirPurging()
         throws Exception
     {
         populateBuildOutputDirectory();
-        
+
         String dirPath = getBuildOutputDirectoryLocation().getAbsolutePath();
-        
+
         File projectPath1 = new File( dirPath, "1" );
         File projectPath2 = new File( dirPath, "2" );
-        
+
         FileFilter filter = DirectoryFileFilter.DIRECTORY;
         File[] files1 = projectPath1.listFiles( filter );
         File[] files2 = projectPath2.listFiles( filter );
-        
+
         assertEquals( "check # of build output dir", 3, files1.length );
         assertEquals( "check # of build output dir", 3, files2.length );
-        
+
         purgeExecutor.executeTask( purgeBuildOutputDirTask );
-        
+
         files1 = projectPath1.listFiles( filter );
         files2 = projectPath2.listFiles( filter );
-        
+
         assertEquals( "check # of build output dir", 2, files1.length );
         assertEquals( "check # of build output dir", 2, files2.length );
-        
+
         for ( File file : files1 )
         {
             assertExists( file.getAbsolutePath() + ".log.txt" );
         }
-        
+
         for ( File file : files2 )
         {
             assertExists( file.getAbsolutePath() + ".log.txt" );

Modified: continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/RetentionCountRepositoryPurgeExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/RetentionCountRepositoryPurgeExecutorTest.java?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/RetentionCountRepositoryPurgeExecutorTest.java (original)
+++ continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/RetentionCountRepositoryPurgeExecutorTest.java Fri Aug  8 13:48:14 2008
@@ -29,26 +29,26 @@
         throws Exception
     {
         super.setUp();
-        
+
         purgeDefaultRepoTask = getRetentionCountRepoPurgeTask();
     }
-    
+
     public void testRetentionCountPurging()
         throws Exception
     {
         populateDefaultRepositoryForRetentionCount();
-        
+
         String repoRoot = getDefaultRepositoryLocation().getAbsolutePath();
-        
+
         String projectRoot1 = repoRoot + "/org/jruby/plugins/jruby-rake-plugin";
         String projectRoot2 = repoRoot + "/org/codehaus/castor/castor-anttasks";
-        
+
         purgeExecutor.executeTask( purgeDefaultRepoTask );
-        
+
         // assert if metadata was removed
         assertMetadataDeleted( projectRoot1 );
         assertMetadataDeleted( projectRoot2 );
-        
+
         // assert if removed from repo
         assertDeleted( projectRoot1 + "/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.jar" );
         assertDeleted( projectRoot1 + "/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.jar.md5" );
@@ -102,22 +102,22 @@
         assertExists( projectRoot2 + "/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2.jar.md5" );
         assertExists( projectRoot2 + "/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2.jar.sha1" );
     }
-    
+
     public void testOrderOfDeletion()
         throws Exception
     {
         populateDefaultRepository();
-        
+
         String repoRoot = getDefaultRepositoryLocation().getAbsolutePath();
-        
+
         String projectRoot1 = repoRoot + "/org/apache/maven/plugins/maven-assembly-plugin";
         String projectRoot2 = repoRoot + "/org/apache/maven/plugins/maven-install-plugin";
-        
+
         purgeExecutor.executeTask( purgeDefaultRepoTask );
-        
+
         assertMetadataDeleted( projectRoot1 );
         assertMetadataDeleted( projectRoot2 );
-        
+
         assertDeleted( projectRoot1 + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.jar" );
         assertDeleted( projectRoot1 + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.jar.sha1" );
         assertDeleted( projectRoot1 + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.jar.md5" );
@@ -138,7 +138,7 @@
         assertExists( projectRoot1 + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.pom" );
         assertExists( projectRoot1 + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.pom.sha1" );
         assertExists( projectRoot1 + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.pom.md5" );
-        
+
         assertDeleted( projectRoot2 + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar" );
         assertDeleted( projectRoot2 + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.md5" );
         assertDeleted( projectRoot2 + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.sha1" );

Modified: continuum/trunk/continuum-purge/src/test/resources/META-INF/continuum/continuum-configuration.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-purge/src/test/resources/META-INF/continuum/continuum-configuration.xml?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-purge/src/test/resources/META-INF/continuum/continuum-configuration.xml (original)
+++ continuum/trunk/continuum-purge/src/test/resources/META-INF/continuum/continuum-configuration.xml Fri Aug  8 13:48:14 2008
@@ -21,9 +21,9 @@
 
 <configuration>
   <system/>
-  <jndi prefix="java:comp/env" config-optional="true"/>  
+  <jndi prefix="java:comp/env" config-optional="true"/>
   <xml fileName="target/conf/continuum.xml" config-optional="true"
        config-forceCreate="true" config-name="org.apache.continuum"/>
   <xml fileName="target/.m2/continuum.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-store/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/pom.xml?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-store/pom.xml (original)
+++ continuum/trunk/continuum-store/pom.xml Fri Aug  8 13:48:14 2008
@@ -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</artifactId>
     <groupId>org.apache.continuum</groupId>
@@ -59,6 +60,10 @@
       <artifactId>plexus-utils</artifactId>
     </dependency>
     <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>
+    <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-slf4j-logging</artifactId>
       <scope>test</scope>

Modified: continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java (original)
+++ continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java Fri Aug  8 13:48:14 2008
@@ -19,6 +19,16 @@
  * under the License.
  */
 
+import org.apache.continuum.dao.DaoUtils;
+import org.apache.continuum.dao.DirectoryPurgeConfigurationDao;
+import org.apache.continuum.dao.InstallationDao;
+import org.apache.continuum.dao.LocalRepositoryDao;
+import org.apache.continuum.dao.ProfileDao;
+import org.apache.continuum.dao.ProjectDao;
+import org.apache.continuum.dao.ProjectGroupDao;
+import org.apache.continuum.dao.RepositoryPurgeConfigurationDao;
+import org.apache.continuum.dao.ScheduleDao;
+import org.apache.continuum.dao.SystemConfigurationDao;
 import org.apache.continuum.model.repository.DirectoryPurgeConfiguration;
 import org.apache.continuum.model.repository.LocalRepository;
 import org.apache.continuum.model.repository.RepositoryPurgeConfiguration;
@@ -53,7 +63,25 @@
 public abstract class AbstractContinuumStoreTestCase
     extends PlexusInSpringTestCase
 {
-    protected ContinuumStore store;
+    protected DaoUtils daoUtilsImpl;
+
+    protected DirectoryPurgeConfigurationDao directoryPurgeConfigurationDao;
+
+    protected LocalRepositoryDao localRepositoryDao;
+
+    protected RepositoryPurgeConfigurationDao repositoryPurgeConfigurationDao;
+
+    protected InstallationDao installationDao;
+
+    protected ProfileDao profileDao;
+
+    protected ProjectGroupDao projectGroupDao;
+
+    protected ProjectDao projectDao;
+
+    protected ScheduleDao scheduleDao;
+
+    protected SystemConfigurationDao systemConfigurationDao;
 
     protected ProjectGroup defaultProjectGroup;
 
@@ -88,53 +116,50 @@
     protected BuildResult testBuildResult3;
 
     protected ScmResult testCheckoutResult1;
-    
+
     protected LocalRepository testLocalRepository1;
-    
+
     protected LocalRepository testLocalRepository2;
-    
+
     protected LocalRepository testLocalRepository3;
-    
+
     protected RepositoryPurgeConfiguration testRepoPurgeConfiguration1;
-    
-    protected RepositoryPurgeConfiguration testRepoPurgeConfiguration2;
-    
-    protected RepositoryPurgeConfiguration testRepoPurgeConfiguration3;
-    
-    protected DirectoryPurgeConfiguration testDirectoryPurgeConfig;
 
-    private ProjectNotifier testGroupNotifier1;
+    protected RepositoryPurgeConfiguration testRepoPurgeConfiguration2;
 
-    private ProjectNotifier testGroupNotifier2;
+    protected RepositoryPurgeConfiguration testRepoPurgeConfiguration3;
 
-    private ProjectNotifier testGroupNotifier3;
+    protected DirectoryPurgeConfiguration testDirectoryPurgeConfig;
 
-    private ProjectNotifier testNotifier1;
+    private SystemConfiguration systemConfiguration;
 
-    private ProjectNotifier testNotifier2;
+    @Override
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
 
-    private ProjectNotifier testNotifier3;
+        createStore();
 
-    private ProjectDeveloper testDeveloper1;
+        directoryPurgeConfigurationDao =
+            (DirectoryPurgeConfigurationDao) lookup( DirectoryPurgeConfigurationDao.class.getName() );
 
-    private ProjectDeveloper testDeveloper2;
+        localRepositoryDao = (LocalRepositoryDao) lookup( LocalRepositoryDao.class.getName() );
 
-    private ProjectDeveloper testDeveloper3;
+        repositoryPurgeConfigurationDao =
+            (RepositoryPurgeConfigurationDao) lookup( RepositoryPurgeConfigurationDao.class.getName() );
 
-    private ProjectDependency testDependency1;
+        installationDao = (InstallationDao) lookup( InstallationDao.class.getName() );
 
-    private ProjectDependency testDependency2;
+        profileDao = (ProfileDao) lookup( ProfileDao.class.getName() );
 
-    private ProjectDependency testDependency3;
+        projectGroupDao = (ProjectGroupDao) lookup( ProjectGroupDao.class.getName() );
 
-    private SystemConfiguration systemConfiguration;
+        projectDao = (ProjectDao) lookup( ProjectDao.class.getName() );
 
-    protected void setUp()
-        throws Exception
-    {
-        super.setUp();
+        scheduleDao = (ScheduleDao) lookup( ScheduleDao.class.getName() );
 
-        store = createStore();
+        systemConfigurationDao = (SystemConfigurationDao) lookup( SystemConfigurationDao.class.getName() );
     }
 
     protected void createBuildDatabase()
@@ -148,11 +173,11 @@
     {
         // Setting up test data
         testLocalRepository1 = createTestLocalRepository( "name1", "location1", "layout1" );
-        
+
         LocalRepository localRepository1 = createTestLocalRepository( testLocalRepository1 );
         if ( addToStore )
         {
-            localRepository1 = store.addLocalRepository( localRepository1 );
+            localRepository1 = localRepositoryDao.addLocalRepository( localRepository1 );
             testLocalRepository1.setId( localRepository1.getId() );
         }
         else
@@ -160,13 +185,13 @@
             localRepository1.setId( 1 );
             testLocalRepository1.setId( 1 );
         }
-        
+
         testLocalRepository2 = createTestLocalRepository( "name2", "location2", "layout2" );
-        
+
         LocalRepository localRepository2 = createTestLocalRepository( testLocalRepository2 );
         if ( addToStore )
         {
-            localRepository2 = store.addLocalRepository( localRepository2 );
+            localRepository2 = localRepositoryDao.addLocalRepository( localRepository2 );
             testLocalRepository2.setId( localRepository2.getId() );
         }
         else
@@ -174,13 +199,13 @@
             localRepository2.setId( 2 );
             testLocalRepository2.setId( 2 );
         }
-        
+
         testLocalRepository3 = createTestLocalRepository( "name3", "location3", "layout3" );
-        
+
         LocalRepository localRepository3 = createTestLocalRepository( testLocalRepository3 );
         if ( addToStore )
         {
-            localRepository3 = store.addLocalRepository( localRepository3 );
+            localRepository3 = localRepositoryDao.addLocalRepository( localRepository3 );
             testLocalRepository3.setId( localRepository3.getId() );
         }
         else
@@ -188,13 +213,12 @@
             localRepository3.setId( 3 );
             testLocalRepository3.setId( 3 );
         }
-        
-        defaultProjectGroup =
-            createTestProjectGroup( "Default Group", "The Default Group", "org.apache.maven.test.default",
-                                    localRepository1);
 
-        testProjectGroup2 = createTestProjectGroup( "test group 2", "test group 2 desc", "test group 2 groupId",
-                                                    localRepository2);
+        defaultProjectGroup = createTestProjectGroup( "Default Group", "The Default Group",
+                                                      "org.apache.maven.test.default", localRepository1 );
+
+        testProjectGroup2 =
+            createTestProjectGroup( "test group 2", "test group 2 desc", "test group 2 groupId", localRepository2 );
 
         testProject1 = createTestProject( "artifactId1", 1, "description1", defaultProjectGroup.getGroupId(), "name1",
                                           "scmUrl1", 1, "url1", "version1", "workingDirectory1" );
@@ -214,21 +238,21 @@
         testInstallationMaven20a3 = createTestInstallation( "Maven 2.0 alpha 3", InstallationService.MAVEN2_TYPE,
                                                             "M2_HOME", "/usr/local/maven-2.0-alpha-3" );
 
-        testGroupNotifier1 = createTestNotifier( 1, true, false, true, "type1" );
-        testGroupNotifier2 = createTestNotifier( 2, false, true, false, "type2" );
-        testGroupNotifier3 = createTestNotifier( 3, true, false, false, "type3" );
-
-        testNotifier1 = createTestNotifier( 11, true, true, false, "type11" );
-        testNotifier2 = createTestNotifier( 12, false, false, true, "type12" );
-        testNotifier3 = createTestNotifier( 13, false, true, false, "type13" );
-
-        testDeveloper1 = createTestDeveloper( 1, "email1", "name1", "scmId1" );
-        testDeveloper2 = createTestDeveloper( 2, "email2", "name2", "scmId2" );
-        testDeveloper3 = createTestDeveloper( 3, "email3", "name3", "scmId3" );
-
-        testDependency1 = createTestDependency( "groupId1", "artifactId1", "version1" );
-        testDependency2 = createTestDependency( "groupId2", "artifactId2", "version2" );
-        testDependency3 = createTestDependency( "groupId3", "artifactId3", "version3" );
+        ProjectNotifier testGroupNotifier1 = createTestNotifier( 1, true, false, true, "type1" );
+        ProjectNotifier testGroupNotifier2 = createTestNotifier( 2, false, true, false, "type2" );
+        ProjectNotifier testGroupNotifier3 = createTestNotifier( 3, true, false, false, "type3" );
+
+        ProjectNotifier testNotifier1 = createTestNotifier( 11, true, true, false, "type11" );
+        ProjectNotifier testNotifier2 = createTestNotifier( 12, false, false, true, "type12" );
+        ProjectNotifier testNotifier3 = createTestNotifier( 13, false, true, false, "type13" );
+
+        ProjectDeveloper testDeveloper1 = createTestDeveloper( 1, "email1", "name1", "scmId1" );
+        ProjectDeveloper testDeveloper2 = createTestDeveloper( 2, "email2", "name2", "scmId2" );
+        ProjectDeveloper testDeveloper3 = createTestDeveloper( 3, "email3", "name3", "scmId3" );
+
+        ProjectDependency testDependency1 = createTestDependency( "groupId1", "artifactId1", "version1" );
+        ProjectDependency testDependency2 = createTestDependency( "groupId2", "artifactId2", "version2" );
+        ProjectDependency testDependency3 = createTestDependency( "groupId3", "artifactId3", "version3" );
 
         // TODO: simplify by deep copying the relationships in createTest... ?
         long baseTime = System.currentTimeMillis();
@@ -258,7 +282,7 @@
         Schedule schedule2 = createTestSchedule( testSchedule2 );
         if ( addToStore )
         {
-            schedule2 = store.addSchedule( schedule2 );
+            schedule2 = scheduleDao.addSchedule( schedule2 );
             testSchedule2.setId( schedule2.getId() );
         }
         else
@@ -270,7 +294,7 @@
         Schedule schedule1 = createTestSchedule( testSchedule1 );
         if ( addToStore )
         {
-            schedule1 = store.addSchedule( schedule1 );
+            schedule1 = scheduleDao.addSchedule( schedule1 );
             testSchedule1.setId( schedule1.getId() );
         }
         else
@@ -282,7 +306,7 @@
         Schedule schedule3 = createTestSchedule( testSchedule3 );
         if ( addToStore )
         {
-            schedule3 = store.addSchedule( schedule3 );
+            schedule3 = scheduleDao.addSchedule( schedule3 );
             testSchedule3.setId( schedule3.getId() );
         }
         else
@@ -294,7 +318,7 @@
         Installation installationJava14 = createTestInstallation( testInstallationJava14 );
         if ( addToStore )
         {
-            installationJava14 = store.addInstallation( installationJava14 );
+            installationJava14 = installationDao.addInstallation( installationJava14 );
         }
         else
         {
@@ -304,7 +328,7 @@
         Installation installationMaven20a3 = createTestInstallation( testInstallationMaven20a3 );
         if ( addToStore )
         {
-            installationMaven20a3 = store.addInstallation( installationMaven20a3 );
+            installationMaven20a3 = installationDao.addInstallation( installationMaven20a3 );
         }
         else
         {
@@ -314,7 +338,7 @@
         Installation installationJava13 = createTestInstallation( testInstallationJava13 );
         if ( addToStore )
         {
-            installationJava13 = store.addInstallation( installationJava13 );
+            installationJava13 = installationDao.addInstallation( installationJava13 );
         }
         else
         {
@@ -331,7 +355,7 @@
         Profile profile1 = createTestProfile( testProfile1 );
         if ( addToStore )
         {
-            profile1 = store.addProfile( profile1 );
+            profile1 = profileDao.addProfile( profile1 );
             testProfile1.setId( profile1.getId() );
         }
         else
@@ -342,7 +366,7 @@
         Profile profile2 = createTestProfile( testProfile2 );
         if ( addToStore )
         {
-            profile2 = store.addProfile( profile2 );
+            profile2 = profileDao.addProfile( profile2 );
             testProfile2.setId( profile2.getId() );
         }
         else
@@ -353,7 +377,7 @@
         Profile profile3 = createTestProfile( testProfile3 );
         if ( addToStore )
         {
-            profile3 = store.addProfile( profile3 );
+            profile3 = profileDao.addProfile( profile3 );
             testProfile3.setId( profile3.getId() );
         }
         else
@@ -361,46 +385,54 @@
             profile3.setId( 3 );
         }
 
-        testRepoPurgeConfiguration1 = createTestRepositoryPurgeConfiguration( true, 5, 50, false, schedule2, true, localRepository1 );
+        testRepoPurgeConfiguration1 =
+            createTestRepositoryPurgeConfiguration( true, 5, 50, false, schedule2, true, localRepository1 );
         if ( addToStore )
         {
-            testRepoPurgeConfiguration1 = store.addRepositoryPurgeConfiguration( testRepoPurgeConfiguration1 );
+            testRepoPurgeConfiguration1 =
+                repositoryPurgeConfigurationDao.addRepositoryPurgeConfiguration( testRepoPurgeConfiguration1 );
         }
         else
         {
             testRepoPurgeConfiguration1.setId( 1 );
         }
-        
-        testRepoPurgeConfiguration2 = createTestRepositoryPurgeConfiguration( false, 10, 200, true, schedule1, true, localRepository2 );
+
+        testRepoPurgeConfiguration2 =
+            createTestRepositoryPurgeConfiguration( false, 10, 200, true, schedule1, true, localRepository2 );
         if ( addToStore )
         {
-            testRepoPurgeConfiguration2 = store.addRepositoryPurgeConfiguration( testRepoPurgeConfiguration2 );
+            testRepoPurgeConfiguration2 =
+                repositoryPurgeConfigurationDao.addRepositoryPurgeConfiguration( testRepoPurgeConfiguration2 );
         }
         else
         {
             testRepoPurgeConfiguration2.setId( 2 );
         }
-        
-        testRepoPurgeConfiguration3 = createTestRepositoryPurgeConfiguration( false, 10, 200, true, schedule2, true, localRepository1 );
+
+        testRepoPurgeConfiguration3 =
+            createTestRepositoryPurgeConfiguration( false, 10, 200, true, schedule2, true, localRepository1 );
         if ( addToStore )
         {
-            testRepoPurgeConfiguration3 = store.addRepositoryPurgeConfiguration( testRepoPurgeConfiguration3 );
+            testRepoPurgeConfiguration3 =
+                repositoryPurgeConfigurationDao.addRepositoryPurgeConfiguration( testRepoPurgeConfiguration3 );
         }
         else
         {
             testRepoPurgeConfiguration3.setId( 3 );
         }
-        
-        testDirectoryPurgeConfig = createTestDirectoryPurgeConfiguration( "location1", "directoryType1", true, 10, 50, schedule2, true );
+
+        testDirectoryPurgeConfig =
+            createTestDirectoryPurgeConfiguration( "location1", "directoryType1", true, 10, 50, schedule2, true );
         if ( addToStore )
         {
-            testDirectoryPurgeConfig = store.addDirectoryPurgeConfiguration( testDirectoryPurgeConfig );
+            testDirectoryPurgeConfig =
+                directoryPurgeConfigurationDao.addDirectoryPurgeConfiguration( testDirectoryPurgeConfig );
         }
         else
         {
             testDirectoryPurgeConfig.setId( 1 );
         }
-        
+
         BuildDefinition testGroupBuildDefinition1 =
             createTestBuildDefinition( "arguments1", "buildFile1", "goals1", profile1, schedule2, false, false );
         BuildDefinition testGroupBuildDefinition2 =
@@ -495,7 +527,7 @@
 
         if ( addToStore )
         {
-            store.addProjectGroup( group );
+            projectGroupDao.addProjectGroup( group );
             defaultProjectGroup.setId( group.getId() );
             testProject1.setId( project1.getId() );
             testProject2.setId( project2.getId() );
@@ -531,7 +563,7 @@
 
         if ( addToStore )
         {
-            store.addProjectGroup( group );
+            projectGroupDao.addProjectGroup( group );
             testProjectGroup2.setId( group.getId() );
         }
         else
@@ -551,37 +583,38 @@
 
         if ( addToStore )
         {
-            systemConfiguration = store.addSystemConfiguration( systemConfiguration );
+            systemConfiguration = systemConfigurationDao.addSystemConfiguration( systemConfiguration );
         }
     }
 
+    @Override
     protected void tearDown()
         throws Exception
     {
         super.tearDown();
 
-        store.eraseDatabase();
+        daoUtilsImpl.eraseDatabase();
 
-        store.closeStore();
+        daoUtilsImpl.closeStore();
     }
 
     protected void assertBuildDatabase()
         throws ContinuumStoreException
     {
-        assertProjectGroupEquals( defaultProjectGroup, store.getProjectGroup( defaultProjectGroup.getId() ) );
-        assertProjectGroupEquals( testProjectGroup2, store.getProjectGroup( testProjectGroup2.getId() ) );
+        assertProjectGroupEquals( defaultProjectGroup, projectGroupDao.getProjectGroup( defaultProjectGroup.getId() ) );
+        assertProjectGroupEquals( testProjectGroup2, projectGroupDao.getProjectGroup( testProjectGroup2.getId() ) );
 
-        assertProjectEquals( testProject1, store.getProject( testProject1.getId() ) );
-        assertProjectEquals( testProject2, store.getProject( testProject2.getId() ) );
+        assertProjectEquals( testProject1, projectDao.getProject( testProject1.getId() ) );
+        assertProjectEquals( testProject2, projectDao.getProject( testProject2.getId() ) );
 
-        assertScheduleEquals( testSchedule1, store.getSchedule( testSchedule1.getId() ) );
-        assertScheduleEquals( testSchedule2, store.getSchedule( testSchedule2.getId() ) );
-        assertScheduleEquals( testSchedule3, store.getSchedule( testSchedule3.getId() ) );
-
-        Iterator<Installation> iterator = store.getAllInstallations().iterator();
-        assertInstallationEquals( testInstallationJava13, (Installation) iterator.next() );
-        assertInstallationEquals( testInstallationJava14, (Installation) iterator.next() );
-        assertInstallationEquals( testInstallationMaven20a3, (Installation) iterator.next() );
+        assertScheduleEquals( testSchedule1, scheduleDao.getSchedule( testSchedule1.getId() ) );
+        assertScheduleEquals( testSchedule2, scheduleDao.getSchedule( testSchedule2.getId() ) );
+        assertScheduleEquals( testSchedule3, scheduleDao.getSchedule( testSchedule3.getId() ) );
+
+        Iterator<Installation> iterator = installationDao.getAllInstallations().iterator();
+        assertInstallationEquals( testInstallationJava13, iterator.next() );
+        assertInstallationEquals( testInstallationJava14, iterator.next() );
+        assertInstallationEquals( testInstallationMaven20a3, iterator.next() );
 
 /*
         // TODO!!! -- definitely need to test the changeset stuff since it uses modello.refid
@@ -735,7 +768,7 @@
         testProjectGroup2.setId( group.getId() );
 */
 
-        assertSystemConfiguration( systemConfiguration, store.getSystemConfiguration() );
+        assertSystemConfiguration( systemConfiguration, systemConfigurationDao.getSystemConfiguration() );
     }
 
     private void assertSystemConfiguration( SystemConfiguration expected, SystemConfiguration actual )
@@ -754,11 +787,11 @@
     protected void assertEmpty()
         throws ContinuumStoreException
     {
-        assertEquals( 0, store.getAllInstallations().size() );
-        assertEquals( 0, store.getAllProfilesByName().size() );
-        assertEquals( 0, store.getAllProjectGroups().size() );
-        assertEquals( 0, store.getAllProjectsByName().size() );
-        assertNull( store.getSystemConfiguration() );
+        assertEquals( 0, installationDao.getAllInstallations().size() );
+        assertEquals( 0, profileDao.getAllProfilesByName().size() );
+        assertEquals( 0, projectGroupDao.getAllProjectGroups().size() );
+        assertEquals( 0, projectDao.getAllProjectsByName().size() );
+        assertNull( systemConfigurationDao.getSystemConfiguration() );
     }
 
     protected static BuildDefinition createTestBuildDefinition( BuildDefinition buildDefinition )
@@ -941,11 +974,11 @@
 
     protected static ProjectGroup createTestProjectGroup( ProjectGroup group )
     {
-        return createTestProjectGroup( group.getName(), group.getDescription(), group.getGroupId(), 
+        return createTestProjectGroup( group.getName(), group.getDescription(), group.getGroupId(),
                                        group.getLocalRepository() );
     }
 
-    protected static ProjectGroup createTestProjectGroup( String name, String description, String groupId, 
+    protected static ProjectGroup createTestProjectGroup( String name, String description, String groupId,
                                                           LocalRepository repository )
     {
         ProjectGroup group = new ProjectGroup();
@@ -1114,7 +1147,7 @@
     }
 
     protected static void assertBuildDefinitionsEqual( List<BuildDefinition> expectedBuildDefinitions,
-    												   List<BuildDefinition> actualBuildDefinitions )
+                                                       List<BuildDefinition> actualBuildDefinitions )
     {
         for ( int i = 0; i < expectedBuildDefinitions.size(); i++ )
         {
@@ -1142,11 +1175,11 @@
     }
 
     protected static void assertDevelopersEqual( List<ProjectDeveloper> expectedDevelopers,
-    		                                     List<ProjectDeveloper> actualDevelopers )
+                                                 List<ProjectDeveloper> actualDevelopers )
     {
         for ( int i = 0; i < actualDevelopers.size(); i++ )
         {
-            assertDeveloperEquals( (ProjectDeveloper) expectedDevelopers.get( i ), (ProjectDeveloper) actualDevelopers
+            assertDeveloperEquals( expectedDevelopers.get( i ), actualDevelopers
                 .get( i ) );
         }
     }
@@ -1161,12 +1194,11 @@
     }
 
     protected static void assertDependenciesEqual( List<ProjectDependency> expectedDependencies,
-    		                                       List<ProjectDependency> actualDependencies )
+                                                   List<ProjectDependency> actualDependencies )
     {
         for ( int i = 0; i < actualDependencies.size(); i++ )
         {
-            assertDependencyEquals( (ProjectDependency) expectedDependencies.get( i ),
-                                    (ProjectDependency) actualDependencies.get( i ) );
+            assertDependencyEquals( expectedDependencies.get( i ), actualDependencies.get( i ) );
         }
     }
 
@@ -1213,7 +1245,7 @@
     {
         return createTestLocalRepository( repository.getName(), repository.getLocation(), repository.getLayout() );
     }
-    
+
     protected static LocalRepository createTestLocalRepository( String name, String location, String layout )
     {
         LocalRepository repository = new LocalRepository();
@@ -1222,15 +1254,24 @@
         repository.setLayout( layout );
         return repository;
     }
-    
-    protected static RepositoryPurgeConfiguration createTestRepositoryPurgeConfiguration( RepositoryPurgeConfiguration purgeConfig )
+
+    protected static RepositoryPurgeConfiguration createTestRepositoryPurgeConfiguration(
+        RepositoryPurgeConfiguration purgeConfig )
     {
-        return createTestRepositoryPurgeConfiguration( purgeConfig.isDeleteAll(), purgeConfig.getRetentionCount(), purgeConfig.getDaysOlder(),
-                                             purgeConfig.isDeleteReleasedSnapshots(), purgeConfig.getSchedule(), purgeConfig.isEnabled(), purgeConfig.getRepository() );
-    }
-    
-    protected static RepositoryPurgeConfiguration createTestRepositoryPurgeConfiguration( boolean deleteAllArtifacts, int retentionCount, int daysOlder, 
-                                                                      boolean deleteReleasedSnapshots, Schedule schedule, boolean enabled, LocalRepository repository )
+        return createTestRepositoryPurgeConfiguration( purgeConfig.isDeleteAll(), purgeConfig.getRetentionCount(),
+                                                       purgeConfig.getDaysOlder(),
+                                                       purgeConfig.isDeleteReleasedSnapshots(),
+                                                       purgeConfig.getSchedule(), purgeConfig.isEnabled(),
+                                                       purgeConfig.getRepository() );
+    }
+
+    protected static RepositoryPurgeConfiguration createTestRepositoryPurgeConfiguration( boolean deleteAllArtifacts,
+                                                                                          int retentionCount,
+                                                                                          int daysOlder,
+                                                                                          boolean deleteReleasedSnapshots,
+                                                                                          Schedule schedule,
+                                                                                          boolean enabled,
+                                                                                          LocalRepository repository )
     {
         RepositoryPurgeConfiguration purgeConfig = new RepositoryPurgeConfiguration();
         purgeConfig.setDeleteAll( deleteAllArtifacts );
@@ -1242,15 +1283,23 @@
         purgeConfig.setRepository( repository );
         return purgeConfig;
     }
-    
-    protected static DirectoryPurgeConfiguration createTestDirectoryPurgeConfiguration( DirectoryPurgeConfiguration purgeConfig )
+
+    protected static DirectoryPurgeConfiguration createTestDirectoryPurgeConfiguration(
+        DirectoryPurgeConfiguration purgeConfig )
     {
-        return createTestDirectoryPurgeConfiguration( purgeConfig.getLocation(), purgeConfig.getDirectoryType(), purgeConfig.isDeleteAll(), purgeConfig.getRetentionCount(),
-                                                      purgeConfig.getDaysOlder(), purgeConfig.getSchedule(), purgeConfig.isEnabled() );
-    }
-    
-    protected static DirectoryPurgeConfiguration createTestDirectoryPurgeConfiguration( String location, String directoryType, boolean deleteAllDirectories, 
-                                                                                        int retentionCount, int daysOlder, Schedule schedule, boolean enabled )
+        return createTestDirectoryPurgeConfiguration( purgeConfig.getLocation(), purgeConfig.getDirectoryType(),
+                                                      purgeConfig.isDeleteAll(), purgeConfig.getRetentionCount(),
+                                                      purgeConfig.getDaysOlder(), purgeConfig.getSchedule(),
+                                                      purgeConfig.isEnabled() );
+    }
+
+    protected static DirectoryPurgeConfiguration createTestDirectoryPurgeConfiguration( String location,
+                                                                                        String directoryType,
+                                                                                        boolean deleteAllDirectories,
+                                                                                        int retentionCount,
+                                                                                        int daysOlder,
+                                                                                        Schedule schedule,
+                                                                                        boolean enabled )
     {
         DirectoryPurgeConfiguration purgeConfig = new DirectoryPurgeConfiguration();
         purgeConfig.setDaysOlder( daysOlder );
@@ -1262,8 +1311,9 @@
         purgeConfig.setSchedule( schedule );
         return purgeConfig;
     }
-    
-    protected static void assertLocalRepositoryEquals( LocalRepository expectedRepository, LocalRepository actualRepository )
+
+    protected static void assertLocalRepositoryEquals( LocalRepository expectedRepository,
+                                                       LocalRepository actualRepository )
     {
         assertEquals( expectedRepository, actualRepository );
         if ( expectedRepository != null )
@@ -1271,42 +1321,53 @@
             assertNotSame( expectedRepository, actualRepository );
             assertEquals( "compare local repository - id", expectedRepository.getId(), actualRepository.getId() );
             assertEquals( "compare local repository - name", expectedRepository.getName(), actualRepository.getName() );
-            assertEquals( "compare local repository - location", expectedRepository.getLocation(), 
+            assertEquals( "compare local repository - location", expectedRepository.getLocation(),
                           actualRepository.getLocation() );
-            assertEquals( "compare local repository - layout", expectedRepository.getLayout(), actualRepository.getLayout() );
+            assertEquals( "compare local repository - layout", expectedRepository.getLayout(),
+                          actualRepository.getLayout() );
         }
     }
-    
-    protected static void assertRepositoryPurgeConfigurationEquals( RepositoryPurgeConfiguration expectedConfig, RepositoryPurgeConfiguration actualConfig )
+
+    protected static void assertRepositoryPurgeConfigurationEquals( RepositoryPurgeConfiguration expectedConfig,
+                                                                    RepositoryPurgeConfiguration actualConfig )
     {
         assertEquals( "compare repository purge configuration - id", expectedConfig.getId(), actualConfig.getId() );
-        assertEquals( "compare repository purge configuration - deleteAll", expectedConfig.isDeleteAll(), actualConfig.isDeleteAll() );
-        assertEquals( "compare repository purge configuration - retentionCount", expectedConfig.getRetentionCount(), 
+        assertEquals( "compare repository purge configuration - deleteAll", expectedConfig.isDeleteAll(),
+                      actualConfig.isDeleteAll() );
+        assertEquals( "compare repository purge configuration - retentionCount", expectedConfig.getRetentionCount(),
                       actualConfig.getRetentionCount() );
-        assertEquals( "compare repository purge configuration - daysOlder", expectedConfig.getDaysOlder(), actualConfig.getDaysOlder() );
-        assertEquals( "compare repository purge configuration - deleteReleasedSnapshots", expectedConfig.isDeleteReleasedSnapshots(), 
-                      actualConfig.isDeleteReleasedSnapshots() );
-        assertEquals( "compare repository purge configuration - enabled", expectedConfig.isEnabled(), actualConfig.isEnabled() );
+        assertEquals( "compare repository purge configuration - daysOlder", expectedConfig.getDaysOlder(),
+                      actualConfig.getDaysOlder() );
+        assertEquals( "compare repository purge configuration - deleteReleasedSnapshots",
+                      expectedConfig.isDeleteReleasedSnapshots(), actualConfig.isDeleteReleasedSnapshots() );
+        assertEquals( "compare repository purge configuration - enabled", expectedConfig.isEnabled(),
+                      actualConfig.isEnabled() );
     }
-    
-    protected static void assertDirectoryPurgeConfigurationEquals( DirectoryPurgeConfiguration expectedConfig, DirectoryPurgeConfiguration actualConfig )
+
+    protected static void assertDirectoryPurgeConfigurationEquals( DirectoryPurgeConfiguration expectedConfig,
+                                                                   DirectoryPurgeConfiguration actualConfig )
     {
         assertEquals( "compare directory purge configuration - id", expectedConfig.getId(), actualConfig.getId() );
-        assertEquals( "compare directory purge configuration - location", expectedConfig.getLocation(), actualConfig.getLocation() );
-        assertEquals( "compare directory purge configuration - directoryType", expectedConfig.getDirectoryType(), actualConfig.getDirectoryType() );
-        assertEquals( "compare directory purge configuration - deleteAll", expectedConfig.isDeleteAll(), actualConfig.isDeleteAll() );
-        assertEquals( "compare directory purge configuration - retentionCount", expectedConfig.getRetentionCount(), 
+        assertEquals( "compare directory purge configuration - location", expectedConfig.getLocation(),
+                      actualConfig.getLocation() );
+        assertEquals( "compare directory purge configuration - directoryType", expectedConfig.getDirectoryType(),
+                      actualConfig.getDirectoryType() );
+        assertEquals( "compare directory purge configuration - deleteAll", expectedConfig.isDeleteAll(),
+                      actualConfig.isDeleteAll() );
+        assertEquals( "compare directory purge configuration - retentionCount", expectedConfig.getRetentionCount(),
                       actualConfig.getRetentionCount() );
-        assertEquals( "compare directory purge configuration - daysOlder", expectedConfig.getDaysOlder(), actualConfig.getDaysOlder() );
-        assertEquals( "compare directory purge configuration - enabled", expectedConfig.isEnabled(), actualConfig.isEnabled() );
+        assertEquals( "compare directory purge configuration - daysOlder", expectedConfig.getDaysOlder(),
+                      actualConfig.getDaysOlder() );
+        assertEquals( "compare directory purge configuration - enabled", expectedConfig.isEnabled(),
+                      actualConfig.isEnabled() );
     }
-    
+
     /**
      * Setup JDO Factory
      *
      * @todo push down to a Jdo specific test
      */
-    protected ContinuumStore createStore()
+    protected void createStore()
         throws Exception
     {
         DefaultConfigurableJdoFactory jdoFactory =
@@ -1314,6 +1375,6 @@
 
         jdoFactory.setUrl( "jdbc:hsqldb:mem:" + getName() );
 
-        return (ContinuumStore) lookup( ContinuumStore.ROLE, "jdo" );
+        daoUtilsImpl = (DaoUtils) lookup( DaoUtils.class.getName() );
     }
 }



Mime
View raw message