if (server.getServerState()!=IServer.STATE_STARTED) {
throw new CoreException(new Status(Status.WARNING, Activator.PLUGIN_ID, "Server not started, please start server first."));
}
RepositoryFactory repository = Activator.getDefault().getRepositoryFactory();
try {
RepositoryInfo repositoryInfo = getRepositoryInfo(server, monitor);
return repository.getRepository(repositoryInfo, false);
} catch (URISyntaxException e) {
throw new CoreException(new Status(Status.ERROR, Activator.PLUGIN_ID, e.getMessage(), e));
} catch (RuntimeException e) {
throw new CoreException(new Status(Status.ERROR, Activator.PLUGIN_ID, e.getMessage(), e));