use of org.apache.archiva.repository.base.ArchivaRepositoryRegistry in project archiva by apache.
the class SimpleArtifactConsumerTest method setUpMockRepository.
private void setUpMockRepository() throws IOException, RepositoryException {
((ArchivaRepositoryRegistry) repositoryRegistry).setIgnoreIndexing(true);
Path repoDir = Paths.get("target/test-consumer-repo");
Files.createDirectories(repoDir);
repoDir.toFile().deleteOnExit();
testRepository = BasicManagedRepository.newFilesystemInstance("test-consumer-repository", "Test-Consumer-Repository", Paths.get("target/repositories"));
testRepository.setLocation(repoDir.toAbsolutePath().toUri());
repositoryRegistry.putRepository(testRepository);
// when( repositoryRegistry.getManagedRepository( testRepository.getId() ) ).thenReturn( testRepository );
}
Aggregations