Package org.apache.rat.anttasks
Class Report
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.rat.anttasks.Report
- All Implemented Interfaces:
Cloneable
public class Report
extends org.apache.tools.ant.Task
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
Modifier and TypeClassDescriptionstatic class
Type for the addLicenseHeaders attribute.static class
Type for the addLicenseHeaders attribute. -
Field Summary
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add(org.apache.tools.ant.types.ResourceCollection rc)
Adds resources that will be checked.void
addAddApprovedLicense(String familyCategory)
void
void
addLicense(License lic)
void
addStylesheet(org.apache.tools.ant.types.Resource styleSheet)
Deprecated.void
addStyleSheet(org.apache.tools.ant.types.Resource styleSheet)
Adds a given style sheet to the report.void
execute()
Generates the report.void
setAddApprovedLicense(String familyCategory)
void
setAddDefaultDefinitions(File fileName)
void
setAddLicenseHeaders(Report.AddLicenseHeaders setting)
void
setCopyrightMessage(String copyrightMessage)
void
Deprecated.use #setStyleReportvoid
setInputFileFilter(FilenameFilter inputFileFilter)
void
setLicenses(File fileName)
void
setRemoveApprovedLicense(String familyCategory)
void
setRemoveApprovedLicense(String[] familyCategory)
void
setReportFile(File reportFile)
void
setStyleReport(boolean styleReport)
void
setUseDefaultLicenses(boolean useDefaultLicenses)
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()
-
-
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
-
setReportFile
-
addLicense
-
addFamily
-
addStylesheet
Deprecated.- Parameters:
styleSheet
-
-
addStyleSheet
public void addStyleSheet(org.apache.tools.ant.types.Resource styleSheet)Adds a given style sheet to the report.- Parameters:
styleSheet
- style sheet to use in this report.
-
setStyleReport
public void setStyleReport(boolean styleReport) -
setFormat
Deprecated.use #setStyleReport- Parameters:
style
-
-
setLicenses
-
setUseDefaultLicenses
public void setUseDefaultLicenses(boolean useDefaultLicenses)- Parameters:
useDefaultLicenses
- Whether to add the default list of license matchers.
-
setAddApprovedLicense
-
addAddApprovedLicense
-
setRemoveApprovedLicense
-
setRemoveApprovedLicense
-
setCopyrightMessage
-
setAddLicenseHeaders
-
setAddDefaultDefinitions
-
getConfiguration
-
execute
public void execute()Generates the report.- Overrides:
execute
in classorg.apache.tools.ant.Task
-
addStyleSheet(Resource)