org.nuiton.jredmine.plugin.report
Class AbstractRedmineReport
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.nuiton.plugin.AbstractPlugin
org.nuiton.jredmine.plugin.AbstractRedmineMojo
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 classes/interfaces inherited from interface org.nuiton.plugin.Plugin |
org.nuiton.plugin.Plugin.InitState, org.nuiton.plugin.Plugin.Packaging |
|
Field Summary |
protected boolean |
anonymous
Flag to know if anonymùous connexion to redmine server is required. |
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)
|
| Methods inherited from class org.nuiton.jredmine.plugin.AbstractRedmineMojo |
afterExecute, checkRunOnceDone, checkSkip, closeService, getEncoding, getProject, getProjectId, getRestPassword, getRestUrl, getRestUsername, getVersionId, init, initReleaseProject, initReleaseUser, initReleaseVersion, isGoalSkip, isRunOnce, isRunOnceDone, isSafe, isVerbose, setEncoding, setProject, setRestPassword, setRestUrl, setRestUsername, setSafe, setVerbose |
| Methods inherited from class org.nuiton.plugin.AbstractPlugin |
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, backupFile, checkEncoding, checkPackaging, checkResource, checkRunOnceDone, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, execute, getBackupFile, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getRootProject, getTemplate, hasClassPath, 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, isVerbose, setEncoding, setRestPassword, setRestUrl, setRestUsername, setVerbose |
anonymous
protected boolean anonymous
- Flag to know if anonymùous connexion to redmine server is required.
For this goal, the default value is
true
Note: If set to false, you should fill AbstractRedmineMojo.username
and AbstractRedmineMojo.password properties.
- Since:
- 1.1.3
- Is defined by:
- expression:
- ${redmine.anonymous}
- default-value:
- true
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:
AbstractRedmineReport
public AbstractRedmineReport(boolean requireProject,
boolean requireVersion,
boolean requireUser)
executeReport
protected abstract void executeReport(Locale locale)
throws org.apache.maven.reporting.MavenReportException
- Throws:
org.apache.maven.reporting.MavenReportException
skipReport
protected abstract boolean skipReport()
- Returns:
true if report should be skip
isAnonymous
public boolean isAnonymous()
- Specified by:
isAnonymous in interface org.nuiton.io.rest.RestClientConfiguration
setAnonymous
public void setAnonymous(boolean anonymous)
- Specified by:
setAnonymous in interface org.nuiton.io.rest.RestClientConfiguration
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 - if any problems
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.