Class JiraHelper

java.lang.Object
org.apache.maven.plugins.changes.jira.JiraHelper

public class JiraHelper extends Object
A helper class with common JIRA related functionality.
Version:
$Id$
Author:
Dennis Lundberg
  • Method Details

    • getPidFromJira

      public static String getPidFromJira(org.apache.maven.plugin.logging.Log log, String issueManagementUrl, org.apache.http.client.HttpClient client)
      Try to get a JIRA pid from the issue management URL.
      Parameters:
      log - used to tell the user what happened
      issueManagementUrl - the URL to the issue management system
      client - the client used to connect to JIRA
      Returns:
      the JIRA id for the project, or null if it can't be found
    • getJiraUrlAndProjectName

      public static Map<String,String> getJiraUrlAndProjectName(String issueManagementUrl)
      Parse out the base URL for JIRA and the JIRA project name from the issue management URL. The issue management URL is assumed to be of the format http(s)://host:port/browse/{projectname}
      Parameters:
      issueManagementUrl - the URL to the issue management system
      Returns:
      A Map containing the URL and project name
      Since:
      2.8
    • getBaseUrl

      public static String getBaseUrl(String url)
      Parameters:
      url - URL
      Returns:
      the base URL
      Since:
      2.8