Skip to content

Conversation

@ottlinger
Copy link
Contributor

@ottlinger ottlinger commented Oct 31, 2025

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 ottlinger changed the title RAT-510: Try to document the current behaviour with a test RAT-510: doubly configured exclusions - try to document the current behaviour with a test Oct 31, 2025
@Claudenw
Copy link
Contributor

Claudenw commented Nov 1, 2025

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

@ottlinger
Copy link
Contributor Author

@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

@Claudenw
Copy link
Contributor

Claudenw commented Nov 4, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants