public abstract class AbstractCheckstyleReport extends AbstractMavenReport
| Modifier and Type | Field and Description | 
|---|---|
| protected String | cacheFileSpecifies the cache file used to speed up Checkstyle on successive runs. | 
| protected CheckstyleExecutor | checkstyleExecutor | 
| protected CheckstyleRssGenerator | checkstyleRssGeneratorCheckstyleRssGenerator. | 
| protected String | configLocation
 Specifies the location of the XML configuration to use. | 
| protected boolean | consoleOutputOutput errors to console. | 
| protected String | encodingThe file encoding to use when reading the source files. | 
| protected String | excludesSpecifies the names filter of the source files to be excluded for
 Checkstyle. | 
| protected boolean | failsOnErrorSpecifies if the build should fail upon a violation. | 
| protected String | headerLocation
 Specifies the location of the License file (a.k.a. the header file) that
 can be used by Checkstyle to verify that source code has the correct
 license header. | 
| protected boolean | includeResourcesSpecifies whether to include the resource directories in the check. | 
| protected String | includesSpecifies the names filter of the source files to be used for Checkstyle. | 
| protected boolean | includeTestResourcesSpecifies whether to include the test resource directories in the check. | 
| protected boolean | includeTestSourceDirectoryInclude or not the test source directory/directories to be used for Checkstyle. | 
| protected static String | JAVA_FILES | 
| protected org.codehaus.plexus.resource.ResourceManager | locator | 
| static String | PLUGIN_RESOURCES | 
| protected String | propertiesLocation
 Specifies the location of the properties file. | 
| protected String | propertyExpansionAllows for specifying raw property expansion information. | 
| protected String | resourceExcludesSpecifies the names filter of the resource files to be excluded for
 Checkstyle. | 
| protected String | resourceIncludesSpecifies the names filter of the resource files to be used for Checkstyle. | 
| protected List<Resource> | resourcesSpecifies the location of the resources to be used for Checkstyle. | 
| protected SiteTool | siteToolSiteTool. | 
| protected boolean | skipSkip entire check. | 
| protected ByteArrayOutputStream | stringOutputStream | 
| protected String | suppressionsFileExpressionThe key to be used in the properties for the suppressions file. | 
| protected String | suppressionsLocation
 Specifies the location of the suppressions XML file to use. | 
| protected List<Resource> | testResourcesSpecifies the location of the test resources to be used for Checkstyle. | 
outputDirectory, project, siteRendererCATEGORY_PROJECT_INFORMATION, CATEGORY_PROJECT_REPORTS, ROLE| Constructor and Description | 
|---|
| AbstractCheckstyleReport() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract CheckstyleExecutorRequest | createRequest()Create the Checkstyle executor request. | 
| void | executeReport(Locale locale) | 
| protected DefaultLogger | getConsoleListener()Creates and returns the console listener. | 
| String | getDescription(Locale locale) | 
| protected AuditListener | getListener()Creates and returns the report generation listener. | 
| String | getName(Locale locale) | 
| protected List<File> | getSourceDirectories() | 
| protected List<File> | getTestSourceDirectories() | 
canGenerateReport, closeReport, execute, generate, generate, generate, getCategoryName, getInputEncoding, getOutputDirectory, getOutputEncoding, getProject, getReportOutputDirectory, getSink, getSinkFactory, getSiteRenderer, isExternalReport, setReportOutputDirectorygetLog, getPluginContext, setLog, setPluginContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOutputNamepublic static final String PLUGIN_RESOURCES
protected static final String JAVA_FILES
@Parameter(defaultValue="${project.build.directory}/checkstyle-cachefile") protected String cacheFile
@Parameter(property="checkstyle.config.location", defaultValue="sun_checks.xml") protected String configLocation
Specifies the location of the XML configuration to use.
Potential values are a filesystem path, a URL, or a classpath resource. This parameter expects that the contents of the location conform to the xml format (Checkstyle Checker module) configuration of rulesets.
 This parameter is resolved as resource, URL, then file. If successfully
 resolved, the contents of the configuration is copied into the
 ${project.build.directory}/checkstyle-configuration.xml
 file before being passed to Checkstyle as a configuration.
 
