Search in sources :

Example 1 with RemoteRepositoryContentMock

use of org.apache.archiva.repository.mock.RemoteRepositoryContentMock in project archiva by apache.

the class BasicRemoteRepositoryValidatorTest method createRepository.

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

Aggregations

DefaultFileLockManager (org.apache.archiva.common.filelock.DefaultFileLockManager)1 FileLockManager (org.apache.archiva.common.filelock.FileLockManager)1 RemoteRepositoryContentMock (org.apache.archiva.repository.mock.RemoteRepositoryContentMock)1 FilesystemStorage (org.apache.archiva.repository.storage.fs.FilesystemStorage)1