code: public static String getJiraVersion(URL jiraBaseUrl) {
          HttpClient client = new DefaultHttpClient();
          try {
              URL requestUrl = new URL(jiraBaseUrl + JIRA_REST_SERVERINFO_ENDPOINT);
              HttpResponse response = client.execute(new HttpGet(requestUrl.toURI()));
              lazyInitMapper();
              Map<String, Object> responseMap = mapper.readValue(response.getEntity().getContent(), new TypeReference<Map<String, Object>>() {
              });
              return ((String) responseMap.get("version"));
          } catch (Exception e) {
              throw new RuntimeException("Error while trying to get Jira Issue Tracker version: " + e.getMessage());
          }
      }
docs: From Jira plugin version 2.0 (and Jira 7.0) we are not able to retrieve the server info directly from
  the Java API so we need to access the entry point directly
  
  @param jiraBaseUrl is the Jira URL as it was configured in the Jenkins global configuration
  @return Jira version
  @throws IOException