public abstract class AbstractPmdReport extends AbstractMavenReport
Modifier and Type | Field and Description |
---|---|
protected boolean |
aggregate
Whether to build an aggregated report at the root, or build individual reports.
|
protected String |
excludeFromFailureFile
File that lists classes and rules to be excluded from failures.
|
protected Map<File,PmdFileInfo> |
filesToProcess
The files that are being analyzed.
|
protected 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 File |
outputDirectory
The output directory for the final HTML report.
|
protected MavenProject |
project
The project to analyse.
|
protected 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 File |
targetDirectory
The output directory for the intermediate XML report.
|
CATEGORY_PROJECT_INFORMATION, CATEGORY_PROJECT_REPORTS, ROLE
Constructor and Description |
---|
AbstractPmdReport() |
Modifier and Type | Method and Description |
---|---|
boolean |
canGenerateReport() |
protected String |
constructXRefLocation(boolean test) |
protected Map<File,PmdFileInfo> |
getFilesToProcess()
Convenience method to get the list of files where the PMD tool will be executed
|
protected String |
getOutputDirectory() |
protected String |
getOutputEncoding()
Gets the effective reporting output files encoding.
|
protected MavenProject |
getProject() |
protected Renderer |
getSiteRenderer() |
protected 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDescription, getName, getOutputName
@Parameter(property="project.build.directory", required=true) protected File targetDirectory
@Parameter(property="project.reporting.outputDirectory", required=true) protected File outputDirectory
@Parameter(defaultValue="${project}", readonly=true, required=true) protected MavenProject project
@Parameter(property="format", defaultValue="xml") protected String format
@Parameter(defaultValue="false") protected boolean includeTests
@Parameter(property="aggregate", defaultValue="false") protected boolean aggregate
@Parameter(property="reactorProjects", readonly=true) protected List<MavenProject> reactorProjects
@Parameter(defaultValue="false") protected boolean includeXmlInSite
@Parameter(defaultValue="true") protected boolean skipEmptyReport
true
.@Parameter(property="pmd.excludeFromFailureFile", defaultValue="") protected String excludeFromFailureFile
@Parameter(defaultValue="true", property="pmd.showPmdLog") protected boolean showPmdLog
-X
or --debug
),
the PMD logger is also configured for debug.protected Map<File,PmdFileInfo> filesToProcess
protected MavenProject getProject()
getProject
in class AbstractMavenReport
protected Renderer getSiteRenderer()
getSiteRenderer
in class AbstractMavenReport
protected String constructXRefLocation(boolean test)
protected Map<File,PmdFileInfo> getFilesToProcess() throws IOException
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 String getOutputDirectory()
getOutputDirectory
in class AbstractMavenReport
protected String getSourceEncoding()
protected String getOutputEncoding()
getOutputEncoding
in class AbstractMavenReport
null
.protected void setupPmdLogging()
Copyright © 2005–2019 The Apache Software Foundation. All rights reserved.