Class Report

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.rat.anttasks.Report
All Implemented Interfaces:
Cloneable

public class Report extends org.apache.tools.ant.Task
A basic Ant task that generates a report on all files specified by the nested resource collection(s).

IHeaderMatcher(s) can be specified as nested elements as well.

The attribute format defines the output format and can take the values

  • xml - Rat's native XML output.
  • styled - transforms the XML output using the given stylesheet. The stylesheet attribute must be set as well if this attribute is used.
  • plain - plain text using Rat's built-in stylesheet. This is the default.
  • Constructor Details

    • Report

      public Report()
  • Method Details

    • add

      public void add(org.apache.tools.ant.types.ResourceCollection rc)
      Adds resources that will be checked.
      Parameters:
      rc - resource to check.
    • setInputFileFilter

      public void setInputFileFilter(FilenameFilter inputFileFilter)
    • setReportFile

      public void setReportFile(File reportFile)
    • addLicense

      public void addLicense(License lic)
    • addFamily

      public void addFamily(Family family)
    • addStylesheet

      @Deprecated public void addStylesheet(org.apache.tools.ant.types.Resource styleSheet)
      Deprecated.
      Parameters:
      styleSheet -
    • addStyleSheet

      public void addStyleSheet(org.apache.tools.ant.types.Resource styleSheet)
      Adds a given style sheet to the report.
      Parameters:
      styleSheet - style sheet to use in this report.
    • setStyleReport

      public void setStyleReport(boolean styleReport)
    • setFormat

      @Deprecated public void setFormat(String style)
      Deprecated.
      use #setStyleReport
      Parameters:
      style -
    • setLicenses

      public void setLicenses(File fileName)
    • setUseDefaultLicenses

      public void setUseDefaultLicenses(boolean useDefaultLicenses)
      Parameters:
      useDefaultLicenses - Whether to add the default list of license matchers.
    • setAddApprovedLicense

      public void setAddApprovedLicense(String familyCategory)
    • addAddApprovedLicense

      public void addAddApprovedLicense(String familyCategory)
    • setRemoveApprovedLicense

      public void setRemoveApprovedLicense(String familyCategory)
    • setRemoveApprovedLicense

      public void setRemoveApprovedLicense(String[] familyCategory)
    • setCopyrightMessage

      public void setCopyrightMessage(String copyrightMessage)
    • setAddLicenseHeaders

      public void setAddLicenseHeaders(Report.AddLicenseHeaders setting)
    • setAddDefaultDefinitions

      public void setAddDefaultDefinitions(File fileName)
    • getConfiguration

      public ReportConfiguration getConfiguration()
    • execute

      public void execute()
      Generates the report.
      Overrides:
      execute in class org.apache.tools.ant.Task