Package org.apache.maven.plugins.pmd
Class PmdReport
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.reporting.AbstractMavenReport
org.apache.maven.plugins.pmd.AbstractPmdReport
org.apache.maven.plugins.pmd.PmdReport
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled,- org.apache.maven.plugin.Mojo,- org.apache.maven.reporting.MavenMultiPageReport,- org.apache.maven.reporting.MavenReport
- Direct Known Subclasses:
- AggregatorPmdReport
@Mojo(name="pmd",
      threadSafe=true,
      requiresDependencyResolution=TEST)
public class PmdReport
extends AbstractPmdReport
Creates a PMD site report based on the rulesets and configuration set in the plugin.
 It can also generate a pmd output file aside from the site report in any of the following formats: xml, csv or txt.
- Since:
- 2.0
- Version:
- $Id$
- Author:
- Brett Porter
- 
Field SummaryFields inherited from class org.apache.maven.plugins.pmd.AbstractPmdReportaggregate, excludeFromFailureFile, filesToProcess, format, includeTests, includeXmlInReports, session, showPmdLog, skipEmptyReport, targetDirectoryFields inherited from class org.apache.maven.reporting.AbstractMavenReportlocale, mojoExecution, outputDirectory, outputFormat, outputTimestamp, project, reactorProjects, remoteProjectRepositories, repoSession, siteDirectory, siteRenderer, siteToolFields inherited from interface org.apache.maven.reporting.MavenReportCATEGORY_PROJECT_INFORMATION, CATEGORY_PROJECT_REPORTS, ROLEFields inherited from interface org.apache.maven.plugin.MojoROLE
- 
Constructor SummaryConstructorsConstructorDescriptionPmdReport(org.codehaus.plexus.resource.ResourceManager locator, ConfigurationService configurationService, org.codehaus.plexus.i18n.I18N i18n, PmdServiceExecutor serviceExecutor) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanfinal net.sourceforge.pmd.renderers.RendererDeprecated.voidexecuteReport(Locale locale) getDescription(Locale locale) protected StringgetI18nString(Locale locale, String key) protected StringgetLocationTemp(String name, int position) Convenience method to get the location of the specified file name.Deprecated.voidsetRulesets(String[] rulesets) Configures the PMD rulesets to be used directly.Methods inherited from class org.apache.maven.plugins.pmd.AbstractPmdReportcanGenerateReportInternal, getAggregatedProjects, getFilesToProcess, getJdkToolchain, getMojoExecution, getProject, getReactorProjects, isAggregator, isXmlMethods inherited from class org.apache.maven.reporting.AbstractMavenReportcloseReport, constructXrefLocation, execute, generate, generate, getCategoryName, getInputEncoding, getLocale, getOutputDirectory, getOutputEncoding, getReportOutputDirectory, getSink, getSinkFactory, getSiteRenderer, getXrefLocation, isExternalReport, setReportOutputDirectoryMethods inherited from class org.apache.maven.plugin.AbstractMojogetLog, getPluginContext, setLog, setPluginContext
- 
Constructor Details- 
PmdReport@Inject public PmdReport(org.codehaus.plexus.resource.ResourceManager locator, ConfigurationService configurationService, org.codehaus.plexus.i18n.I18N i18n, PmdServiceExecutor serviceExecutor) 
 
- 
- 
Method Details- 
getName
- 
getDescription
- 
getI18nString- Parameters:
- locale- The locale
- key- The key to search for
- Returns:
- The text appropriate for the locale.
 
- 
setRulesetsConfigures the PMD rulesets to be used directly. Note: Usually the rulesets are configured via the property.- Parameters:
- rulesets- the PMD rulesets to be used.
- See Also:
 
- 
executeReport- Specified by:
- executeReportin class- org.apache.maven.reporting.AbstractMavenReport
- Throws:
- org.apache.maven.reporting.MavenReportException
 
- 
canGenerateReportpublic boolean canGenerateReport() throws org.apache.maven.reporting.MavenReportException- Specified by:
- canGenerateReportin interface- org.apache.maven.reporting.MavenReport
- Overrides:
- canGenerateReportin class- org.apache.maven.reporting.AbstractMavenReport
- Throws:
- org.apache.maven.reporting.MavenReportException
 
- 
getLocationTempConvenience method to get the location of the specified file name.- Parameters:
- name- the name of the file whose location is to be resolved
- position- position in the list of rulesets (1-based)
- Returns:
- a String that contains the absolute file name of the file
 
- 
getOutputNameDeprecated.
- 
getOutputPath
- 
createRenderer@Deprecated public final net.sourceforge.pmd.renderers.Renderer createRenderer() throws org.apache.maven.reporting.MavenReportExceptionDeprecated.UsePmdExecutor.createRenderer(String, String)instead.Create and return the correct renderer for the output type.- Returns:
- the renderer based on the configured output
- Throws:
- org.apache.maven.reporting.MavenReportException- if no renderer found for the output type
 
 
- 
PmdExecutor.createRenderer(String, String)instead.