]> source.dussan.org Git - archiva.git/commitdiff
fix unit tests
authorOlivier Lamy <olamy@apache.org>
Wed, 6 Feb 2013 23:59:57 +0000 (23:59 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 6 Feb 2013 23:59:57 +0000 (23:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1443281 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/AbstractMavenRepositorySearch.java
archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java

index d8a20e90490bd17376642934a10b08e04af3c9ce..08cba95d6429a54203ad69d9b8115ed22bcbde8a 100644 (file)
@@ -114,6 +114,9 @@ public abstract class AbstractMavenRepositorySearch
 
         artifactContextProducer = plexusSisuBridge.lookup( ArtifactContextProducer.class );
 
+        defaultManagedRepositoryAdmin.setMavenIndexerUtils( mavenIndexerUtils );
+        defaultManagedRepositoryAdmin.setIndexer( nexusIndexer );
+
         config = new Configuration();
         config.addManagedRepository( createRepositoryConfig( TEST_REPO_1 ) );
         config.addManagedRepository( createRepositoryConfig( TEST_REPO_2 ) );
index 83f41b8f352911bd8012805cf119657d93f3954a..ff3b00000b650ef62c928306de275336f1be19aa 100644 (file)
@@ -620,8 +620,8 @@ public class DefaultManagedRepositoryAdmin
                 if ( !indexDirectory.isAbsolute() )
                 {
                     indexDirectory = new File( repositoryDirectory, repository.getIndexDirectory() );
-                    repository.setIndexDirectory( indexDirectory.getAbsolutePath() );
                 }
+                repository.setIndexDirectory( indexDirectory.getAbsolutePath() );
             }
             else
             {
@@ -629,8 +629,8 @@ public class DefaultManagedRepositoryAdmin
                 if ( !repositoryDirectory.isAbsolute() )
                 {
                     indexDirectory = new File( repositoryDirectory, ".indexer" );
-                    repository.setIndexDirectory( indexDirectory.getAbsolutePath() );
                 }
+                repository.setIndexDirectory( indexDirectory.getAbsolutePath() );
             }
 
             if ( !indexDirectory.exists() )
@@ -826,4 +826,14 @@ public class DefaultManagedRepositoryAdmin
     {
         this.mavenIndexerUtils = mavenIndexerUtils;
     }
+
+    public NexusIndexer getIndexer()
+    {
+        return indexer;
+    }
+
+    public void setIndexer( NexusIndexer indexer )
+    {
+        this.indexer = indexer;
+    }
 }