ContextEnabled
, Mojo
, MavenMultiPageReport
, MavenReport
public abstract class AbstractPmdReport extends AbstractMavenReport
Modifier and Type | Field | Description |
---|---|---|
protected boolean |
aggregate |
Whether to build an aggregated report at the root, or build individual reports.
|
protected java.lang.String |
excludeFromFailureFile |
File that lists classes and rules to be excluded from failures.
|
protected java.util.Map<java.io.File,PmdFileInfo> |
filesToProcess |
The files that are being analyzed.
|
protected java.lang.String |
format |
Set the output format type, in addition to the HTML report.
|
protected boolean |
includeTests |
Run PMD on the tests.
|
protected boolean |
includeXmlInSite |
Whether to include the xml files generated by PMD/CPD in the site.
|
protected java.io.File |
outputDirectory |
The output directory for the final HTML report.
|
protected MavenProject |
project |
The project to analyse.
|
protected java.util.List<MavenProject> |
reactorProjects |
The projects in the reactor for aggregation report.
|
protected boolean |
showPmdLog |
Redirect PMD log into maven log out.
|
protected boolean |
skipEmptyReport |
Skip the PMD/CPD report generation if there are no violations or duplications found.
|
protected java.io.File |
targetDirectory |
The output directory for the intermediate XML report.
|
CATEGORY_PROJECT_INFORMATION, CATEGORY_PROJECT_REPORTS, ROLE
Constructor | Description |
---|---|
AbstractPmdReport() |
Modifier and Type | Method | Description |
---|---|---|
boolean |
canGenerateReport() |
|
protected java.lang.String |
constructXRefLocation(boolean test) |
|
protected java.util.Map<java.io.File,PmdFileInfo> |
getFilesToProcess() |
Convenience method to get the list of files where the PMD tool will be executed
|
protected java.lang.String |
getOutputDirectory() |
|
protected java.lang.String |
getOutputEncoding() |
Gets the effective reporting output files encoding.
|
protected MavenProject |
getProject() |
|
protected Renderer |
getSiteRenderer() |
|
protected java.lang.String |
getSourceEncoding() |
|
protected boolean |
isHtml() |
|
protected boolean |
isXml() |
|
protected void |
setupPmdLogging() |
closeReport, execute, executeReport, generate, generate, generate, getCategoryName, getInputEncoding, getReportOutputDirectory, getSink, getSinkFactory, isExternalReport, setReportOutputDirectory
getLog, getPluginContext, setLog, setPluginContext
getDescription, getName, getOutputName
@Parameter(property="project.build.directory", required=true) protected java.io.File targetDirectory
@Parameter(property="project.reporting.outputDirectory", required=true) protected java.io.File outputDirectory
@Parameter(defaultValue="${project}", readonly=true, required=true) protected MavenProject project
@Parameter(property="format", defaultValue="xml") protected java.lang.String format
@Parameter(defaultValue="false") protected boolean includeTests
@Parameter(property="aggregate", defaultValue="false") protected boolean aggregate
@Parameter(property="reactorProjects", readonly=true) protected java.util.List<MavenProject> reactorProjects
@Parameter(defaultValue="false") protected boolean includeXmlInSite
@Parameter(defaultValue="true") protected boolean skipEmptyReport
true
.@Parameter(property="pmd.excludeFromFailureFile", defaultValue="") protected java.lang.String excludeFromFailureFile
@Parameter(defaultValue="true", property="pmd.showPmdLog") protected boolean showPmdLog
-X
or --debug
),
the PMD logger is also configured for debug.protected java.util.Map<java.io.File,PmdFileInfo> filesToProcess
protected MavenProject getProject()
getProject
in class AbstractMavenReport
protected Renderer getSiteRenderer()
getSiteRenderer
in class AbstractMavenReport
protected java.lang.String constructXRefLocation(boolean test)
protected java.util.Map<java.io.File,PmdFileInfo> getFilesToProcess() throws java.io.IOException
java.io.IOException
- If an I/O error occurs during construction of the
canonical pathnames of the filesprotected boolean isHtml()
protected boolean isXml()
public boolean canGenerateReport()
canGenerateReport
in interface MavenReport
canGenerateReport
in class AbstractMavenReport
protected java.lang.String getOutputDirectory()
getOutputDirectory
in class AbstractMavenReport
protected java.lang.String getSourceEncoding()
protected java.lang.String getOutputEncoding()
getOutputEncoding
in class AbstractMavenReport
null
.protected void setupPmdLogging()
Copyright © 2005–2018 The Apache Software Foundation. All rights reserved.