org.apache.maven.plugin.jira
Class JiraHelper

java.lang.Object
  extended by org.apache.maven.plugin.jira.JiraHelper

public class JiraHelper
extends Object

A helper class with common JIRA related functionality.

Version:
$Id: JiraHelper.java 1579078 2014-03-18 22:44:41Z dennisl $
Author:
Dennis Lundberg

Method Summary
static String getBaseUrl(String url)
           
static Map<String,String> getJiraUrlAndProjectName(String issueManagementUrl)
          Parse out the base URL for JIRA and the JIRA project name from the issue management URL.
static String getPidFromJira(Log log, String issueManagementUrl, HttpClient client)
          Try to get a JIRA pid from the issue management URL.
static boolean validateNonProxyHosts(org.apache.maven.wagon.proxy.ProxyInfo proxy, String targetHost)
          Check if the specified host is in the list of non proxy hosts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPidFromJira

public static String getPidFromJira(Log log,
                                    String issueManagementUrl,
                                    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

validateNonProxyHosts

public static boolean validateNonProxyHosts(org.apache.maven.wagon.proxy.ProxyInfo proxy,
                                            String targetHost)
Check if the specified host is in the list of non proxy hosts.

Method copied from org.apache.maven.wagon.proxy.ProxyUtils. Can be deleted when maven-changes-plugin references a more recent version of maven-project

Parameters:
proxy - the proxy info object contains set of properties.
targetHost - the target hostname
Returns:
true if the hostname is in the list of non proxy hosts, false otherwise.

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)
Since:
2.8


Copyright © 2002–2014 The Apache Software Foundation. All rights reserved.