[ 
https://issues.apache.org/jira/browse/RAT-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18079881#comment-18079881
 ] 

Philipp Ottlinger edited comment on RAT-552 at 5/10/26 6:05 PM:
----------------------------------------------------------------

Thanks for reporting the issue - the exclusion of subprojects is part of the 
known issues:
from https://creadur.apache.org/rat/apache-rat/known_issues.html (RAT-97)

Did I understand you correctly that the problem disappears once you've migrated 
to the new exclusion/inclusion config elements?


was (Author: hugo.hirsch):
Thanks for reporting the issue - the exclusion of subprojects is part of the 
known issues:
from https://creadur.apache.org/rat/apache-rat/known_issues.html (RAT-97)

> `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
>             Fix For: 1.0.0
>
>
> 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)

Reply via email to