* @throws MojoExecutionException
*/
protected GitHubClient createClient(String hostname)
throws MojoExecutionException {
if (!hostname.contains("://"))
return new GitHubClientEgit(hostname);
try {
URL hostUrl = new URL(hostname);
return new GitHubClientEgit(hostUrl.getHost(), hostUrl.getPort(),
hostUrl.getProtocol());
} catch (MalformedURLException e) {
throw new MojoExecutionException("Could not parse host URL "
+ hostname, e);
}