Class CheckstyleReport
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.reporting.AbstractMavenReport
-
- org.apache.maven.plugins.checkstyle.AbstractCheckstyleReport
-
- org.apache.maven.plugins.checkstyle.CheckstyleReport
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo,org.apache.maven.reporting.MavenMultiPageReport,org.apache.maven.reporting.MavenReport
@Mojo(name="checkstyle", requiresDependencyResolution=COMPILE, threadSafe=true) public class CheckstyleReport extends AbstractCheckstyleReportA reporting task that performs Checkstyle analysis and generates an HTML report on any violations that Checkstyle finds.- Version:
- $Id$
-
-
Field Summary
-
Fields inherited from class org.apache.maven.plugins.checkstyle.AbstractCheckstyleReport
cacheFile, checkstyleExecutor, checkstyleRssGenerator, configLocation, consoleOutput, encoding, excludes, failsOnError, headerLocation, includeResources, includes, includeTestResources, includeTestSourceDirectory, JAVA_FILES, locator, PLUGIN_RESOURCES, propertiesLocation, propertyExpansion, resourceExcludes, resourceIncludes, resources, siteTool, skip, stringOutputStream, suppressionsFileExpression, suppressionsLocation, testResources
-
Fields inherited from class org.apache.maven.reporting.AbstractMavenReport
localRepository, outputDirectory, project, remoteRepositories, siteRenderer
-
-
Constructor Summary
Constructors Constructor Description CheckstyleReport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanGenerateReport()protected CheckstyleExecutorRequestcreateRequest()Create the Checkstyle executor request.voidexecuteReport(java.util.Locale locale)java.lang.StringgetOutputName()protected org.apache.maven.project.MavenProjectgetProject()private booleanhasResources(java.util.List<org.apache.maven.model.Resource> resources)Check if any of the resources exist.-
Methods inherited from class org.apache.maven.plugins.checkstyle.AbstractCheckstyleReport
getConsoleListener, getDescription, getListener, getName, getSourceDirectories, getTestSourceDirectories
-
Methods inherited from class org.apache.maven.reporting.AbstractMavenReport
closeReport, execute, generate, generate, generate, getCategoryName, getInputEncoding, getOutputDirectory, getOutputEncoding, getReportOutputDirectory, getSink, getSinkFactory, getSiteRenderer, isExternalReport, setReportOutputDirectory
-
-
-
-
Method Detail
-
getProject
protected org.apache.maven.project.MavenProject getProject()
- Overrides:
getProjectin classorg.apache.maven.reporting.AbstractMavenReport
-
executeReport
public void executeReport(java.util.Locale locale) throws org.apache.maven.reporting.MavenReportException- Overrides:
executeReportin classAbstractCheckstyleReport- Throws:
org.apache.maven.reporting.MavenReportException
-
createRequest
protected CheckstyleExecutorRequest createRequest() throws org.apache.maven.reporting.MavenReportException
Create the Checkstyle executor request.- Specified by:
createRequestin classAbstractCheckstyleReport- Returns:
- The executor request.
- Throws:
org.apache.maven.reporting.MavenReportException- If something goes wrong during creation.
-
getOutputName
public java.lang.String getOutputName()
-
canGenerateReport
public boolean canGenerateReport()
- Specified by:
canGenerateReportin interfaceorg.apache.maven.reporting.MavenReport- Overrides:
canGenerateReportin classorg.apache.maven.reporting.AbstractMavenReport
-
hasResources
private boolean hasResources(java.util.List<org.apache.maven.model.Resource> resources)
Check if any of the resources exist.- Parameters:
resources- The resources to check- Returns:
trueif the resource directory exist
-
-