org.nuiton.jredmine.plugin.report
Class AbstractRedmineReport

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.nuiton.plugin.AbstractPlugin
          extended by org.nuiton.jredmine.plugin.AbstractRedmineMojo
              extended by org.nuiton.jredmine.plugin.report.AbstractRedmineReport
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.apache.maven.reporting.MavenReport, org.nuiton.io.rest.RestClientConfiguration, org.nuiton.plugin.Plugin
Direct Known Subclasses:
AbstractIssuesReport

public abstract class AbstractRedmineReport
extends AbstractRedmineMojo
implements org.apache.maven.reporting.MavenReport, org.nuiton.plugin.Plugin, org.nuiton.io.rest.RestClientConfiguration

Abstract redmine report mojo.

Since:
1.0.0
Author:
chemit
Requires Maven reports to run:
true

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.nuiton.plugin.Plugin
org.nuiton.plugin.Plugin.InitState, org.nuiton.plugin.Plugin.Packaging
 
Field Summary
protected  org.apache.maven.artifact.factory.ArtifactFactory factory
           
protected  org.codehaus.plexus.i18n.I18N i18n
          Internationalization.
protected  String issueLinkTemplate
          Template strings per system that is used to discover the URL to use to display an issue report.
protected  org.apache.maven.artifact.repository.ArtifactRepository localRepository
          Local Repository.
protected  File outputDirectory
          Report output directory.
protected  org.apache.maven.artifact.resolver.ArtifactResolver resolver
           
protected  org.apache.maven.doxia.siterenderer.Renderer siteRenderer
          Doxia Site Renderer.
protected  String versionLinkTemplate
          Template strings per system that is used to discover the URL to use to display an issue report.
 
Fields inherited from class org.nuiton.jredmine.plugin.AbstractRedmineMojo
dateFormat, encoding, initOk, password, project, projectId, REDMINE_SYSTEM, releaseProject, releaseUser, releaseVersion, runOnceDone, safe, service, serviceInit, session, url, username, users, verbose, versionId
 
Fields inherited from interface org.apache.maven.reporting.MavenReport
CATEGORY_PROJECT_INFORMATION, CATEGORY_PROJECT_REPORTS, ROLE
 
Constructor Summary
AbstractRedmineReport(boolean requireProject, boolean requireVersion, boolean requireUser)
           
 
Method Summary
 boolean canGenerateReport()
           
protected  void doAction()
          Re-expose the protected method for test purposes...
protected abstract  void executeReport(Locale locale)
           
 void generate(org.codehaus.doxia.sink.Sink sink, Locale locale)
           
protected  ResourceBundle getBundle(Locale locale)
           
 String getCategoryName()
           
 String getDescription(Locale locale)
           
 String getName(Locale locale)
           
 File getReportOutputDirectory()
           
protected  org.apache.maven.doxia.sink.Sink getSink()
           
protected  File getSkinArtifactFile()
           
 boolean isExternalReport()
           
 void setReportOutputDirectory(File reportOutputDirectory)
           
 
Methods inherited from class org.nuiton.jredmine.plugin.AbstractRedmineMojo
afterExecute, checkRunOnceDone, checkSkip, closeService, getEncoding, getProject, getProjectId, getRestPassword, getRestUrl, getRestUsername, getVersionId, init, initReleaseProject, initReleaseUser, initReleaseVersion, isAnonymous, isGoalSkip, isRunOnce, isRunOnceDone, isSafe, isVerbose, setAnonymous, setEncoding, setProject, setRestPassword, setRestUrl, setRestUsername, setSafe, setVerbose
 
Methods inherited from class org.nuiton.plugin.AbstractPlugin
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addTestResourceDir, addUrlToUrlsList, backupFile, checkPackaging, checkResource, checkRunOnceDone, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, execute, getBackupFile, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getTemplate, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFile
 
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
getOutputName
 
Methods inherited from interface org.nuiton.plugin.Plugin
getProject, isVerbose, setProject, setVerbose
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute, getLog, setLog
 
Methods inherited from interface org.nuiton.io.rest.RestClientConfiguration
getEncoding, getRestPassword, getRestUrl, getRestUsername, isAnonymous, isVerbose, setAnonymous, setEncoding, setRestPassword, setRestUrl, setRestUsername, setVerbose
 

