de.smartics.maven.issues
Class AbstractIssuesConnectionMojo

Package class diagram package AbstractIssuesConnectionMojo
java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.reporting.AbstractMavenReport
          extended by de.smartics.maven.issues.AbstractReportMojo
              extended by de.smartics.maven.issues.AbstractIssuesConnectionMojo
All Implemented Interfaces:
ContextEnabled, Mojo, MavenReport
Direct Known Subclasses:
AbstractIssuesReportMojo

public abstract class AbstractIssuesConnectionMojo
     
     
extends AbstractReportMojo

The issues Mojo reports on issues.

Author:
Robert Reiner

Field Summary
protected  String buildDirectory
          The directory to store task data information for the task cache.
protected  boolean ignoreLogoutProblem
          The flag indicates whether (true) or not (false) logout problems from the task repository should be ignored.
protected  String issueManagementPassword
          The password for authentication to access a private installation of a issue management system.
protected  String issueManagementSystem
          The name of the issue management system to connect to.
protected  String issueManagementUrl
          The URL to the issue management system to connect to.
protected  String issueManagementUser
          The name of the user for authentication to access a private installation of a issue management system.
protected  boolean logColumns
          Informs that the column names retrieved by the query should be logged at the end of the query.
protected  int maxRetries
          Maximum number retries to connect to the issue management system.
protected  boolean offline
          In offline mode the plugin will not generate a report.
protected  RepositoryFacadeFactory repositoryFacadeFactory
          The factory creates repository facades to access the issues stored in the issue management system.
protected  String repositoryFacadeFactoryClass
          The directory to store task data information for the task cache.
protected  String repositoryVersion
          Sets the version of the task repository.
protected  boolean skip
          A simple flag to skip the generation of the reports.
protected  long timeout
          The timeout in milliseconds between retries of connection attempts.
protected  String webPassword
          The password for HTTP basic authentication to the issue management webserver.
protected  String webUser
          The name of the user for HTTP basic authentication to the issue management webserver.
 
Fields inherited from class de.smartics.maven.issues.AbstractReportMojo
factory, locale, localRepository, logLevel, outputDirectory, project, resolver, siteRenderer
 
Fields inherited from interface org.apache.maven.reporting.MavenReport
CATEGORY_PROJECT_INFORMATION, CATEGORY_PROJECT_REPORTS, ROLE
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractIssuesConnectionMojo()
           
 
Method Summary
 boolean canGenerateReport()
          Checks if all required information is provided to run the report successfully.
protected
<T> T
createInstance(String className)
          Creates the instance of a class expecting a no-args constructor.
protected abstract  QueryData createQueryData(ArtifactVersionRange versionRange)
          Creates the query data that enables to create a query URL to be sent to the issue management system.
protected abstract  MavenReportRenderer createRenderer(Locale locale, VersionFactory versionFactoryInstance, ArtifactVersionRange versionRange, List<org.eclipse.mylyn.tasks.core.data.TaskData> issues)
          Creates a renderer.
protected  ArtifactVersionRange createVersionRange(VersionFactory versionFactoryInstance)
           
protected  void executeReport(Locale locale)
           Configures the plugin logger.
 
Methods inherited from class de.smartics.maven.issues.AbstractReportMojo
execute, getBundle, getOutputDirectory, getProject, getSiteRenderer, provideSink
 
Methods inherited from class org.apache.maven.reporting.AbstractMavenReport
closeReport, generate, getCategoryName, getReportOutputDirectory, getSink, isExternalReport, setReportOutputDirectory
 
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.reporting.MavenReport
getDescription, getName, getOutputName
 

Field Detail

offline

protected boolean offline
In offline mode the plugin will not generate a report.

Since:
1.0

skip

protected boolean skip
A simple flag to skip the generation of the reports. If set on the command line use -Dissues.skip.

Since:
1.0

buildDirectory

protected String buildDirectory
The directory to store task data information for the task cache. This is an optimization to not fetch tasks already fetched.

