rat:check

Run RAT to perform a violation check.

Mojo Attributes:

  • Requires a Maven 2.0 project to execute.
  • Automatically executes within the lifecycle phase: verify

Required Parameters

Name Type Description
basedir File The base directory, in which to search for files. Default value is ${basedir}.

Optional Parameters

Name Type Description
addDefaultLicenseMatchers boolean Whether to add the default list of license matchers. Default value is true.
excludeSubProjects boolean Whether to exclude subprojects. This is recommended, if you want a separate rat-maven-plugin report for each subproject. Default value is true.
excludes String[] Specifies files, which are excluded in the report. By default, no files are excluded.
includes String[] Specifies files, which are included in the report. By default, all files are included.
licenseMatchers HeaderMatcherSpecification[] The licenses we want to match on.
numUnapprovedLicenses int Maximum number of files with unapproved licenses. Default value is 0.
reportFile File Where to store the report. Default value is ${project.build.directory}/rat.txt.
useDefaultExcludes boolean Whether to use the default excludes when scanning for files. Default value is true.
useEclipseDefaultExcludes boolean Whether to use the Eclipse specific default excludes when scanning for files. Eclipse specific default excludes are given by the constant ECLIPSE_DEFAULT_EXCLUDES: The .classpath and .project files, the .settings directory, and so on. Default value is true.
useIdeaDefaultExcludes boolean Whether to use the IDEA specific default excludes when scanning for files. IDEA specific default excludes are given by the constant IDEA_DEFAULT_EXCLUDES: The *.iml, *.ipr and *.iws files. Default value is true.
useMavenDefaultExcludes boolean Whether to use the Maven specific default excludes when scanning for files. Maven specific default excludes are given by the constant MAVEN_DEFAULT_EXCLUDES: The target directory, the cobertura.ser file, and so on. Default value is true.

Parameter Details

addDefaultLicenseMatchers

Whether to add the default list of license matchers.

  • Type: boolean
  • Required: No
  • Expression: ${rat.addDefaultLicenseMatchers}
  • Default: true

basedir The base directory, in which to search for files.
  • Type: java.io.File
  • Required: Yes
  • Expression: ${rat.basedir}
  • Default: ${basedir}

excludeSubProjects Whether to exclude subprojects. This is recommended, if you want a separate rat-maven-plugin report for each subproject.
  • Type: boolean
  • Required: No
  • Expression: ${rat.excludeSubprojects}
  • Default: true

excludes Specifies files, which are excluded in the report. By default, no files are excluded.
  • Type: java.lang.String[]
  • Required: No

includes Specifies files, which are included in the report. By default, all files are included.
  • Type: java.lang.String[]
  • Required: No

licenseMatchers The licenses we want to match on.
  • Type: org.codehaus.mojo.rat.HeaderMatcherSpecification[]
  • Required: No

numUnapprovedLicenses Maximum number of files with unapproved licenses.
  • Type: int
  • Required: No
  • Expression: ${rat.numUnapprovedLicenses}
  • Default: 0

reportFile Where to store the report.
  • Type: java.io.File
  • Required: No
  • Expression: ${rat.outputFile}
  • Default: ${project.build.directory}/rat.txt

useDefaultExcludes Whether to use the default excludes when scanning for files.
  • Type: boolean
  • Required: No
  • Expression: ${rat.useDefaultExcludes}
  • Default: true

useEclipseDefaultExcludes Whether to use the Eclipse specific default excludes when scanning for files. Eclipse specific default excludes are given by the constant ECLIPSE_DEFAULT_EXCLUDES: The .classpath and .project files, the .settings directory, and so on.
  • Type: boolean
  • Required: No
  • Expression: ${rat.useEclipseDefaultExcludes}
  • Default: true

useIdeaDefaultExcludes Whether to use the IDEA specific default excludes when scanning for files. IDEA specific default excludes are given by the constant IDEA_DEFAULT_EXCLUDES: The *.iml, *.ipr and *.iws files.
  • Type: boolean
  • Required: No
  • Expression: ${rat.useIdeaDefaultExcludes}
  • Default: true

useMavenDefaultExcludes Whether to use the Maven specific default excludes when scanning for files. Maven specific default excludes are given by the constant MAVEN_DEFAULT_EXCLUDES: The target directory, the cobertura.ser file, and so on.
  • Type: boolean
  • Required: No
  • Expression: ${rat.useMavenDefaultExcludes}
  • Default: true