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 arguments.
-
Field Summary
Fields inherited from class org.apache.rat.mp.AbstractRatMojo
project, skipFields inherited from class org.apache.rat.plugin.BaseRatMojo
argsFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheck(ReportConfiguration config)voidexecute()Invoked by Maven to execute the Mojo.protected ReportConfigurationReads the location of the RAT text file from the Mojo.voidsetAddLicenseHeaders(String addLicenseHeaders)Deprecated.Use <editLicense> and <editOverwrite>.voidsetCopyrightMessage(String copyrightMessage)Deprecated.Deprecated for removal since 0.17: Use <editCopyright> instead.voidsetReportFile(File reportFile)Deprecated.Use 'out' property instead.voidsetReportStyle(String value)Deprecated.Use setStyleSheet or xml instead.Methods inherited from class org.apache.rat.mp.AbstractRatMojo
getDefaultsBuilder, getProject, getValues, logLicenses, removeKey, setAddDefaultLicensesMethods 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, setLicenseFamiliesApprovedFile, setLicenseFamiliesDenied, setLicenseFamiliesDeniedFile, setLicenses, setLicenses, setLicensesApproved, setLicensesApprovedFile, setLicensesDenied, setLicensesDeniedFile, setListFamilies, setListLicenses, setNoDefaultLicenses, setOut, setOutputArchive, setOutputFamilies, setOutputFile, setOutputLicenses, setOutputStandard, setOutputStyle, setScanHiddenDirectories, setStylesheet, setXml, toKebabForm, unsupportedArgsMethods 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:
getConfigurationin 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.
-