Since:
1.0

repositoryFacadeFactoryClass

protected String repositoryFacadeFactoryClass
The directory to store task data information for the task cache. This is an optimization to not fetch tasks already fetched.

Since:
1.0

repositoryFacadeFactory

protected RepositoryFacadeFactory repositoryFacadeFactory
The factory creates repository facades to access the issues stored in the issue management system.


issueManagementSystem

protected String issueManagementSystem
The name of the issue management system to connect to.

Since:
1.0

issueManagementUrl

protected String issueManagementUrl
The URL to the issue management system to connect to.

Since:
1.0

issueManagementUser

protected String issueManagementUser
The name of the user for authentication to access a private installation of a issue management system.

Since:
1.0

issueManagementPassword

protected String issueManagementPassword
The password for authentication to access a private installation of a issue management system.

Since:
1.0

webUser

protected String webUser
The name of the user for HTTP basic authentication to the issue management webserver.

Since:
1.0

webPassword

protected String webPassword
The password for HTTP basic authentication to the issue management webserver.

Since:
1.0

repositoryVersion

protected String repositoryVersion
Sets the version of the task repository.

Since:
1.0

maxRetries

protected int maxRetries
Maximum number retries to connect to the issue management system.

Since:
1.0

timeout

protected long timeout
The timeout in milliseconds between retries of connection attempts.

Since:
1.0

ignoreLogoutProblem

protected boolean ignoreLogoutProblem
The flag indicates whether ( true) or not ( false) logout problems from the task repository should be ignored.

This is a kind of hack that grabs for the string 'Logout' in the exception message reported from the task repository. It may be useful if the task repository's response is quite slow.

Since:
1.0

logColumns

protected boolean logColumns
Informs that the column names retrieved by the query should be logged at the end of the query. This allows to grab the keywords returned by the issue management system.

Since:
1.0
Constructor Detail

AbstractIssuesConnectionMojo

public AbstractIssuesConnectionMojo()
Method Detail

executeReport

protected void executeReport(Locale locale)
                      throws MavenReportException

Configures the plugin logger.

Overrides:
executeReport in class AbstractReportMojo
Throws:
MavenReportException
See Also:
AbstractMavenReport.executeReport(java.util.Locale)

createVersionRange

protected ArtifactVersionRange createVersionRange(VersionFactory versionFactoryInstance)

createQueryData

protected abstract QueryData createQueryData(ArtifactVersionRange versionRange)
Creates the query data that enables to create a query URL to be sent to the issue management system.

Parameters:
versionRange - the version range used to create the query data.
Returns:
an instance of query data suitable to run in a specific issue management system.

createRenderer

protected abstract MavenReportRenderer createRenderer(Locale locale,
                                                      VersionFactory versionFactoryInstance,
                                                      ArtifactVersionRange versionRange,
                                                      List<org.eclipse.mylyn.tasks.core.data.TaskData> issues)
                                               throws MavenReportException
Creates a renderer.

Parameters:
locale - the locale to use for the report.
issues - the issues to render.
Returns:
the renderer ready to run.
Throws:
MavenReportException - if the renderer cannot be created or configured.

canGenerateReport

public boolean canGenerateReport()
Checks if all required information is provided to run the report successfully. If the plugin is running in offline mode, this method returns false.

Specified by:
canGenerateReport in interface MavenReport
Overrides:
canGenerateReport in class AbstractMavenReport
Returns:
true if a report can be rendered, false otherwise.
See Also:
AbstractMavenReport.canGenerateReport()

createInstance

protected <T> T createInstance(String className)
                    throws IllegalArgumentException
Creates the instance of a class expecting a no-args constructor.

Type Parameters:
T - the type of the instance to be created.
Parameters:
className - the name of the class to create an instance of.
Returns:
the created instance.
Throws:
IllegalArgumentException - if a problem prevents the creation of the instance.


Copyright © 2008-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.