Class AbstractRatMojo

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

public abstract class AbstractRatMojo extends BaseRatMojo
Abstract base class for Mojos, which are running Rat.
  • Field Details

    • skip

      @Parameter(property="rat.skip", defaultValue="false") protected boolean skip
      Will skip the plugin execution, e.g. for technical builds that do not take license compliance into account.
      Since:
      0.11
    • project

      @Parameter(defaultValue="${project}", required=true, readonly=true) protected org.apache.maven.project.MavenProject project
      Holds the maven-internal project to allow resolution of artifact properties during mojo runs.
  • Constructor Details

    • AbstractRatMojo

      protected AbstractRatMojo()
  • Method Details

    • setAddDefaultLicenses

      @Deprecated @Parameter(property="rat.addDefaultLicenses", name="addDefaultLicenses") public void setAddDefaultLicenses(boolean addDefaultLicenses)
      Deprecated.
      Deprecated for removal since 0.17: Use <configurationNoDefaults> instead (note the change of state).
      Whether to add the default list of licenses.
    • getProject

      protected org.apache.maven.project.MavenProject getProject()
      Returns:
      the Maven project.
    • getDefaultsBuilder

      protected Defaults.Builder getDefaultsBuilder()
    • getValues

      protected List<String> getValues(Arg arg)
      Reads values for the Arg.
      Parameters:
      arg - The Arg to get the values for.
      Returns:
      The list of values or an empty list.
    • removeKey

      protected void removeKey(Arg arg)
      Removes all values for an Arg.
      Parameters:
      arg - The arg to remove values for.
    • getConfiguration

      protected ReportConfiguration getConfiguration() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • logLicenses

      protected void logLicenses(Collection<ILicense> licenses)