There are 2 predefined rulesets included in Maven Checkstyle Plugin:
sun_checks.xml: Sun Checks.google_checks.xml: Google Checks.@Parameter(property="checkstyle.consoleOutput", defaultValue="false") protected boolean consoleOutput
@Parameter(property="encoding", defaultValue="${project.build.sourceEncoding}") protected String encoding
project.build.sourceEncoding
 is not set, the platform default encoding is used. Note: This parameter always overrides the
 property charset from Checkstyle's TreeWalker module.@Parameter(defaultValue="false") protected boolean failsOnError
@Parameter(property="checkstyle.header.file", defaultValue="LICENSE.txt") protected String headerLocation
Specifies the location of the License file (a.k.a. the header file) that can be used by Checkstyle to verify that source code has the correct license header.
 You need to use ${checkstyle.header.file} in your Checkstyle xml
 configuration to reference the name of this header file.
 
For instance:
 <module name="RegexpHeader">
   <property name="headerFile" value="${checkstyle.header.file}"/>
 </module>
 @Parameter(property="checkstyle.skip", defaultValue="false") protected boolean skip
@Parameter(property="checkstyle.properties.location") protected String propertiesLocation
Specifies the location of the properties file.
 This parameter is resolved as URL, File then resource. If successfully
 resolved, the contents of the properties location is copied into the
 ${project.build.directory}/checkstyle-checker.properties
 file before being passed to Checkstyle for loading.
 
 The contents of the propertiesLocation will be made
 available to Checkstyle for specifying values for parameters within the
 xml configuration (specified in the configLocation
 parameter).
@Parameter protected String propertyExpansion
@Parameter(defaultValue="${project.resources}", readonly=true) protected List<Resource> resources
@Parameter(defaultValue="${project.testResources}", readonly=true) protected List<Resource> testResources
@Parameter(property="checkstyle.includes", defaultValue="**\\/*.java", required=true) protected String includes
@Parameter(property="checkstyle.excludes") protected String excludes
@Parameter(property="checkstyle.resourceIncludes", defaultValue="**/*.properties", required=true) protected String resourceIncludes
@Parameter(property="checkstyle.resourceExcludes") protected String resourceExcludes
@Parameter(property="checkstyle.includeResources", defaultValue="true", required=true) protected boolean includeResources
@Parameter(property="checkstyle.includeTestResources", defaultValue="true", required=true) protected boolean includeTestResources
@Parameter(defaultValue="false") protected boolean includeTestSourceDirectory
@Parameter(property="checkstyle.suppression.expression", defaultValue="checkstyle.suppressions.file") protected String suppressionsFileExpression
@Parameter(property="checkstyle.suppressions.location") protected String suppressionsLocation
Specifies the location of the suppressions XML file to use.
 This parameter is resolved as resource, URL, then file. If successfully
 resolved, the contents of the suppressions XML is copied into the
 ${project.build.directory}/checkstyle-supressions.xml file
 before being passed to Checkstyle for loading.
 
 See suppressionsFileExpression for the property that will
 be made available to your Checkstyle configuration.
@Component(role=org.apache.maven.doxia.tools.SiteTool.class) protected SiteTool siteTool
@Component protected org.codehaus.plexus.resource.ResourceManager locator
@Component(role=CheckstyleRssGenerator.class, hint="default") protected CheckstyleRssGenerator checkstyleRssGenerator
@Component(role=CheckstyleExecutor.class, hint="default") protected CheckstyleExecutor checkstyleExecutor
protected ByteArrayOutputStream stringOutputStream
public void executeReport(Locale locale) throws MavenReportException
executeReport in class AbstractMavenReportMavenReportExceptionprotected abstract CheckstyleExecutorRequest createRequest() throws MavenReportException
MavenReportException - If something goes wrong during creation.protected AuditListener getListener() throws MavenReportException
MavenReportException - If something goes wrong.protected DefaultLogger getConsoleListener() throws MavenReportException
MavenReportException - If something goes wrong.Copyright © 2005–2018 The Apache Software Foundation. All rights reserved.