Package org.apache.rat.anttasks
Class Report
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.rat.anttasks.BaseAntTask
org.apache.rat.anttasks.Report
- All Implemented Interfaces:
Cloneable
A basic Ant task that generates a report on all files specified by the nested
resource collection(s).
IHeaderMatcher(s) can be specified as nested elements as well.
The attribute format
defines the output format and can take the
values
- xml - Rat's native XML output.
- styled - transforms the XML output using the given stylesheet. The stylesheet attribute must be set as well if this attribute is used.
- plain - plain text using Rat's built-in stylesheet. This is the default.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Deprecated.No longer required, use stylesheet or xml attributes.static class
Deprecated.use listLicenses or listFamilies attributes.Nested classes/interfaces inherited from class org.apache.rat.anttasks.BaseAntTask
BaseAntTask.Child, BaseAntTask.Config, BaseAntTask.CounterMax, BaseAntTask.CounterMin, BaseAntTask.Exclude, BaseAntTask.ExcludeFile, BaseAntTask.Include, BaseAntTask.IncludesFile, BaseAntTask.InputExclude, BaseAntTask.InputExcludeFile, BaseAntTask.InputExcludeParsedScm, BaseAntTask.InputExcludeSize, BaseAntTask.InputExcludeStd, BaseAntTask.InputInclude, BaseAntTask.InputIncludeFile, BaseAntTask.InputIncludeStd, BaseAntTask.InputSource, BaseAntTask.LicenseFamiliesApproved, BaseAntTask.LicenseFamiliesApprovedFile, BaseAntTask.LicenseFamiliesDenied, BaseAntTask.LicenseFamiliesDeniedFile, BaseAntTask.Licenses, BaseAntTask.LicensesApproved, BaseAntTask.LicensesApprovedFile, BaseAntTask.LicensesDenied, BaseAntTask.LicensesDeniedFile, BaseAntTask.Out, BaseAntTask.OutputFile
-
Field Summary
Fields inherited from class org.apache.rat.anttasks.BaseAntTask
args
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(org.apache.tools.ant.types.ResourceCollection rc) Adds resources that will be checked.void
addAddApprovedLicense
(String familyCategory) Adds a family category to the list of approved licenses.void
Add an inline license family definition to the system.void
addLicense
(License license) Adds an inline License definition to the system.void
addRemoveApprovedLicense
(String familyCategory) Removes a family category to the list of approved licenses.void
addRemoveApprovedLicense
(String[] familyCategory) Removes a family category to the list of approved licenses.void
addStylesheet
(org.apache.tools.ant.types.Resource styleSheet) Deprecated.void
addStyleSheet
(org.apache.tools.ant.types.Resource styleSheet) Deprecated.void
execute()
Generates the report.Creates the ReportConfiguration from the ant options.Reads values for the Arg.protected void
Removes the values for the arg.void
setAddApprovedLicense
(String familyCategory) Deprecated.use addApprovedLicense child element.void
setAddDefaultDefinitions
(File fileName) Deprecated.void
Deprecated.use addLicense and force attributesvoid
setCopyrightMessage
(String copyrightMessage) Deprecated.use copyright attributevoid
Deprecated.void
setInputFileFilter
(org.apache.commons.io.filefilter.IOFileFilter inputFileFilter) Deprecated.void
setLicenses
(File fileName) Deprecated.use licenses child element.void
setRemoveApprovedLicense
(String familyCategory) Deprecated.use removeApprovedLicense child elementvoid
setRemoveApprovedLicense
(String[] familyCategory) Deprecated.use removeApprovedLicense elementvoid
setReportFile
(File reportFile) Deprecated.void
setStyleReport
(boolean styleReport) Deprecated.void
setUseDefaultLicenses
(boolean useDefaultLicenses) Deprecated.use noDefaultLicenses attributeprotected ReportConfiguration
validates the task's configuration.Methods inherited from class org.apache.rat.anttasks.BaseAntTask
addArg, addArg, args, createConfig, createCounterMax, createCounterMin, createExclude, createExcludeFile, createInclude, createIncludesFile, createInputExclude, createInputExcludeFile, createInputExcludeParsedScm, createInputExcludeSize, createInputExcludeStd, createInputInclude, createInputIncludeFile, createInputIncludeStd, createInputSource, createLicenseFamiliesApproved, createLicenseFamiliesApprovedFile, createLicenseFamiliesDenied, createLicenseFamiliesDeniedFile, createLicenses, createLicensesApproved, createLicensesApprovedFile, createLicensesDenied, createLicensesDeniedFile, createName, createOut, createOutputFile, getArg, removeArg, setAddLicense, setArg, setConfigurationNoDefaults, setCopyright, setDryRun, setEditCopyright, setEditLicense, setEditOverwrite, setExcludeFile, setForce, setHelpLicenses, setIncludesFile, setInputExcludeFile, setInputExcludeSize, setInputIncludeFile, setLicenseFamiliesApprovedFile, setLicenseFamiliesDeniedFile, setLicensesApprovedFile, setLicensesDeniedFile, setListFamilies, setListLicenses, setNoDefaultLicenses, setOut, setOutputArchive, setOutputFamilies, setOutputFile, setOutputLicenses, setOutputStandard, setOutputStyle, setScanHiddenDirectories, setStylesheet, setXml, unsupportedArgs
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Constructor Details
-
Report
public Report()Constructor.
-
-
Method Details
-
add
public void add(org.apache.tools.ant.types.ResourceCollection rc) Adds resources that will be checked.- Parameters:
rc
- resource to check.
-
setInputFileFilter
@Deprecated public void setInputFileFilter(org.apache.commons.io.filefilter.IOFileFilter inputFileFilter) Deprecated.Adds an input file filter.- Parameters:
inputFileFilter
- The input file filter to add.
-
setReportFile
Deprecated.Sets the report file.- Parameters:
reportFile
- the report file.
-
addLicense
Adds an inline License definition to the system.- Parameters:
license
- the license to add.
-
addFamily
Add an inline license family definition to the system.- Parameters:
family
- the license family to add.
-
addStylesheet
Deprecated.Adds a style sheet to the system.- Parameters:
styleSheet
-
-
addStyleSheet
Deprecated.Adds a given style sheet to the report.- Parameters:
styleSheet
- style sheet to use in this report.
-
setStyleReport
Deprecated.useBaseAntTask.setXml(boolean)
. Note reversal of boolean valueSets a stylesheet for the report.- Parameters:
styleReport
-
-
setFormat
Deprecated.Determines if the output should be styled.- Parameters:
style
-
-
setLicenses
Deprecated.use licenses child element.Adds as a file containing the definitions of licenses to the system.- Parameters:
fileName
- the file to add.
-
setUseDefaultLicenses
Deprecated.use noDefaultLicenses attributeSpecifies whether to add the default list of license matchers.- Parameters:
useDefaultLicenses
- iftrue
use the default licenses.
-
setAddApprovedLicense
Deprecated.use addApprovedLicense child element.Adds a family category to the list of approved licenses.- Parameters:
familyCategory
- the category to add.
-
addAddApprovedLicense
Adds a family category to the list of approved licenses.- Parameters:
familyCategory
- the category to add
-
setRemoveApprovedLicense
Deprecated.use removeApprovedLicense child elementRemoves a family category to the list of approved licenses.- Parameters:
familyCategory
- the category to add.
-
addRemoveApprovedLicense
Removes a family category to the list of approved licenses.- Parameters:
familyCategory
- the category to add.
-
setRemoveApprovedLicense
Deprecated.use removeApprovedLicense elementRemoves a family category to the list of approved licenses.- Parameters:
familyCategory
- the category to add.
-
addRemoveApprovedLicense
Removes a family category to the list of approved licenses.- Parameters:
familyCategory
- the category to add.
-
setCopyrightMessage
Deprecated.use copyright attributeSets the copyright message- Parameters:
copyrightMessage
- the copyright message
-
setAddLicenseHeaders
Deprecated.use addLicense and force attributesDetermines if license headers should be added.- Parameters:
setting
- the setting.
-
setAddDefaultDefinitions
Deprecated.Adds definition information- Parameters:
fileName
- the file to add
-
getValues
Reads values for the Arg.- Parameters:
arg
- The Arg to get the values for.- Returns:
- The list of values or an empty list.
-
removeKey
Removes the values for the arg.- Parameters:
arg
- the arg to remove the values for.
-
getConfiguration
Creates the ReportConfiguration from the ant options.- Returns:
- the ReportConfiguration.
-
execute
public void execute()Generates the report.- Overrides:
execute
in classorg.apache.tools.ant.Task
-
validate
validates the task's configuration.
-