Class BaseAntTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.rat.anttasks.BaseAntTask
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
Help, Report

public abstract class BaseAntTask extends org.apache.tools.ant.Task
Generated class to provide Ant support for standard RAT command line options. DO NOT EDIT - GENERATED FILE
  • Field Details

    • args

      protected final Map<String, List<String>> args
      A map of CLI-based arguments to values.
  • Constructor Details

    • BaseAntTask

      protected BaseAntTask()
      ////////////////////// End common Arg manipulation code
  • Method Details

    • createName

      public static String createName(String longOpt)
    • unsupportedArgs

      public static List<String> unsupportedArgs()
    • args

      protected List<String> args()
      Gets the list of arguments prepared for the CLI code to parse.
      Returns:
      the List of arguments for the CLI command line.
    • setArg

      protected void setArg(String key, String value)
      Set a key and value into the argument list. Replaces any existing value.
      Parameters:
      key - the key for the map.
      value - the value to set.
    • getArg

      public List<String> getArg(String key)
      Get the list of values for a key.
      Parameters:
      key - the key for the map.
      Returns:
      the list of values for the key or null if not set.
    • addArg

      protected void addArg(String key, String[] value)
      Add values to the key in the argument list. empty values are ignored. If no non-empty values are present no change is made. If the key does not exist, adds it.
      Parameters:
      key - the key for the map.
      value - the array of values to set.
    • addArg

      protected void addArg(String key, String value)
      Add a value to the key in the argument list. If the key does not exist, adds it.
      Parameters:
      key - the key for the map.
      value - the value to set.
    • removeArg

      protected void removeArg(String key)
      Remove a key from the argument list.
      Parameters:
      key - the key to remove from the map.
    • setInputIncludeFile

      public void setInputIncludeFile(String inputIncludeFile)
      Reads <Expression> entries from a file. Entries will override excluded files. Argument should be a File. (See Argument Types for clarification)
      Parameters:
      inputIncludeFile - <Expression> entries from a file.
    • setForce

      @Deprecated public void setForce(boolean force)
      Deprecated.
      Deprecated for removal since 0.17: Use editOverwrite attribute instead.
      Forces any changes in files to be written directly to the source files so that new files are not created. Argument should be a . (See Argument Types for clarification)
      Parameters:
      force - The state
    • setListFamilies

      @Deprecated public void setListFamilies(String listFamilies)
      Deprecated.
      Deprecated for removal since 0.17: Use outputFamilies attribute instead.
      List the defined license families. Argument should be a LicenseFilter. (See Argument Types for clarification)
      Parameters:
      listFamilies - The defined license families.
    • setListLicenses

      @Deprecated public void setListLicenses(String listLicenses)
      Deprecated.
      Deprecated for removal since 0.17: Use outputLicenses attribute instead.
      List the defined licenses. Argument should be a LicenseFilter. (See Argument Types for clarification)
      Parameters:
      listLicenses - The defined licenses.
    • setInputExcludeFile

      public void setInputExcludeFile(String inputExcludeFile)
      Reads <Expression> entries from a file. Entries will be excluded from processing. Argument should be a File. (See Argument Types for clarification)
      Parameters:
      inputExcludeFile - <Expression> entries from a file.
    • setOutputLicenses

      public void setOutputLicenses(String outputLicenses)
      List the defined licenses. Argument should be a LicenseFilter. (See Argument Types for clarification)
      Parameters:
      outputLicenses - The defined licenses.
    • setEditLicense

      public void setEditLicense(boolean editLicense)
      Add the Apache-2.0 license header to any file with an unknown license that is not in the exclusion list. By default new files will be created with the license header, to force the modification of existing files use the editOverwrite attribute option. Argument should be a . (See Argument Types for clarification)
      Parameters:
      editLicense - The state
    • setInputExcludeSize

      public void setInputExcludeSize(String inputExcludeSize)
      Excludes files with sizes less than the number of bytes specified. Argument should be a Integer. (See Argument Types for clarification)
      Parameters:
      inputExcludeSize - Files with sizes less than the number of bytes specified.
    • setCopyright

      @Deprecated public void setCopyright(String copyright)
      Deprecated.
      Deprecated for removal since 0.17: Use editCopyright attribute instead.
      The copyright message to use in the license headers. Argument should be a Arg. (See Argument Types for clarification)
      Parameters:
      copyright - Copyright message to use in the license headers.
    • setOutputArchive

      public void setOutputArchive(String outputArchive)
      Specifies the level of detail in ARCHIVE file reporting. Argument should be a ProcessingType. (See Argument Types for clarification)
      Parameters:
      outputArchive - The level of detail in ARCHIVE file reporting.
    • setEditOverwrite

      public void setEditOverwrite(boolean editOverwrite)
      Forces any changes in files to be written directly to the source files so that new files are not created. Only valid with editLicense attribute. Argument should be a . (See Argument Types for clarification)
      Parameters:
      editOverwrite - The state
    • setConfigurationNoDefaults

      public void setConfigurationNoDefaults(boolean configurationNoDefaults)
      Ignore default configuration. Argument should be a . (See Argument Types for clarification)
      Parameters:
      configurationNoDefaults - The state
    • setOut

      @Deprecated public void setOut(String out)
      Deprecated.
      Deprecated for removal since 0.17: Use outputFile attribute instead.
      Define the output file where to write a report to. Argument should be a File. (See Argument Types for clarification)
      Parameters:
      out - The output file where to write a report to.
    • setIncludesFile

      @Deprecated public void setIncludesFile(String includesFile)
      Deprecated.
      Deprecated for removal since 0.17: Use inputIncludeFile attribute instead.
      Reads <Expression> entries from a file. Entries will override excluded files. Argument should be a File. (See Argument Types for clarification)
      Parameters:
      includesFile - <Expression> entries from a file.
    • setLicensesDeniedFile

      public void setLicensesDeniedFile(String licensesDeniedFile)
      Name of file containing comma separated lists of the denied license IDs. These licenses will be removed from the list of approved licenses. Once licenses are removed they can not be added back. Argument should be a File. (See Argument Types for clarification)
      Parameters:
      licensesDeniedFile - Of file containing comma separated lists of the denied license IDs.
    • setExcludeFile

      @Deprecated public void setExcludeFile(String excludeFile)
      Deprecated.
      Deprecated for removal since 0.17: Use inputExcludeFile attribute instead.
      Reads <Expression> entries from a file. Entries will be excluded from processing. Argument should be a File. (See Argument Types for clarification)
      Parameters:
      excludeFile - <Expression> entries from a file.
    • setLicensesApprovedFile

      public void setLicensesApprovedFile(String licensesApprovedFile)
      Name of file containing comma separated lists of approved License IDs. Argument should be a File. (See Argument Types for clarification)
      Parameters:
      licensesApprovedFile - Of file containing comma separated lists of approved License IDs.
    • setOutputStyle

      public void setOutputStyle(String outputStyle)
      XSLT stylesheet to use when creating the report. Either an external xsl file may be specified or one of the internal named sheets. Argument should be a StyleSheet. (See Argument Types for clarification)
      Parameters:
      outputStyle - Stylesheet to use when creating the report.
    • setDryRun

      public void setDryRun(boolean dryRun)
      If set do not update the files but generate the reports. Argument should be a . (See Argument Types for clarification)
      Parameters:
      dryRun - The state
    • setOutputFile

      public void setOutputFile(String outputFile)
      Define the output file where to write a report to. Argument should be a File. (See Argument Types for clarification)
      Parameters:
      outputFile - The output file where to write a report to.
    • setOutputStandard

      public void setOutputStandard(String outputStandard)
      Specifies the level of detail in STANDARD file reporting. Argument should be a ProcessingType. (See Argument Types for clarification)
      Parameters:
      outputStandard - The level of detail in STANDARD file reporting.
    • setLicenseFamiliesApprovedFile

      public void setLicenseFamiliesApprovedFile(String licenseFamiliesApprovedFile)
      Name of file containing comma separated lists of approved family IDs. Argument should be a File. (See Argument Types for clarification)
      Parameters:
      licenseFamiliesApprovedFile - Of file containing comma separated lists of approved family IDs.
    • setAddLicense

      @Deprecated public void setAddLicense(boolean addLicense)
      Deprecated.
      Deprecated for removal since 0.17: Use editLicense attribute instead.
      Add the Apache-2.0 license header to any file with an unknown license that is not in the exclusion list. Argument should be a . (See Argument Types for clarification)
      Parameters:
      addLicense - The state
    • setStylesheet

      @Deprecated public void setStylesheet(String stylesheet)
      Deprecated.
      Deprecated for removal since 0.17: Use outputStyle attribute instead.
      XSLT stylesheet to use when creating the report. Argument should be a StyleSheet. (See Argument Types for clarification)
      Parameters:
      stylesheet - Stylesheet to use when creating the report.
    • setEditCopyright

      public void setEditCopyright(String editCopyright)
      The copyright message to use in the license headers. Usually in the form of "Copyright 2008 Foo". Only valid with editLicense attribute Argument should be a Arg. (See Argument Types for clarification)
      Parameters:
      editCopyright - Copyright message to use in the license headers.
    • setOutputFamilies

      public void setOutputFamilies(String outputFamilies)
      List the defined license families. Argument should be a LicenseFilter. (See Argument Types for clarification)
      Parameters:
      outputFamilies - The defined license families.
    • setLicenseFamiliesDeniedFile

      public void setLicenseFamiliesDeniedFile(String licenseFamiliesDeniedFile)
      Name of file containing comma separated lists of denied license IDs. These license families will be removed from the list of approved licenses. Once license families are removed they can not be added back. Argument should be a File. (See Argument Types for clarification)
      Parameters:
      licenseFamiliesDeniedFile - Of file containing comma separated lists of denied license IDs.
    • setScanHiddenDirectories

      @Deprecated public void setScanHiddenDirectories(boolean scanHiddenDirectories)
      Deprecated.
      Deprecated for removal since 0.17: Use <inputIncludeStds> with 'HIDDEN_DIR' argument instead.
      Scans hidden directories. Argument should be a . (See Argument Types for clarification)
      Parameters:
      scanHiddenDirectories - The state
    • setXml

      @Deprecated public void setXml(boolean xml)
      Deprecated.
      Deprecated for removal since 0.17: Use outputStyle attribute with the 'xml' argument instead.
      forces XML output rather than the textual report. Argument should be a . (See Argument Types for clarification)
      Parameters:
      xml - The state
    • setNoDefaultLicenses

      @Deprecated public void setNoDefaultLicenses(boolean noDefaultLicenses)
      Deprecated.
      Deprecated for removal since 0.17: Use configurationNoDefaults attribute instead.
      Ignore default configuration. Argument should be a . (See Argument Types for clarification)
      Parameters:
      noDefaultLicenses - The state
    • createCounterMins

      public BaseAntTask.CounterMins createCounterMins()
      The minimum number for the specified counter.
    • createInputIncludes

      public BaseAntTask.InputIncludes createInputIncludes()
      Includes files matching <Expression>. Will override excluded files.
    • createConfigs

      public BaseAntTask.Configs createConfigs()
      File names for system configuration.
    • createLicenses

      public BaseAntTask.Licenses createLicenses()
      Deprecated.
      Deprecated for removal since 0.17: Use <configs> instead.
      File names for system configuration.
    • createInputExcludeStds

      public BaseAntTask.InputExcludeStds createInputExcludeStds()
      Excludes files defined in standard collections based on commonly occurring groups. Excludes any path matcher actions but DOES NOT exclude any file processor actions.
    • createExcludes

      public BaseAntTask.Excludes createExcludes()
      Deprecated.
      Deprecated for removal since 0.17: Use <inputExcludes> instead.
      Excludes files matching <Expression>.
    • createLicenseFamiliesDenied

      public BaseAntTask.LicenseFamiliesDenied createLicenseFamiliesDenied()
      A comma separated list of denied License family IDs. These license families will be removed from the list of approved licenses. Once license families are removed they can not be added back.
    • createInputIncludeStds

      public BaseAntTask.InputIncludeStds createInputIncludeStds()
      Includes files defined in standard collections based on commonly occurring groups. Includes any path matcher actions but DOES NOT include any file processor actions.
    • createCounterMaxs

      public BaseAntTask.CounterMaxs createCounterMaxs()
      The acceptable maximum number for the specified counter. A value of '-1' specifies an unlimited number.
    • createInputExcludes

      public BaseAntTask.InputExcludes createInputExcludes()
      Excludes files matching <Expression>.
    • createLicenseFamiliesApproved

      public BaseAntTask.LicenseFamiliesApproved createLicenseFamiliesApproved()
      A comma separated list of approved license family IDs. These license families will be added to the list of approved license families.
    • createLicensesDenied

      public BaseAntTask.LicensesDenied createLicensesDenied()
      A comma separated list of denied License IDs. These licenses will be removed from the list of approved licenses. Once licenses are removed they can not be added back.
    • createInputExcludeParsedScms

      public BaseAntTask.InputExcludeParsedScms createInputExcludeParsedScms()
      Parse SCM based exclusion files to exclude specified files and directories. This action can apply to any standard collection that implements a file processor.
    • createLicensesApproved

      public BaseAntTask.LicensesApproved createLicensesApproved()
      A comma separated list of approved License IDs. These licenses will be added to the list of approved licenses.
    • createIncludes

      public BaseAntTask.Includes createIncludes()
      Deprecated.
      Deprecated for removal since 0.17: Use <inputIncludes> instead.
      Includes files matching <Expression>. Will override excluded files.