@Mojo(name="check",
defaultPhase=VALIDATE)
public class RatCheckMojo
extends AbstractRatMojo
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
addLicenseHeaders
Whether to add license headers; possible values are
forced, true, and false (default). |
private boolean |
consoleOutput
Whether to output the names of files that have unapproved licenses to the
console.
|
private java.lang.String |
copyrightMessage
Copyright message to add to license headers.
|
private boolean |
ignoreErrors
Will ignore rat errors and display a log message if any.
|
private int |
numUnapprovedLicenses
Maximum number of files with unapproved licenses.
|
private java.io.File |
reportFile
Where to store the report.
|
private java.lang.String |
reportStyle
Output style of the report.
|
skip| Constructor and Description |
|---|
RatCheckMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
check(ClaimStatistic statistics) |
void |
execute()
Invoked by Maven to execute the Mojo.
|
protected ReportConfiguration |
getConfiguration() |
private ClaimStatistic |
getRawReport() |
private java.io.InputStream |
getStyleSheet()
Returns the XSL stylesheet to be used for formatting the report.
|
createReport, createReport, getProject, getResources@Parameter(property="rat.outputFile",
defaultValue="${project.build.directory}/rat.txt")
private java.io.File reportFile
@Parameter(property="rat.outputStyle",
defaultValue="plain")
private java.lang.String reportStyle
@Parameter(property="rat.numUnapprovedLicenses",
defaultValue="0")
private int numUnapprovedLicenses
@Parameter(property="rat.addLicenseHeaders",
defaultValue="false")
private java.lang.String addLicenseHeaders
forced, true, and false (default).@Parameter(property="rat.copyrightMessage") private java.lang.String copyrightMessage
addLicenseHeaders is set to true,
or forced.@Parameter(property="rat.ignoreErrors",
defaultValue="false")
private boolean ignoreErrors
@Parameter(property="rat.consoleOutput",
defaultValue="false")
private boolean consoleOutput
private ClaimStatistic getRawReport() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprivate java.io.InputStream getStyleSheet()
throws org.apache.maven.plugin.MojoExecutionException
null for raw XMLorg.apache.maven.plugin.MojoExecutionException - if the stylesheet can not be foundreportStylepublic void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException - An error in the plugin configuration was detected.org.apache.maven.plugin.MojoExecutionException - Another error occurred while executing the plugin.protected void check(ClaimStatistic statistics) throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureExceptionprotected ReportConfiguration getConfiguration() throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
getConfiguration in class AbstractRatMojoorg.apache.maven.plugin.MojoFailureExceptionorg.apache.maven.plugin.MojoExecutionException