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 AbstractCheckstyleReport
A reporting task that performs Checkstyle analysis and generates an HTML
report on any violations that Checkstyle finds.
-
Field Summary
Fields inherited from class org.apache.maven.plugins.checkstyle.AbstractCheckstyleReport
cacheFile, checkstyleExecutor, configLocation, consoleOutput, excludes, failsOnError, headerLocation, includeResources, includes, includeTestResources, includeTestSourceDirectory, JAVA_FILES, locator, propertiesLocation, propertyExpansion, resourceExcludes, resourceIncludes, resources, skip, stringOutputStream, suppressionsFileExpression, suppressionsLocation, testResourcesFields inherited from class org.apache.maven.reporting.AbstractMavenReport
locale, mojoExecution, outputDirectory, outputFormat, outputTimestamp, project, reactorProjects, remoteProjectRepositories, repoSession, siteDirectory, siteRenderer, siteToolFields inherited from interface org.apache.maven.reporting.MavenReport
CATEGORY_PROJECT_INFORMATION, CATEGORY_PROJECT_REPORTS, ROLEFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected CheckstyleExecutorRequestCreate the Checkstyle executor request.private booleanhasResources(List<org.apache.maven.model.Resource> resources) Check if any of the resources exist.Methods inherited from class org.apache.maven.plugins.checkstyle.AbstractCheckstyleReport
executeReport, getConsoleListener, getDescription, getI18nString, getListener, getName, getProject, getReactorProjects, getSourceDirectories, getTestSourceDirectoriesMethods inherited from class org.apache.maven.reporting.AbstractMavenReport
closeReport, constructXrefLocation, execute, generate, generate, getCategoryName, getInputEncoding, getLocale, getOutputDirectory, getOutputEncoding, getReportOutputDirectory, getSink, getSinkFactory, getSiteRenderer, getXrefLocation, isExternalReport, setReportOutputDirectoryMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.reporting.MavenReport
getOutputPath
-
Constructor Details
-
CheckstyleReport
public CheckstyleReport()
-
-
Method Details
-
createRequest
protected CheckstyleExecutorRequest createRequest() throws org.apache.maven.reporting.MavenReportExceptionCreate 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
-
canGenerateReport
public boolean canGenerateReport()- Specified by:
canGenerateReportin interfaceorg.apache.maven.reporting.MavenReport- Overrides:
canGenerateReportin classorg.apache.maven.reporting.AbstractMavenReport
-
hasResources
Check if any of the resources exist.- Parameters:
resources- The resources to check- Returns:
trueif the resource directory exist
-