use of org.apache.archiva.repository.base.remote.BasicRemoteRepository in project archiva by apache.
the class RepositoryProviderMock method createRemoteInstance.
@Override
public RemoteRepository createRemoteInstance(RemoteRepositoryConfiguration configuration) throws RepositoryException {
BasicRemoteRepository remoteRepository = null;
try {
remoteRepository = BasicRemoteRepository.newFilesystemInstance(configuration.getId(), configuration.getName(), Paths.get("target/remotes"));
} catch (IOException e) {
throw new RepositoryException(e);
}
updateRemoteInstance(remoteRepository, configuration);
return remoteRepository;
}
use of org.apache.archiva.repository.base.remote.BasicRemoteRepository in project archiva by apache.
the class RepositoryProviderMock method createRemoteInstance.
@Override
public RemoteRepository createRemoteInstance(RemoteRepositoryConfiguration configuration) throws RepositoryException {
try {
BasicRemoteRepository remoteRepository = BasicRemoteRepository.newFilesystemInstance(configuration.getId(), configuration.getName(), Paths.get("target/remotes"));
updateRemoteInstance(remoteRepository, configuration);
return remoteRepository;
} catch (IOException e) {
throw new RepositoryException(e);
}
}
use of org.apache.archiva.repository.base.remote.BasicRemoteRepository in project archiva by apache.
the class RepositoryProviderMock method createRemoteInstance.
@Override
public RemoteRepository createRemoteInstance(RemoteRepositoryConfiguration configuration) throws RepositoryException {
BasicRemoteRepository remoteRepository = null;
try {
remoteRepository = BasicRemoteRepository.newFilesystemInstance(configuration.getId(), configuration.getName(), Paths.get("target/remotes"));
} catch (IOException e) {
throw new RepositoryException(e);
}
updateRemoteInstance(remoteRepository, configuration);
return remoteRepository;
}
use of org.apache.archiva.repository.base.remote.BasicRemoteRepository in project archiva by apache.
the class RepositoryGroupHandlerTest method getRemote.
protected RemoteRepository getRemote(String id, String name) throws IOException {
Path path = getRepoBaseDir().resolve("../remote");
FileLockManager lockManager = new DefaultFileLockManager();
FilesystemStorage storage = new FilesystemStorage(path.toAbsolutePath(), lockManager);
return new BasicRemoteRepository(id, name, storage);
}
use of org.apache.archiva.repository.base.remote.BasicRemoteRepository in project archiva by apache.
the class RepositoryScannerTest method createRemoteRepository.
protected EditableRemoteRepository createRemoteRepository(String id, String name, String url) throws URISyntaxException, IOException {
BasicRemoteRepository repo = BasicRemoteRepository.newFilesystemInstance(id, name, Paths.get("remotes"));
repo.setLocation(new URI(url));
return repo;
}
Aggregations