Class BaseRatMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.rat.plugin.BaseRatMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
AbstractRatMojo

public abstract class BaseRatMojo extends org.apache.maven.plugin.AbstractMojo
Generated class to provide Maven support for standard RAT command line options
  • Field Details

  • Constructor Details

    • BaseRatMojo

      protected BaseRatMojo()
  • Method Details

    • createName

      public static String createName(String longOpt)
      Creates a Maven name from a long option. Will map excluded long options to null.
      Parameters:
      longOpt - the kebab name.
      Returns:
      The CamelCased name for Maven use.
    • toKebabForm

      public static String toKebabForm(String camelCase)
      Creates a kebab case name from a camel case name.
      Parameters:
      camelCase - the camel case name to convert.
      Returns:
      the kebab format.
    • unsupportedArgs

      public static List<String> unsupportedArgs()
      Returns the list of unsupported args.
      Returns:
      the list of kebab style names that are unsupported by the Maven UI.
    • 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. If the key does not exist, adds it.
      Parameters:
      key - the key for the map.
      value - the value 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.
    • setCopyright

      @Deprecated @Parameter(property="rat.Copyright") public void setCopyright(String copyright)
      Deprecated.
      Deprecated for removal since 0.17: Use <editCopyright> instead.
      The copyright message to use in the license headers.
      Parameters:
      copyright - copyright message to use in the license headers.
    • setEditCopyright

      @Parameter(property="rat.EditCopyright") 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>
      Parameters:
      editCopyright - copyright message to use in the license headers.
    • setForce

      @Deprecated @Parameter(property="rat.Force") public void setForce(boolean force)
      Deprecated.
      Deprecated for removal since 0.17: Use <editOverwrite> instead.
      Forces any changes in files to be written directly to the source files (i.e. new files are not created).
      Parameters:
      force - the state
    • setEditOverwrite

      @Parameter(property="rat.EditOverwrite") public void setEditOverwrite(boolean editOverwrite)
      Forces any changes in files to be written directly to the source files (i.e. new files are not created). Only valid with <editLicense>
      Parameters:
      editOverwrite - the state
    • setAddLicense

      @Deprecated @Parameter(property="rat.AddLicense") public void setAddLicense(boolean addLicense)
      Deprecated.
      Deprecated for removal since 0.17: Use <editLicense> instead.
      Add the default license header to any file with an unknown license that is not in the exclusion list.
      Parameters:
      addLicense - the state
    • setEditLicense

      @Parameter(property="rat.EditLicense") public void setEditLicense(boolean editLicense)
      Add the default 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> option.
      Parameters:
      editLicense - the state
    • setConfigs

      @Parameter public void setConfigs(String[] config)
      File names for system configuration. Arguments should be File. (See Argument Types for clarification)
      Parameters:
      config - names for system configuration.
    • setConfig

      @Parameter public void setConfig(String config)
      File names for system configuration. Arguments should be File. (See Argument Types for clarification)
      Parameters:
      config - names for system configuration.
    • setLicenses

      @Deprecated @Parameter public void setLicenses(String[] licenses)
      Deprecated.
      Deprecated for removal since 0.17: Use <config> instead.
      File names for system configuration. Arguments should be File. (See Argument Types for clarification)
      Parameters:
      licenses - names for system configuration.
    • setLicenses

      @Deprecated @Parameter public void setLicenses(String licenses)
      Deprecated.
      Deprecated for removal since 0.17: Use <config> instead.
      File names for system configuration. Arguments should be File. (See Argument Types for clarification)
      Parameters:
      licenses - names for system configuration.
    • setConfigurationNoDefaults

      @Parameter(property="rat.ConfigurationNoDefaults") public void setConfigurationNoDefaults(boolean configurationNoDefaults)
      Ignore default configuration.
      Parameters:
      configurationNoDefaults - the state
    • setNoDefaultLicenses

      @Deprecated @Parameter(property="rat.NoDefaultLicenses") public void setNoDefaultLicenses(boolean noDefaultLicenses)
      Deprecated.
      Deprecated for removal since 0.17: Use <configurationNoDefaults> instead.
      Ignore default configuration.
      Parameters:
      noDefaultLicenses - the state
    • setLicensesApproved

      @Parameter public void setLicensesApproved(String[] licensesApproved)
      The approved License IDs. These licenses will be added to the list of approved licenses. Arguments should be LicenseID. (See Argument Types for clarification)
      Parameters:
      licensesApproved - approved License IDs.
    • setLicensesApproved

      @Parameter public void setLicensesApproved(String licensesApproved)
      The approved License IDs. These licenses will be added to the list of approved licenses. Arguments should be LicenseID. (See Argument Types for clarification)
      Parameters:
      licensesApproved - approved License IDs.
    • setLicensesApprovedFile

      @Parameter(property="rat.LicensesApprovedFile") public void setLicensesApprovedFile(String licensesApprovedFile)
      Name of file containing the approved License IDs. Argument should be a File. (See Argument Types for clarification)
      Parameters:
      licensesApprovedFile - of file containing the approved License IDs.
    • setLicenseFamiliesApproved

      @Parameter public void setLicenseFamiliesApproved(String[] licenseFamiliesApproved)
      The approved License Family IDs. These licenses families will be added to the list of approved licenses families. Arguments should be FamilyID. (See Argument Types for clarification)
      Parameters:
      licenseFamiliesApproved - approved License Family IDs.
    • setLicenseFamiliesApproved

      @Parameter public void setLicenseFamiliesApproved(String licenseFamiliesApproved)
      The approved License Family IDs. These licenses families will be added to the list of approved licenses families. Arguments should be FamilyID. (See Argument Types for clarification)
      Parameters:
      licenseFamiliesApproved - approved License Family IDs.
    • setLicenseFamiliesApprovedFile

      @Parameter(property="rat.LicenseFamiliesApprovedFile") public void setLicenseFamiliesApprovedFile(String licenseFamiliesApprovedFile)
      Name of file containing the approved family IDs. Argument should be a File. (See Argument Types for clarification)
      Parameters:
      licenseFamiliesApprovedFile - of file containing the approved family IDs.
    • setLicensesDenied

      @Parameter public void setLicensesDenied(String[] licensesDenied)
      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. Arguments should be LicenseID. (See Argument Types for clarification)
      Parameters:
      licensesDenied - denied License IDs.
    • setLicensesDenied

      @Parameter public void setLicensesDenied(String licensesDenied)
      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. Arguments should be LicenseID. (See Argument Types for clarification)
      Parameters:
      licensesDenied - denied License IDs.
    • setLicensesDeniedFile

      @Parameter(property="rat.LicensesDeniedFile") public void setLicensesDeniedFile(String licensesDeniedFile)
      Name of file containing the denied license IDs. Argument should be a File. (See Argument Types for clarification)
      Parameters:
      licensesDeniedFile - of file containing the denied license IDs.
    • setLicenseFamiliesDenied

      @Parameter public void setLicenseFamiliesDenied(String[] licenseFamiliesDenied)
      The denied License family IDs. These license families will be removed from the list of approved licenses. Arguments should be FamilyID. (See Argument Types for clarification)
      Parameters:
      licenseFamiliesDenied - denied License family IDs.
    • setLicenseFamiliesDenied

      @Parameter public void setLicenseFamiliesDenied(String licenseFamiliesDenied)
      The denied License family IDs. These license families will be removed from the list of approved licenses. Arguments should be FamilyID. (See Argument Types for clarification)
      Parameters:
      licenseFamiliesDenied - denied License family IDs.
    • setLicenseFamiliesDeniedFile

      @Parameter(property="rat.LicenseFamiliesDeniedFile") public void setLicenseFamiliesDeniedFile(String licenseFamiliesDeniedFile)
      Name of file containing the denied license IDs. Argument should be a File. (See Argument Types for clarification)
      Parameters:
      licenseFamiliesDeniedFile - of file containing the denied license IDs.
    • setCounterMaxs

      @Parameter public void setCounterMaxs(String[] counterMax)
      The acceptable maximum number for the specified counter. A value of '-1' specifies an unlimited number. Arguments should be CounterPattern. (See Argument Types for clarification)
      Parameters:
      counterMax - acceptable maximum number for the specified counter.
    • setCounterMax

      @Parameter public void setCounterMax(String counterMax)
      The acceptable maximum number for the specified counter. A value of '-1' specifies an unlimited number. Arguments should be CounterPattern. (See Argument Types for clarification)
      Parameters:
      counterMax - acceptable maximum number for the specified counter.
    • setCounterMins

      @Parameter public void setCounterMins(String[] counterMin)
      The minimum number for the specified counter. Arguments should be CounterPattern. (See Argument Types for clarification)
      Parameters:
      counterMin - minimum number for the specified counter.
    • setCounterMin

      @Parameter public void setCounterMin(String counterMin)
      The minimum number for the specified counter. Arguments should be CounterPattern. (See Argument Types for clarification)
      Parameters:
      counterMin - minimum number for the specified counter.
    • setInputSources

      @Parameter public void setInputSources(String[] inputSource)
      A file containing file names to process. File names must use linux directory separator ('/') or none at all. File names that do not start with '/' are relative to the directory where the argument is located. Arguments should be File. (See Argument Types for clarification)
      Parameters:
      inputSource - file containing file names to process.
    • setInputSource

      @Parameter public void setInputSource(String inputSource)
      A file containing file names to process. File names must use linux directory separator ('/') or none at all. File names that do not start with '/' are relative to the directory where the argument is located. Arguments should be File. (See Argument Types for clarification)
      Parameters:
      inputSource - file containing file names to process.
    • setExcludes

      @Deprecated @Parameter public void setExcludes(String[] exclude)
      Deprecated.
      Deprecated for removal since 0.17: Use <inputExclude> instead.
      Excludes files matching <Expression>. Arguments should be Expression. (See Argument Types for clarification)
      Parameters:
      exclude - files matching <Expression>.
    • setExclude

      @Deprecated @Parameter public void setExclude(String exclude)
      Deprecated.
      Deprecated for removal since 0.17: Use <inputExclude> instead.
      Excludes files matching <Expression>. Arguments should be Expression. (See Argument Types for clarification)
      Parameters:
      exclude - files matching <Expression>.
    • setInputExcludes

      @Parameter public void setInputExcludes(String[] inputExclude)
      Excludes files matching <Expression>. Arguments should be Expression. (See Argument Types for clarification)
      Parameters:
      inputExclude - files matching <Expression>.
    • setInputExclude

      @Parameter public void setInputExclude(String inputExclude)
      Excludes files matching <Expression>. Arguments should be Expression. (See Argument Types for clarification)
      Parameters:
      inputExclude - files matching <Expression>.
    • setExcludeFile

      @Deprecated @Parameter(property="rat.ExcludeFile") public void setExcludeFile(String excludeFile)
      Deprecated.
      Deprecated for removal since 0.17: Use <inputExcludeFile> 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.
    • setInputExcludeFile

      @Parameter(property="rat.InputExcludeFile") 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.
    • setInputExcludeStds

      @Parameter public void setInputExcludeStds(String[] inputExcludeStd)
      Excludes files defined in standard collections based on commonly occurring groups. Arguments should be StandardCollection. (See Argument Types for clarification)
      Parameters:
      inputExcludeStd - files defined in standard collections based on commonly occurring groups.
    • setInputExcludeStd

      @Parameter public void setInputExcludeStd(String inputExcludeStd)
      Excludes files defined in standard collections based on commonly occurring groups. Arguments should be StandardCollection. (See Argument Types for clarification)
      Parameters:
      inputExcludeStd - files defined in standard collections based on commonly occurring groups.
    • setInputExcludeSize

      @Parameter(property="rat.InputExcludeSize") public void setInputExcludeSize(String inputExcludeSize)
      Excludes files with sizes less than the given argument. Argument should be a Integer. (See Argument Types for clarification)
      Parameters:
      inputExcludeSize - files with sizes less than the given argument.
    • setInputIncludes

      @Parameter public void setInputIncludes(String[] inputInclude)
      Includes files matching <Expression>. Will override excluded files. Arguments should be Expression. (See Argument Types for clarification)
      Parameters:
      inputInclude - files matching <Expression>.
    • setInputInclude

      @Parameter public void setInputInclude(String inputInclude)
      Includes files matching <Expression>. Will override excluded files. Arguments should be Expression. (See Argument Types for clarification)
      Parameters:
      inputInclude - files matching <Expression>.
    • setIncludes

      @Deprecated @Parameter public void setIncludes(String[] include)
      Deprecated.
      Deprecated for removal since 0.17: Use <inputInclude> instead.
      Includes files matching <Expression>. Will override excluded files. Arguments should be Expression. (See Argument Types for clarification)
      Parameters:
      include - files matching <Expression>.
    • setInclude

      @Deprecated @Parameter public void setInclude(String include)
      Deprecated.
      Deprecated for removal since 0.17: Use <inputInclude> instead.
      Includes files matching <Expression>. Will override excluded files. Arguments should be Expression. (See Argument Types for clarification)
      Parameters:
      include - files matching <Expression>.
    • setInputIncludeFile

      @Parameter(property="rat.InputIncludeFile") 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.
    • setIncludesFile

      @Deprecated @Parameter(property="rat.IncludesFile") public void setIncludesFile(String includesFile)
      Deprecated.
      Deprecated for removal since 0.17: Use <inputIncludeFile> instead.
      Reads <Expression> entries from a file. Entries will be excluded from processing. Argument should be a File. (See Argument Types for clarification)
      Parameters:
      includesFile - <Expression> entries from a file.
    • setInputIncludeStds

      @Parameter public void setInputIncludeStds(String[] inputIncludeStd)
      Includes files defined in standard collections based on commonly occurring groups. Will override excluded files. Arguments should be StandardCollection. (See Argument Types for clarification)
      Parameters:
      inputIncludeStd - files defined in standard collections based on commonly occurring groups.
    • setInputIncludeStd

      @Parameter public void setInputIncludeStd(String inputIncludeStd)
      Includes files defined in standard collections based on commonly occurring groups. Will override excluded files. Arguments should be StandardCollection. (See Argument Types for clarification)
      Parameters:
      inputIncludeStd - files defined in standard collections based on commonly occurring groups.
    • setScanHiddenDirectories

      @Deprecated @Parameter(property="rat.ScanHiddenDirectories") public void setScanHiddenDirectories(boolean scanHiddenDirectories)
      Deprecated.
      Deprecated for removal since 0.17: Use <inputIncludeStd> with 'HIDDEN_DIR' argument instead.
      Scans hidden directories.
      Parameters:
      scanHiddenDirectories - the state
    • setInputExcludeParsedScms

      @Parameter public void setInputExcludeParsedScms(String[] inputExcludeParsedScm)
      Parse SCM based exclusion files to exclude specified files and directories. Arguments should be StandardCollection. (See Argument Types for clarification)
      Parameters:
      inputExcludeParsedScm - SCM based exclusion files to exclude specified files and directories.
    • setInputExcludeParsedScm

      @Parameter public void setInputExcludeParsedScm(String inputExcludeParsedScm)
      Parse SCM based exclusion files to exclude specified files and directories. Arguments should be StandardCollection. (See Argument Types for clarification)
      Parameters:
      inputExcludeParsedScm - SCM based exclusion files to exclude specified files and directories.
    • setOutputStyle

      @Parameter(property="rat.OutputStyle") 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.
    • setStylesheet

      @Deprecated @Parameter(property="rat.Stylesheet") public void setStylesheet(String stylesheet)
      Deprecated.
      Deprecated for removal since 0.17: Use <outputStyle> 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.
    • setXml

      @Deprecated @Parameter(property="rat.Xml") public void setXml(boolean xml)
      Deprecated.
      Deprecated for removal since 0.17: Use <outputStyle> with the 'xml' argument instead.
      forces XML output rather than the textual report.
      Parameters:
      xml - the state
    • setOutputLicenses

      @Parameter(property="rat.OutputLicenses", defaultValue="NONE") public void setOutputLicenses(String outputLicenses)
      List the defined licenses. Argument should be a LicenseFilter. (See Argument Types for clarification)
      Parameters:
      outputLicenses - the defined licenses.
    • setListLicenses

      @Deprecated @Parameter(property="rat.ListLicenses") public void setListLicenses(String listLicenses)
      Deprecated.
      Deprecated for removal since 0.17: Use <outputLicenses> instead.
      List the defined licenses. Argument should be a LicenseFilter. (See Argument Types for clarification)
      Parameters:
      listLicenses - the defined licenses.
    • setOutputFamilies

      @Parameter(property="rat.OutputFamilies", defaultValue="NONE") 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.
    • setListFamilies

      @Deprecated @Parameter(property="rat.ListFamilies") public void setListFamilies(String listFamilies)
      Deprecated.
      Deprecated for removal since 0.17: Use <outputFamilies> instead.
      List the defined license families. Argument should be a LicenseFilter. (See Argument Types for clarification)
      Parameters:
      listFamilies - the defined license families.
    • setDryRun

      @Parameter(property="rat.DryRun") public void setDryRun(boolean dryRun)
      If set do not update the files but generate the reports.
      Parameters:
      dryRun - the state
    • setOut

      @Deprecated @Parameter(property="rat.Out") public void setOut(String out)
      Deprecated.
      Deprecated for removal since 0.17: Use <outputFile> 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.
    • setOutputFile

      @Parameter(property="rat.OutputFile", defaultValue="${project.build.directory}/rat.txt") 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.
    • setOutputArchive

      @Parameter(property="rat.OutputArchive", defaultValue="NOTIFICATION") 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.
    • setOutputStandard

      @Parameter(property="rat.OutputStandard", defaultValue="ABSENCE") 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.
    • setHelpLicenses

      @Parameter(property="rat.HelpLicenses") public void setHelpLicenses(boolean helpLicenses)
      Print information about registered licenses.
      Parameters:
      helpLicenses - the state