On Thu, 16 Apr 2026 at 16:00, Alex Herbert <[email protected]> wrote:

>
>
> On Thu, 16 Apr 2026 at 15:33, Gilles Sadowski <[email protected]>
> wrote:
>
>>
>> >
>> > RAT Report:
>> >
>> >
>> https://dist.apache.org/repos/dist/dev/commons/numbers/1.3-RC1/site/rat-report.html
>>
>> This contains:
>> ---CUT---
>> *****************************************************
>> Files with unapproved licenses
>> *****************************************************
>>
>>   /src/site/resources/release-notes/RELEASE-NOTES-1.0-beta1.txt
>>   /src/site/resources/release-notes/RELEASE-NOTES-1.0.txt
>>   /src/site/resources/release-notes/RELEASE-NOTES-1.1.txt
>>   /src/site/resources/release-notes/RELEASE-NOTES-1.2.txt
>>   /src/site/resources/release-notes/RELEASE-NOTES-1.3.txt
>> ---CUT---
>>
>
> This is weird. The pom contains under build and reporting:
>
>       <plugin>
>         <groupId>org.apache.rat</groupId>
>         <artifactId>apache-rat-plugin</artifactId>
>         <version>${commons.rat.version}</version>
>         <configuration>
>          <!--  Should agree with apache-rat-plugin config under <build> -->
>           <inputExcludes>
>             <exclude>src/test/resources/data/**</exclude>
>
> <exclude>src/site/resources/release-notes/RELEASE-NOTES-*.txt</exclude>
>             <exclude>dist-archive/**</exclude>
>             <exclude>**/site-content/**</exclude>
>           </inputExcludes>
>         </configuration>
>       </plugin>
>
> Note that from apache-rat:0.17 the <exclude> tag is deprecated. I updated
> to the newer <inputExcludes>. This seems to allow these files to pass the
> apache-rat:check goal. Looking at commons parent it uses <inputExclude> as
> the tag here in the build configuration but still has the old <excludes>
> tag in the reporting section.
>
> The apache-rat documentation is not clear what tag to use to replace the
> <excludes> tag. I thought I had it correct as the build did not fail under
> rat:check. I will try and reproduce this and then correct the rat
> configuration.
>
>
The rat plugin prints out the excludes when running. The excludes from
commons parent must be merged with the excludes from the project. This does
not work correctly on a site build.

Here are the results:

mvn -N apache-rat:rat

[INFO] --- apache-rat:0.17:rat (default-cli) @ commons-numbers-parent ---
[WARNING] Basedir is : /Users/ah403/release/numbers/commons-numbers
[INFO] Excluding patterns: site-content/**, .checkstyle, .fbprefs, .pmd,
.asf.yaml, .gitattributes, src/site/resources/download_*.cgi,
maven-eclipse.xml, .externalToolBuilders/**, .vscode/**, .project,
.classpath, .settings/**, **/*.svg, **/*.xcf, src/test/resources/data/**,
src/site/resources/release-notes/RELEASE-NOTES-*.txt, dist-archive/**,
**/site-content/**, commons-numbers-core/**, commons-numbers-complex/**,
commons-numbers-primes/**, commons-numbers-quaternion/**,
commons-numbers-fraction/**, commons-numbers-angle/**,
commons-numbers-gamma/**, commons-numbers-combinatorics/**,
commons-numbers-arrays/**, commons-numbers-field/**,
commons-numbers-rootfinder/**, commons-numbers-bom/**,
commons-numbers-docs/**

mvn -N site

[INFO] --- apache-rat:0.17:check (rat-check) @ commons-numbers-parent ---
[WARNING] Basedir is : /Users/ah403/release/numbers/commons-numbers
[INFO] Excluding patterns: site-content/**, .checkstyle, .fbprefs, .pmd,
.asf.yaml, .gitattributes, src/site/resources/download_*.cgi,
maven-eclipse.xml, .externalToolBuilders/**, .vscode/**, .project,
.classpath, .settings/**, **/*.svg, **/*.xcf, src/test/resources/data/**,
src/site/resources/release-notes/RELEASE-NOTES-*.txt, dist-archive/**,
**/site-content/**, commons-numbers-core/**, commons-numbers-complex/**,
commons-numbers-primes/**, commons-numbers-quaternion/**,
commons-numbers-fraction/**, commons-numbers-angle/**,
commons-numbers-gamma/**, commons-numbers-combinatorics/**,
commons-numbers-arrays/**, commons-numbers-field/**,
commons-numbers-rootfinder/**, commons-numbers-bom/**,
commons-numbers-docs/**

[INFO] Generating "RAT Report" report    --- apache-rat-plugin:0.17:rat
[WARNING] Basedir is : /Users/ah403/release/numbers/commons-numbers
[WARNING] Use of deprecated option 'exclude'. Deprecated for removal since
0.17: Use <inputExclude> instead.
[INFO] Excluding patterns: site-content/**, .checkstyle, .fbprefs, .pmd,
.asf.yaml, .gitattributes, src/site/resources/download_*.cgi,
maven-eclipse.xml, .externalToolBuilders/**, .vscode/**


So when the rat report is run as a goal it picks up the correct excludes.
This is also the case when the check goal is run as part of a site build.
But in the same build the reporting goal does not pick up the excludes.

If I put the <inputExcludes> tag back to the deprecated <excludes> tag used
in the commons parent reporting section this does not fix anything. So
there is some bug in a site build where the rat plugin loses the excludes
from the current pom (but maintains those from the parent pom).

I updated commons parent to use the inputExcludes tag in the reporting
section. This fixes the issue locally so I pushed that to master.

For the release I could regenerate the rat report so that it is correct.
But this issue is with commons parent 98 and not the release candidate.

Alex

Reply via email to