private synchronized ServerInfo getVersionInfo() { if (serverInfo == null) { serverInfo = metadataRestClient.getServerInfo().claim(); } return serverInfo; }
private synchronized ServerInfo getVersionInfo() { if (serverInfo == null) { serverInfo = metadataRestClient.getServerInfo().claim(); } return serverInfo; }
private JiraRestClient verifyConnection() { final String host = config.getHost(); final String username = config.getUsername(); final String password = config.getPassword(); try { System.out.println(); System.out.println("Try connecting to jira server " + host + " with username: '" + username + "' and password: '" + password +"'..."); final JiraRestClient connection = JiraConnectionFactory.createConnection(host, username, password); final ServerInfo serverInfo = connection.getMetadataClient().getServerInfo().get(); System.out.println("Successfully connected to jira instance at " + host); System.out.println("Server Info:" + serverInfo.toString()); System.out.println("OK"); return connection; } catch (PluginException | InterruptedException | ExecutionException e) { throw new RuntimeException("Could not connect to jira server", e); } }
private JiraRestClient verifyConnection() { final String host = config.getHost(); final String username = config.getUsername(); final String password = config.getPassword(); try { System.out.println(); System.out.println("Try connecting to jira server " + host + " with username: '" + username + "' and password: '" + password +"'..."); final JiraRestClient connection = JiraConnectionFactory.createConnection(host, username, password); final ServerInfo serverInfo = connection.getMetadataClient().getServerInfo().get(); System.out.println("Successfully connected to jira instance at " + host); System.out.println("Server Info:" + serverInfo.toString()); System.out.println("OK"); return connection; } catch (PluginException | InterruptedException | ExecutionException e) { throw new RuntimeException("Could not connect to jira server", e); } }
.getServerInfo().claim() .getVersion();