Field Detail

issueLinkTemplate

protected String issueLinkTemplate
Template strings per system that is used to discover the URL to use to display an issue report. Each key in this map denotes the (case-sensitive) identifier of the issue tracking system and its value gives the URL template.

There are 2 template tokens you can use. %URL%: this is computed by getting the <issueManagement>/<url> value from the POM, and removing the last '/' and everything that comes after it. %ISSUE%: this is the issue number.

Since:
1.0.0
Is defined by:
expression:
${redmine.issueLinkTemplate}
default-value:
%URL%/issues/show/%ISSUE%

versionLinkTemplate

protected String versionLinkTemplate
Template strings per system that is used to discover the URL to use to display an issue report. Each key in this map denotes the (case-sensitive) identifier of the issue tracking system and its value gives the URL template.

There are 2 template tokens you can use. %URL%: this is computed by getting the <issueManagement>/<url> value from the POM, and removing the last '/' and everything that comes after it. %VERSION%: this is the issue number.

Since:
1.0.0
Is defined by:
expression:
${redmine.versionLinkTemplate}
default-value:
%URL%/versions/show/%VERSION%

localRepository

protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
Local Repository.

Is defined by:
expression:
${localRepository}
Is readonly.
Is required.

outputDirectory

protected File outputDirectory
Report output directory. Note that this parameter is only relevant if the goal is run from the command line or from the default build lifecycle. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.

Is defined by:
default-value:
${project.reporting.outputDirectory}

resolver

protected org.apache.maven.artifact.resolver.ArtifactResolver resolver
Is a Plexus component defined by:

factory

protected org.apache.maven.artifact.factory.ArtifactFactory factory
Is a Plexus component defined by:

i18n

protected org.codehaus.plexus.i18n.I18N i18n
Internationalization.

Is a Plexus component defined by:

siteRenderer

protected org.apache.maven.doxia.siterenderer.Renderer siteRenderer
Doxia Site Renderer.

Is a Plexus component defined by:
Constructor Detail

AbstractRedmineReport

public AbstractRedmineReport(boolean requireProject,
                             boolean requireVersion,
                             boolean requireUser)
Method Detail

executeReport

protected abstract void executeReport(Locale locale)
                               throws org.apache.maven.reporting.MavenReportException
Throws:
org.apache.maven.reporting.MavenReportException

doAction

protected void doAction()
                 throws Exception
Description copied from class: AbstractRedmineMojo
Re-expose the protected method for test purposes...

Specified by:
doAction in class AbstractRedmineMojo
Throws:
Exception
See Also:
AbstractPlugin.doAction()

canGenerateReport

public boolean canGenerateReport()
Specified by:
canGenerateReport in interface org.apache.maven.reporting.MavenReport

generate

public void generate(org.codehaus.doxia.sink.Sink sink,
                     Locale locale)
              throws org.apache.maven.reporting.MavenReportException
Specified by:
generate in interface org.apache.maven.reporting.MavenReport
Throws:
org.apache.maven.reporting.MavenReportException

getName

public String getName(Locale locale)
Specified by:
getName in interface org.apache.maven.reporting.MavenReport

getDescription

public String getDescription(Locale locale)
Specified by:
getDescription in interface org.apache.maven.reporting.MavenReport

getCategoryName

public String getCategoryName()
Specified by:
getCategoryName in interface org.apache.maven.reporting.MavenReport

getReportOutputDirectory

public File getReportOutputDirectory()
Specified by:
getReportOutputDirectory in interface org.apache.maven.reporting.MavenReport

setReportOutputDirectory

public void setReportOutputDirectory(File reportOutputDirectory)
Specified by:
setReportOutputDirectory in interface org.apache.maven.reporting.MavenReport

isExternalReport

public boolean isExternalReport()
Specified by:
isExternalReport in interface org.apache.maven.reporting.MavenReport

getSink

protected org.apache.maven.doxia.sink.Sink getSink()

getBundle

protected ResourceBundle getBundle(Locale locale)

getSkinArtifactFile

protected File getSkinArtifactFile()
                            throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException


Copyright © 2009-2010 CodeLutin. All Rights Reserved.