You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@creadur.apache.org by "Piotr Karwasz (Jira)" <ji...@apache.org> on 2026/05/10 11:33:00 UTC

[jira] [Updated] (RAT-552) `excludeSubProjects` ineffective when deprecated `excludes` configuration is present

     [ https://issues.apache.org/jira/browse/RAT-552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Piotr Karwasz updated RAT-552:
------------------------------
    Affects Version/s: 0.17

> `excludeSubProjects` ineffective when deprecated `excludes` configuration is present
> ------------------------------------------------------------------------------------
>
>                 Key: RAT-552
>                 URL: https://issues.apache.org/jira/browse/RAT-552
>             Project: Apache RAT
>          Issue Type: Bug
>          Components: Client - maven
>    Affects Versions: 0.17
>            Reporter: Piotr Karwasz
>            Priority: Minor
>
> As a consequence of the option renaming in RAT-390, since version 0.17 the {{excludeSubProjects}} option of the Maven plugin is silently disabled whenever the deprecated {{excludes}} configuration is also used.
> The root cause is in how sub-module exclusions are registered. The plugin appends the {{<module>/**}} patterns to {{inputExcludes}}, but the shared argument-map helper rejects writes to a non-deprecated option when its deprecated alias (here {{excludes}}) has already been populated. As a result, the sub-module patterns are silently dropped and the plugin descends into every sub-module directory.
> The workaround is to replace the deprecated {{excludes}} configuration with {{inputExcludes}}. Given the ephemeral nature of the coexistence between {{excludes}} and {{inputExcludes}}, I doubt fixing this issue is worth the effort, but I am filing it so that users hitting the same problem can find the workaround.
> Steps to reproduce:
> # Create a multi-module Maven project with a single {{module}} sub-module.
> # Add an inherited Maven RAT plugin configuration to the aggregator POM, containing a single {{hello.txt}} entry under {{excludes}}.
> # Add a {{hello.txt}} file without a license header to {{module}}.
> # Run a RAT check: it will fail on the aggregator module because of {{module/hello.txt}}.
> Expected behavior: the RAT check on the aggregator module should not descend into files belonging to its sub-modules.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)