creadur-rat icon indicating copy to clipboard operation
creadur-rat copied to clipboard

RAT-510: doubly configured exclusions - try to document the current behaviour with a test

Open ottlinger opened this issue 2 months ago • 3 comments

I added a test case in the Maven plugin integration tests

  • comprised of two folders
  • but only one is excluded.

I do not really get why the build does not fail properly as there is one unapproved file in the module tree.

I ran the tests with Maven 4.0.0-rc-4 and 3.9.11 locally.

Is that what you meant @Claudenw ?

ottlinger avatar Oct 31 '25 23:10 ottlinger

You have detected a slightly different version but yes.

I had 2 inputExclude in the configuration section. You have 2 inputExcludes which should be find. You can fix the problem by putting both exclude entries under one inputExcludes

Claudenw avatar Nov 01 '25 08:11 Claudenw

@Claudenw would you mind describing what you did OR wanted to do?

I think (that's why I created this PR) that the example I provided is a user error and can easily be fixed, thus no problem. But I'd like to understand the situation you are referring to? Thx

ottlinger avatar Nov 03 '25 16:11 ottlinger

I have not delved deeply into the issue. But I think it goes like this.

  • If you have a single input-exclude statement you can use <inputExclude>
  • If you have multiple input-exclude statements you have to use:
<inputExcludes>
    <expression>statement1</expression>
    <expression>statement2</expression>
    ...
    <expression>statementN</expression>
</inputExcludes>
  • There may only be only one <inputExcludes> statement as a child of the <configuration> element.
  • If there are multiple <inputExclude> or <inputExcludes> children of the <configuration> element only the last one will be used.

I have not tested what happens if you use both <inputExclude> and <inputExcludes> as children of the <configuraiton> element but I suspect only the last one gets used.

Claudenw avatar Nov 04 '25 08:11 Claudenw