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:
ContextEnabled
,Mojo
,MavenMultiPageReport
,MavenReport
@Mojo(name="pmd", threadSafe=true, requiresDependencyResolution=TEST) public class PmdReport extends AbstractPmdReport
Creates a PMD report.- Since:
- 2.0
- Version:
- $Id$
- Author:
- Brett Porter
-
-
Field Summary
-
Fields inherited from class org.apache.maven.plugins.pmd.AbstractPmdReport
aggregate, excludeFromFailureFile, filesToProcess, format, includeTests, includeXmlInSite, outputDirectory, project, reactorProjects, session, showPmdLog, skipEmptyReport, targetDirectory
-
Fields inherited from interface org.apache.maven.reporting.MavenReport
CATEGORY_PROJECT_INFORMATION, CATEGORY_PROJECT_REPORTS, ROLE
-
-
Constructor Summary
Constructors Constructor Description PmdReport()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
canGenerateReport()
net.sourceforge.pmd.renderers.Renderer
createRenderer()
Deprecated.UsePmdExecutor.createRenderer(String, String)
instead.void
executeReport(java.util.Locale locale)
java.lang.String
getDescription(java.util.Locale locale)
protected java.lang.String
getLocationTemp(java.lang.String name)
Convenience method to get the location of the specified file name.java.lang.String
getName(java.util.Locale locale)
java.lang.String
getOutputName()
protected java.lang.String
getSourceEncoding()
void
setRulesets(java.lang.String[] rulesets)
Configures the PMD rulesets to be used directly.-
Methods inherited from class org.apache.maven.plugins.pmd.AbstractPmdReport
constructXRefLocation, determineCurrentRootLogLevel, getFilesToProcess, getOutputDirectory, getOutputEncoding, getProject, getSiteRenderer, getToolchain, isXml
-
Methods inherited from class org.apache.maven.reporting.AbstractMavenReport
closeReport, execute, generate, generate, generate, getCategoryName, getInputEncoding, getReportOutputDirectory, getSink, getSinkFactory, isExternalReport, setReportOutputDirectory
-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
Method Detail
-
getName
public java.lang.String getName(java.util.Locale locale)
-
getDescription
public java.lang.String getDescription(java.util.Locale locale)
-
setRulesets
public void setRulesets(java.lang.String[] rulesets)
Configures 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:
rulesets
-
executeReport
public void executeReport(java.util.Locale locale) throws MavenReportException
- Specified by:
executeReport
in classAbstractMavenReport
- Throws:
MavenReportException
-
canGenerateReport
public boolean canGenerateReport()
Description copied from class:AbstractPmdReport
- Specified by:
canGenerateReport
in interfaceMavenReport
- Overrides:
canGenerateReport
in classAbstractPmdReport
-
getSourceEncoding
protected java.lang.String getSourceEncoding()
- Overrides:
getSourceEncoding
in classAbstractPmdReport
-
getLocationTemp
protected java.lang.String getLocationTemp(java.lang.String name)
Convenience method to get the location of the specified file name.- Parameters:
name
- the name of the file whose location is to be resolved- Returns:
- a String that contains the absolute file name of the file
-
getOutputName
public java.lang.String getOutputName()
-
createRenderer
@Deprecated public final net.sourceforge.pmd.renderers.Renderer createRenderer() throws MavenReportException
Deprecated.UsePmdExecutor.createRenderer(String, String)
instead.Create and return the correct renderer for the output type.- Returns:
- the renderer based on the configured output
- Throws:
MavenReportException
- if no renderer found for the output type
-
-