Search in sources :

Example 1 with ManagedRepositoryContentMock

use of org.apache.archiva.repository.scanner.mock.ManagedRepositoryContentMock in project archiva by apache.

the class RepositoryScannerTest method createRepository.

protected EditableManagedRepository createRepository(String id, String name, Path location) throws IOException {
    FileLockManager lockManager = new DefaultFileLockManager();
    FilesystemStorage storage = new FilesystemStorage(location.toAbsolutePath(), lockManager);
    BasicManagedRepository repo = new BasicManagedRepository(id, name, storage);
    repo.setLocation(location.toAbsolutePath().toUri());
    repo.setContent(new ManagedRepositoryContentMock(repo));
    return repo;
}
Also used : FileLockManager(org.apache.archiva.common.filelock.FileLockManager) DefaultFileLockManager(org.apache.archiva.common.filelock.DefaultFileLockManager) BasicManagedRepository(org.apache.archiva.repository.base.managed.BasicManagedRepository) FilesystemStorage(org.apache.archiva.repository.storage.fs.FilesystemStorage) DefaultFileLockManager(org.apache.archiva.common.filelock.DefaultFileLockManager) ManagedRepositoryContentMock(org.apache.archiva.repository.scanner.mock.ManagedRepositoryContentMock)

Aggregations

DefaultFileLockManager (org.apache.archiva.common.filelock.DefaultFileLockManager)1 FileLockManager (org.apache.archiva.common.filelock.FileLockManager)1 BasicManagedRepository (org.apache.archiva.repository.base.managed.BasicManagedRepository)1 ManagedRepositoryContentMock (org.apache.archiva.repository.scanner.mock.ManagedRepositoryContentMock)1 FilesystemStorage (org.apache.archiva.repository.storage.fs.FilesystemStorage)1