blob: 67c8055117c7c4c0c33e8af9d4e2ed0ae5a827d3 [file] [log] [blame]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 2.0.0 from src/site/apt/examples/report.apt at 2025-09-21
| Rendered using Apache Maven Fluido Skin 2.1.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="generator" content="Apache Maven Doxia Site Renderer 2.0.0" />
<title>Report Task – Apache RAT\u2122 Task Library for Apache Ant</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-2.1.0.min.css" />
<link rel="stylesheet" href="../css/site.css" />
<link rel="stylesheet" href="../css/print.css" media="print" />
<script src="../js/apache-maven-fluido-2.1.0.min.js"></script>
<link href="https://creadur.apache.org/font/matesc.css" type="text/css" rel="stylesheet" />
</head>
<body>
<a class="github-fork-ribbon right-top" href="https://github.com/apache/creadur-rat" data-ribbon="Fork me on GitHub">Fork me on GitHub</a>
<div class="container-fluid container-fluid-top">
<header>
<div id="banner">
<div class="pull-left"><div id="bannerLeft"><h1><a href="https://www.apache.org/"><img src="https://www.apache.org/img/asf_logo.png" alt="The Apache Software Foundation" /> Apache RAT</a></h1></div></div>
<div class="pull-right"></div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2025-09-21<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 0.17-SNAPSHOT<span class="divider">|</span></li>
<li><a href="https://www.apache.org/">Apache</a><span class="divider">/</span></li>
<li><a href="../../../">Creadur</a><span class="divider">/</span></li>
<li><a href="../../">RAT</a><span class="divider">/</span></li>
<li><a href="../index.html">Apache RAT\u2122 Task Library for Apache Ant</a><span class="divider">/</span></li>
<li class="active">Report Task</li>
</ul>
</div>
</header>
<div class="row-fluid">
<header id="leftColumn" class="span2">
<nav class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">Parent Project</li>
<li><a href="../../index.html">Apache Creadur RAT</a></li>
<li class="nav-header">Overview</li>
<li><a href="../index.html">Introduction</a></li>
<li><a href="../report.html">Report Task</a></li>
<li class="nav-header">Examples</li>
<li><a href="../examples/basic.html">Basic Usage</a></li>
<li class="nav-header">Project Documentation</li>
<li><a href="../project-info.html"><span class="icon-chevron-right"></span>Project Information</a></li>
<li><a href="../project-reports.html"><span class="icon-chevron-right"></span>Project Reports</a></li>
<li class="nav-header">Apache RAT™</li>
<li><a href="../../index.html">Introducing RAT</a></li>
<li><a href="../../download_rat.cgi">Downloads</a></li>
<li><a href="../../changes.html">Changes</a></li>
<li class="nav-header">RAT from the Command Line</li>
<li><a href="../../apache-rat/index.html">Command Line Introduction</a></li>
<li><a href="../../apache-rat/cli_options.html">Command Line Options</a></li>
<li><a href="../../apache-rat/env_vars.html">Environment Variables</a></li>
<li><a href="../../apache-rat-core/exclusion_expression.html">Exclusion Expressions</a></li>
<li><a href="../../apache-rat/standard_collections.html">Standard Collections</a></li>
<li class="nav-header">RAT from Ant</li>
<li><a href="../../apache-rat-tasks/index.html">Ant Task Introduction</a></li>
<li><a href="../../apache-rat-tasks/ant_options.html">Ant Elements and Attributes</a></li>
<li class="nav-header">RAT from Maven</li>
<li><a href="../../apache-rat-plugin/index.html">Maven Plugin Introduction</a></li>
<li><a href="../../apache-rat-plugin/mvn_options.html">Maven Options</a></li>
<li><a href="../../apache-rat-plugin/examples/index.html">Maven Examples</a></li>
<li class="nav-header">Configuring RAT</li>
<li><a href="../../apache-rat/name_xref.html">Option Name Cross Reference</a></li>
<li><a href="../../apache-rat/default_licenses.html">Default Licenses</a></li>
<li><a href="../../apache-rat/default_matchers.html">Default Matchers</a></li>
<li><a href="../../license_def.html">Defining New Licenses</a></li>
<li><a href="../../apache-rat/xsd.html">Configuration XSD</a></li>
<li><a href="https://gitbox.apache.org/repos/asf/creadur-rat/blob/master/apache-rat-core/src/main/resources/org/apache/rat/default.xml">Default Configuration</a></li>
<li><a href="../../apache-rat/detecting_generated_files.html">Detecting Generated Files</a></li>
<li class="nav-header">RAT Output</li>
<li><a href="../../apache-rat/output/example.html">Standard Output Example</a></li>
<li><a href="https://gitbox.apache.org/repos/asf/creadur-rat/blob/master/apache-rat-core/src/main/resources/org/apache/rat/rat-report.xsd">Output XSD</a></li>
<li><a href="https://gitbox.apache.org/repos/asf/creadur-rat/blob/master/apache-rat-core/src/main/resources/org/apache/rat/plain-rat.xsl">XSLT - Plain text</a></li>
<li><a href="https://gitbox.apache.org/repos/asf/creadur-rat/blob/master/apache-rat-core/src/main/resources/org/apache/rat/missing-headers.xsl">XSLT - Missing headers list</a></li>
<li><a href="https://gitbox.apache.org/repos/asf/creadur-rat/blob/master/apache-rat-core/src/main/resources/org/apache/rat/unapproved-licenses.xsl">XSLT - Unapproved licenses list</a></li>
<li class="nav-header">Developing RAT</li>
<li><a href="../../architecture.html">Architecture</a></li>
<li><a href="../../apidocs/index.html">Javadocs</a></li>
<li><a href="../../apache-rat-core/development/document_name.html">Document Name concept</a></li>
<li><a href="../../development/ui_implementation.html">UI Development</a></li>
<li><a href="../../apache-rat-core/development/write_file_processor.html">Writing a File Processor</a></li>
<li class="nav-header">Apache Creadur™</li>
<li><a href="../../..">Creadur Project Home</a></li>
<li><a href="../../../tentacles">Apache Tentacles</a></li>
<li><a href="../../../whisker">Apache Whisker</a></li>
<li><a href="https://www.apache.org/security/">Security</a></li>
<li><a href="https://www.apache.org/licenses/">License</a></li>
<li><a href="https://privacy.apache.org/policies/privacy-policy-public.html">Privacy</a></li>
<li><a href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
<li><a href="https://www.apache.org/foundation/thanks.html">Thanks</a></li>
<li class="nav-header">The Apache Software Foundation</li>
<li><a href="https://www.apache.org/foundation">About the Foundation</a></li>
<li><a href="https://projects.apache.org">The projects</a></li>
<li><a href="https://people.apache.org">The people</a></li>
<li><a href="https://www.apache.org/foundation/how-it-works.html">How we work</a></li>
<li><a href="https://www.apache.org/foundation/how-it-works.html#history">Our history</a></li>
<li><a href="https://blogs.apache.org/foundation/">News</a></li>
<li class="nav-header">Contribute</li>
<li><a href="https://www.apache.org/foundation/getinvolved.html">Get Involved</a></li>
<li class="nav-header">Committer Info</li>
<li><a href="https://www.apache.org/dev/committers.html">ASF Committers&apos; FAQ</a></li>
<li><a href="https://www.apache.org/dev/new-committers-guide.html">New Committers Guide</a></li>
<li><a href="https://gitbox.apache.org/repos/asf/creadur-site/blob/asf-site/README.md">How to publish this site</a></li>
<li><a href="https://community.apache.org/">Community</a></li>
<li><a href="https://www.apache.org/legal/">Legal</a></li>
<li><a href="https://www.apache.org/foundation/marks/">Branding</a></li>
<li><a href="https://www.apache.org/press/">Media Relations</a></li>
</ul>
</nav>
<div class="well sidebar-nav">
<div id="poweredBy">
<div class="clear"></div>
<div class="clear"></div>
<a href="https://maven.apache.org/" class="builtBy"><img class="builtBy" src="https://maven.apache.org/images/logos/maven-feather.png" /> Maven</a>
</div>
</div>
</header>
<main id="bodyColumn" class="span10">
<section><a id="Report_Task"></a>
<h1>Report Task</h1>
<p>The Report task is the heart of the Apache RAT Ant Task Library, it runs RAT on a given set of resources and generates the report.</p>
<p>The task can work on any Ant <a class="externalLink" href="https://ant.apache.org/manual/Types/resources.html">resource or resource collection</a> and the usual Ant selectors can be applied to restrict things even further.</p>
<p>Reports can use Rat's internal XML or plain text format or be styled by a custom XSLT stylesheet.</p>
<p>It is possible to define custom matchers for licenses not directly supported by RAT via nested elements to the Report task.</p><section><a id="Report_Task_Attributes"></a>
<h2>Report Task Attributes</h2>
<p>This section lists the attributes for the report task. The attribute value types are listed in a table at the bottom of this page.</p><section><a id="Current"></a>
<h3>Current</h3>
<table class="table table-bordered table-striped">
<tr class="a">
<td style="text-align: left;">Name</td>
<td style="text-align: left;">Description</td>
<td style="text-align: left;">Value Type</td>
<td style="text-align: left;">Required</td></tr>
<tr class="b">
<td style="text-align: left;">editCopyright</td>
<td style="text-align: left;">The copyright message to use in the license headers. Usually in the form of &quot;Copyright 2008 Foo&quot;. Only valid with editLicense attribute</td>
<td style="text-align: left;">String</td>
<td style="text-align: left;">false</td></tr>
<tr class="a">
<td style="text-align: left;">editOverwrite</td>
<td style="text-align: left;">Forces any changes in files to be written directly to the source files (i.e. new files are not created). Only valid with editLicense attribute</td>
<td style="text-align: left;">boolean</td>
<td style="text-align: left;">false</td></tr>
<tr class="b">
<td style="text-align: left;">editLicense</td>
<td style="text-align: left;">Add the default license header to any file with an unknown license that is not in the exclusion list. By default new files will be created with the license header, to force the modification of existing files use the editOverwrite attribute option.</td>
<td style="text-align: left;">boolean</td>
<td style="text-align: left;">false</td></tr>
<tr class="a">
<td style="text-align: left;">configurationNoDefaults</td>
<td style="text-align: left;">Ignore default configuration.</td>
<td style="text-align: left;">boolean</td>
<td style="text-align: left;">false</td></tr>
<tr class="b">
<td style="text-align: left;">licensesApprovedFile</td>
<td style="text-align: left;">Name of file containing the approved license IDs.</td>
<td style="text-align: left;">File</td>
<td style="text-align: left;">false</td></tr>
<tr class="a">
<td style="text-align: left;">licenseFamiliesApprovedFile</td>
<td style="text-align: left;">Name of file containing the approved family IDs.</td>
<td style="text-align: left;">File</td>
<td style="text-align: left;">false</td></tr>
<tr class="b">
<td style="text-align: left;">licensesDeniedFile</td>
<td style="text-align: left;">Name of File containing the approved license IDs.</td>
<td style="text-align: left;">File</td>
<td style="text-align: left;">false</td></tr>
<tr class="a">
<td style="text-align: left;">licenseFamiliesDeniedFile</td>
<td style="text-align: left;">Name of file containing the denied license IDs.</td>
<td style="text-align: left;">File</td>
<td style="text-align: left;">false</td></tr>
<tr class="b">
<td style="text-align: left;">inputExcludeFile</td>
<td style="text-align: left;">Excludes files matching regular expression in the input file.</td>
<td style="text-align: left;">File</td>
<td style="text-align: left;">false</td></tr>
<tr class="a">
<td style="text-align: left;">scanHiddenDirectories</td>
<td style="text-align: left;">Scans hidden directories.</td>
<td style="text-align: left;">boolean</td>
<td style="text-align: left;">false</td></tr>
<tr class="b">
<td style="text-align: left;">outputStyle</td>
<td style="text-align: left;">XSLT stylesheet to use when creating the report. Either an external xsl file may be specified or one of the internal named sheets.</td>
<td style="text-align: left;">StyleSheet</td>
<td style="text-align: left;">false</td></tr>
<tr class="a">
<td style="text-align: left;">outputLicenses</td>
<td style="text-align: left;">List the defined licenses.</td>
<td style="text-align: left;">LicenseFilter</td>
<td style="text-align: left;">false</td></tr>
<tr class="b">
<td style="text-align: left;">outputFamilies</td>
<td style="text-align: left;">List the defined license families.</td>
<td style="text-align: left;">LicenseFilter</td>
<td style="text-align: left;">false</td></tr>
<tr class="a">
<td style="text-align: left;">dryRun</td>
<td style="text-align: left;">If set do not update the files but generate the reports.</td>
<td style="text-align: left;">boolean</td>
<td style="text-align: left;">false</td></tr>
<tr class="b">
<td style="text-align: left;">outputFile</td>
<td style="text-align: left;">Define the output file where to write a report to.</td>
<td style="text-align: left;">File</td>
<td style="text-align: left;">false</td></tr>
<tr class="a">
<td style="text-align: left;">outputArchive</td>
<td style="text-align: left;">Specifies the level of detail in ARCHIVE file reporting.</td>
<td style="text-align: left;">ProcessingType</td>
<td style="text-align: left;">false</td></tr>
<tr class="b">
<td style="text-align: left;">outputStandard</td>
<td style="text-align: left;">Specifies the level of detail in STANDARD file reporting.</td>
<td style="text-align: left;">ProcessingType</td>
<td style="text-align: left;">false</td></tr>
<tr class="a">
<td style="text-align: left;">helpLicenses</td>
<td style="text-align: left;">Print information about registered licenses.</td>
<td style="text-align: left;">boolean</td>
<td style="text-align: left;">false</td></tr></table></section><section><a id="Deprecated"></a>
<h3>Deprecated </h3>
<table class="table table-bordered table-striped">
<tr class="a">
<td style="text-align: left;">Name</td>
<td style="text-align: left;">Description</td>
<td style="text-align: left;">Argument Type</td>
<td style="text-align: left;">Deprecated</td></tr>
<tr class="b">
<td style="text-align: left;">copyright</td>
<td style="text-align: left;">The copyright message to use in the license headers.</td>
<td style="text-align: left;">String</td>
<td style="text-align: left;">Deprecated for removal since 0.17: Use editCopyright attribute instead.</td></tr>
<tr class="a">
<td style="text-align: left;">force</td>
<td style="text-align: left;">Forces any changes in files to be written directly to the source files (i.e. new files are not created).</td>
<td style="text-align: left;">boolean</td>
<td style="text-align: left;">Deprecated for removal since 0.17: Use editOverwrite attribute instead.</td></tr>
<tr class="b">
<td style="text-align: left;">addLicense</td>
<td style="text-align: left;">Add the default license header to any file with an unknown license that is not in the exclusion list.</td>
<td style="text-align: left;">boolean</td>
<td style="text-align: left;">Deprecated for removal since 0.17: Use editLicense attribute instead.</td></tr>
<tr class="a">
<td style="text-align: left;">noDefaultLicenses</td>
<td style="text-align: left;">Ignore default configuration.</td>
<td style="text-align: left;">boolean</td>
<td style="text-align: left;">Deprecated for removal since 0.17: Use configurationNoDefaults attribute instead.</td></tr>
<tr class="b">
<td style="text-align: left;">excludeFile</td>
<td style="text-align: left;">Excludes files matching regular expression in the input file.</td>
<td style="text-align: left;">File</td>
<td style="text-align: left;">Deprecated for removal since 0.17: Use inputExcludeFile attribute instead.</td></tr>
<tr class="a">
<td style="text-align: left;">stylesheet</td>
<td style="text-align: left;">XSLT stylesheet to use when creating the report.</td>
<td style="text-align: left;">StyleSheet</td>
<td style="text-align: left;">Deprecated for removal since 0.17: Use outputStyle attribute instead.</td></tr>
<tr class="b">
<td style="text-align: left;">xml</td>
<td style="text-align: left;">forces XML output rather than the report.</td>
<td style="text-align: left;">boolean</td>
<td style="text-align: left;">Deprecated for removal since 0.17: Use outputStyle attribute with the 'xml' argument instead.</td></tr>
<tr class="a">
<td style="text-align: left;">listLicenses</td>
<td style="text-align: left;">List the defined licenses.</td>
<td style="text-align: left;">LicenseFilter</td>
<td style="text-align: left;">Deprecated for removal since 0.17: Use outputLicenses attribute instead.</td></tr>
<tr class="b">
<td style="text-align: left;">listFamilies</td>
<td style="text-align: left;">List the defined license families.</td>
<td style="text-align: left;">LicenseFilter</td>
<td style="text-align: left;">Deprecated for removal since 0.17: Use outputFamilies attribute instead.</td></tr>
<tr class="a">
<td style="text-align: left;">out</td>
<td style="text-align: left;">Define the output file where to write a report to.</td>
<td style="text-align: left;">File</td>
<td style="text-align: left;">Deprecated for removal since 0.17: Use outputFile attribute instead.</td></tr></table></section></section><section><a id="Report_Task_Nested_Elements"></a>
<h2>Report Task Nested Elements</h2>
<p>This section lists the child elements for the report task. The element value types are listed in a table at the bottom of this page.</p><section><a id="Current_1"></a>
<h3>Current</h3>
<table class="table table-bordered table-striped">
<tr class="a">
<td style="text-align: left;">Name</td>
<td style="text-align: left;">Description</td>
<td style="text-align: left;">Value Type</td>
<td style="text-align: left;">Required</td></tr>
<tr class="b">
<td style="text-align: left;">config</td>
<td style="text-align: left;">File names for system configuration.</td>
<td style="text-align: left;">File</td>
<td style="text-align: left;">false</td></tr>
<tr class="a">
<td style="text-align: left;">licensesApproved</td>
<td style="text-align: left;">The approved License IDs. These licenses will be added to the list of approved licenses.</td>
<td style="text-align: left;">LicenseID</td>
<td style="text-align: left;">false</td></tr>
<tr class="b">
<td style="text-align: left;">licensesApprovedFile</td>
<td style="text-align: left;">Name of file containing the approved license IDs.</td>
<td style="text-align: left;">File</td>
<td style="text-align: left;">false</td></tr>
<tr class="a">
<td style="text-align: left;">licenseFamiliesApproved</td>
<td style="text-align: left;">The approved License Family IDs. These licenses families will be added to the list of approved licenses families.</td>
<td style="text-align: left;">FamilyID</td>
<td style="text-align: left;">false</td></tr>
<tr class="b">
<td style="text-align: left;">licenseFamiliesApprovedFile</td>
<td style="text-align: left;">Name of file containing the approved family IDs.</td>
<td style="text-align: left;">File</td>
<td style="text-align: left;">false</td></tr>
<tr class="a">
<td style="text-align: left;">licensesDenied</td>
<td style="text-align: left;">The denied License IDs. These licenses will be removed to the list of approved licenses. Once licenses are removed they can not be added back.</td>
<td style="text-align: left;">LicenseID</td>
<td style="text-align: left;">false</td></tr>
<tr class="b">
<td style="text-align: left;">licensesDeniedFile</td>
<td style="text-align: left;">Name of file containing the approved license IDs.</td>
<td style="text-align: left;">File</td>
<td style="text-align: left;">false</td></tr>
<tr class="a">
<td style="text-align: left;">licenseFamiliesDenied</td>
<td style="text-align: left;">The denied License family IDs. These license families will be removed from the list of approved licenses.</td>
<td style="text-align: left;">FamilyID</td>
<td style="text-align: left;">false</td></tr>
<tr class="b">
<td style="text-align: left;">licenseFamiliesDeniedFile</td>
<td style="text-align: left;">Name of file containing the denied license IDs.</td>
<td style="text-align: left;">File</td>
<td style="text-align: left;">false</td></tr>
<tr class="a">
<td style="text-align: left;">inputExclude</td>
<td style="text-align: left;">Excludes files matching wildcard <i>Expression</i>.</td>
<td style="text-align: left;">Expression</td>
<td style="text-align: left;">false</td></tr>
<tr class="b">
<td style="text-align: left;">outputFile</td>
<td style="text-align: left;">Define the output file where to write a report to.</td>
<td style="text-align: left;">File</td>
<td style="text-align: left;">false</td></tr></table></section><section><a id="Deprecated_1"></a>
<h3>Deprecated </h3>
<table class="table table-bordered table-striped">
<tr class="a">
<td style="text-align: left;">Name</td>
<td style="text-align: left;">Description</td>
<td style="text-align: left;">Argument Type</td>
<td style="text-align: left;">Deprecated</td></tr>
<tr class="b">
<td style="text-align: left;">licenses</td>
<td style="text-align: left;">File names for system configuration.</td>
<td style="text-align: left;">File</td>
<td style="text-align: left;">Deprecated for removal since 0.17: Use <i>config</i> instead.</td></tr>
<tr class="a">
<td style="text-align: left;">exclude</td>
<td style="text-align: left;">Excludes files matching wildcard <i>Expression</i>.</td>
<td style="text-align: left;">Expression</td>
<td style="text-align: left;">Deprecated for removal since 0.17: Use <i>inputExclude</i> instead.</td></tr>
<tr class="b">
<td style="text-align: left;">out</td>
<td style="text-align: left;">Define the output file where to write a report to.</td>
<td style="text-align: left;">File</td>
<td style="text-align: left;">Deprecated for removal since 0.17: Use outputFile attribute instead.</td></tr></table></section></section><section><a id="Argument_Types"></a>
<h2>Argument Types</h2>
<table class="table table-bordered table-striped">
<tr class="a">
<td style="text-align: left;">Value Type</td>
<td style="text-align: left;">Description</td></tr>
<tr class="b">
<td style="text-align: left;">DirOrArchive</td>
<td style="text-align: left;">A directory or archive file to scan.</td></tr>
<tr class="a">
<td style="text-align: left;">Expression</td>
<td style="text-align: left;">A wildcard file matching pattern. Example: *-test-*.txt</td></tr>
<tr class="b">
<td style="text-align: left;">FamilyID</td>
<td style="text-align: left;">The ID for a license family.</td></tr>
<tr class="a">
<td style="text-align: left;">File</td>
<td style="text-align: left;">A file name.</td></tr>
<tr class="b">
<td style="text-align: left;">LicenseFilter</td>
<td style="text-align: left;">A defined filter for the licenses to include. Valid values are: ALL, APPROVED, NONE.</td></tr>
<tr class="a">
<td style="text-align: left;">LicenseID</td>
<td style="text-align: left;">The ID for a license.</td></tr>
<tr class="b">
<td style="text-align: left;">LogLevel</td>
<td style="text-align: left;">The log level to use. Valid values DEBUG, INFO, WARN, ERROR, OFF.</td></tr>
<tr class="a">
<td style="text-align: left;">ProcessingType</td>
<td style="text-align: left;">Specifies how to process file types. Valid values are: NOTIFICATION: List file as present PRESENCE: List any licenses found ABSENCE: List licenses found and any unknown licences</td></tr>
<tr class="b">
<td style="text-align: left;">StyleSheet</td>
<td style="text-align: left;">Either an external xsl file or maybe one of the internal named sheets. Internal sheets are: plain-rat: The default style missing-headers: Produces a report of files that are missing headers unapproved-licenses: Produces a report of the files with unapproved licenses xml: The default style.</td></tr></table></section></section> </main>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row-fluid">
Copyright &copy; 2016-2025 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.
Apache Creadur, Creadur, Apache RAT, Apache Tentacles, Apache Whisker, Apache and the ASF logo are trademarks
of The Apache Software Foundation.
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.
</div>
</div>
</footer>
</body>
</html>