org.mule.devkit.maven
Class AbstractGitHubMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.mule.devkit.maven.AbstractGitHubMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
GitHubDocMojo

public abstract class AbstractGitHubMojo
extends org.apache.maven.plugin.AbstractMojo

Based on Maven plugin by Kevin Sawicki (kevin@github.com)


Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractGitHubMojo()
           
 
Method Summary
protected  org.eclipse.egit.github.core.client.GitHubClient createClient(String host, String userName, String password, String oauth2Token)
          Create client
protected  void debug(String message)
          Log given message at debug level
protected  void debug(String message, Throwable throwable)
          Log given message and throwable at debug level
protected  void error(String message)
          Log given message at error level
protected  void error(String message, Throwable throwable)
          Log given message and throwable at error level
protected  org.eclipse.egit.github.core.RepositoryId getRepository(org.apache.maven.project.MavenProject project, String owner, String name)
          Get repository and throw a MojoExecutionException on failures
protected  void info(String message)
          Log given message at info level
protected  void info(String message, Throwable throwable)
          Log given message and throwable at info level
protected  boolean isDebug()
          Is debug logging enabled?
protected  boolean isInfo()
          Is info logging enabled?
protected  void warn(String message)
          Log given message at warn level
protected  void warn(String message, Throwable throwable)
          Log given message and throwable at warn level
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
 

Constructor Detail

AbstractGitHubMojo

public AbstractGitHubMojo()
Method Detail

isDebug

protected boolean isDebug()
Is debug logging enabled?

Returns:
true if enabled, false otherwise

isInfo

protected boolean isInfo()
Is info logging enabled?

Returns:
true if enabled, false otherwise

debug

protected void debug(String message)
Log given message at debug level

Parameters:
message -

debug

protected void debug(String message,
                     Throwable throwable)
Log given message and throwable at debug level

Parameters:
message -
throwable -

info

protected void info(String message)
Log given message at info level

Parameters:
message -

info

protected void info(String message,
                    Throwable throwable)
Log given message and throwable at info level

Parameters:
message -
throwable -

warn

protected void warn(String message)
Log given message at warn level

Parameters:
message -

warn

protected void warn(String message,
                    Throwable throwable)
Log given message and throwable at warn level

Parameters:
message -
throwable -

error

protected void error(String message)
Log given message at error level

Parameters:
message -

error

protected void error(String message,
                     Throwable throwable)
Log given message and throwable at error level

Parameters:
message -
throwable -

createClient

protected org.eclipse.egit.github.core.client.GitHubClient createClient(String host,
                                                                        String userName,
                                                                        String password,
                                                                        String oauth2Token)
                                                                 throws org.apache.maven.plugin.MojoExecutionException
Create client

Parameters:
host -
userName -
password -
oauth2Token -
Returns:
client
Throws:
org.apache.maven.plugin.MojoExecutionException

getRepository

protected org.eclipse.egit.github.core.RepositoryId getRepository(org.apache.maven.project.MavenProject project,
                                                                  String owner,
                                                                  String name)
                                                           throws org.apache.maven.plugin.MojoExecutionException
Get repository and throw a MojoExecutionException on failures

Parameters:
project -
owner -
name -
Returns:
non-null repository id
Throws:
org.apache.maven.plugin.MojoExecutionException


Copyright © 2010–2015 MuleSoft, Inc.. All rights reserved.