aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base
diff options
context:
space:
mode:
Diffstat (limited to 'archiva-modules/archiva-base')
-rw-r--r--archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/AbstractMavenRepositorySearch.java3
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java14
2 files changed, 15 insertions, 2 deletions
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/AbstractMavenRepositorySearch.java b/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/AbstractMavenRepositorySearch.java
index d8a20e904..08cba95d6 100644
--- a/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/AbstractMavenRepositorySearch.java
+++ b/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/AbstractMavenRepositorySearch.java
@@ -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 ) );
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java
index 83f41b8f3..ff3b00000 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java
@@ -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;
+ }
}