diff options
author | Olivier Lamy <olamy@apache.org> | 2013-02-06 23:59:57 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2013-02-06 23:59:57 +0000 |
commit | cbf92221e7195f80b222f94e5e040215e6f5816a (patch) | |
tree | 63f5a758dcbff40c25a17c2954d7efa71f0efe7e /archiva-modules/archiva-base | |
parent | 33527242fb83bd6bae299ead49467b806047baa3 (diff) | |
download | archiva-cbf92221e7195f80b222f94e5e040215e6f5816a.tar.gz archiva-cbf92221e7195f80b222f94e5e040215e6f5816a.zip |
fix unit tests
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1443281 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base')
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; + } } |