Package org.apache.rat.mp
Class RatCheckMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.rat.plugin.BaseRatMojo
org.apache.rat.mp.AbstractRatMojo
org.apache.rat.mp.RatCheckMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="check",
defaultPhase=VALIDATE,
threadSafe=true)
public class RatCheckMojo
extends AbstractRatMojo
Run Rat to perform a violation check.
This documentation mentions data types for some of the arguments. An explanation of the data types is included in this documentation package.
-
Field Summary
Fields inherited from class org.apache.rat.mp.AbstractRatMojo
project, skip
Fields inherited from class org.apache.rat.plugin.BaseRatMojo
args
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
check
(ReportConfiguration config) void
execute()
Invoked by Maven to execute the Mojo.protected ReportConfiguration
Reads the location of the RAT text file from the Mojo.void
setAddLicenseHeaders
(String addLicenseHeaders) Deprecated.Use <editLicense> and <editOverwrite>.void
setCopyrightMessage
(String copyrightMessage) Deprecated.Deprecated for removal since 0.17: Use <editCopyright> instead.void
setReportFile
(File reportFile) Deprecated.Use 'out' property instead.void
setReportStyle
(String value) Deprecated.Use setStyleSheet or xml instead.Methods inherited from class org.apache.rat.mp.AbstractRatMojo
getDefaultsBuilder, getProject, getValues, logLicenses, removeKey, setAddDefaultLicenses
Methods inherited from class org.apache.rat.plugin.BaseRatMojo
addArg, addArg, args, createName, getArg, removeArg, setAddLicense, setArg, setConfig, setConfigs, setConfigurationNoDefaults, setCopyright, setCounterMax, setCounterMaxs, setCounterMin, setCounterMins, setDryRun, setEditCopyright, setEditLicense, setEditOverwrite, setExclude, setExcludeFile, setExcludes, setForce, setHelpLicenses, setInclude, setIncludes, setIncludesFile, setInputExclude, setInputExcludeFile, setInputExcludeParsedScm, setInputExcludeParsedScms, setInputExcludes, setInputExcludeSize, setInputExcludeStd, setInputExcludeStds, setInputInclude, setInputIncludeFile, setInputIncludes, setInputIncludeStd, setInputIncludeStds, setInputSource, setInputSources, setLicenseFamiliesApproved, setLicenseFamiliesApproved, setLicenseFamiliesApprovedFile, setLicenseFamiliesDenied, setLicenseFamiliesDenied, setLicenseFamiliesDeniedFile, setLicenses, setLicenses, setLicensesApproved, setLicensesApproved, setLicensesApprovedFile, setLicensesDenied, setLicensesDenied, setLicensesDeniedFile, setListFamilies, setListLicenses, setNoDefaultLicenses, setOut, setOutputArchive, setOutputFamilies, setOutputFile, setOutputLicenses, setOutputStandard, setOutputStyle, setScanHiddenDirectories, setStylesheet, setXml, toKebabForm, unsupportedArgs
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
RatCheckMojo
public RatCheckMojo()
-
-
Method Details
-
setReportFile
Deprecated.Use 'out' property instead.Where to store the report. -
setReportStyle
Deprecated.Use setStyleSheet or xml instead.Output style of the report. Use "plain" (the default) for a plain text report or "xml" for the raw XML report. Alternatively you can give the path of an XSL transformation that will be applied on the raw XML to produce the report written to the output file. -
setAddLicenseHeaders
@Deprecated @Parameter(property="rat.addLicenseHeaders") public void setAddLicenseHeaders(String addLicenseHeaders) Deprecated.Use <editLicense> and <editOverwrite>.Whether to add license headers; possible values areforced
,true
, andfalse
(default). -
setCopyrightMessage
@Deprecated @Parameter(property="rat.copyrightMessage") public void setCopyrightMessage(String copyrightMessage) Deprecated.Deprecated for removal since 0.17: Use <editCopyright> instead.Copyright message to add to license headers. -
getConfiguration
protected ReportConfiguration getConfiguration() throws org.apache.maven.plugin.MojoExecutionException- Overrides:
getConfiguration
in classAbstractRatMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionInvoked by Maven to execute the Mojo.- Throws:
org.apache.maven.plugin.MojoFailureException
- if an error in the plugin configuration was detected.org.apache.maven.plugin.MojoExecutionException
- if another error occurred while executing the plugin.
-
check
protected void check(ReportConfiguration config) throws org.apache.maven.plugin.MojoFailureException - Throws:
org.apache.maven.plugin.MojoFailureException
-
getRatTxtFile
Reads the location of the RAT text file from the Mojo.- Returns:
- Value of the "reportFile" property.
- Throws:
org.apache.maven.plugin.MojoFailureException
- If no output file was specified.
-