Class 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.
    • Constructor Detail

      • CheckstyleReport

        public CheckstyleReport()
    • Method Detail

      • createRequest

        protected CheckstyleExecutorRequest createRequest()
                                                   throws org.apache.maven.reporting.MavenReportException
        Create the Checkstyle executor request.
        Specified by:
        createRequest in class AbstractCheckstyleReport
        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:
        canGenerateReport in interface org.apache.maven.reporting.MavenReport
        Overrides:
        canGenerateReport in class org.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:
        true if the resource directory exist