Why? Well, for Maven projects, exclusions are applied for each module – so that’s once for the parent xwiki-commons-jakartabridge (but it contains no java files itself, only its children do, so nothing gets excluded), and then again for xwiki-commons-jakartabridge/xwiki-commons-jakartabridge-common and xwiki-commons-jakartabridge/xwiki-commons-jakartabridge-servlet. While the latter two should inherit the exclusion settings you’ve set in the parent, the glob patterns are no longer valid when starting at the root of each of those modules.
I would have liked to test this out myself but I’ve had trouble building the project.
My theory here is that when you added the exclusion in the UI, you didn’t remove it from the pom.xml, and whatever is in the pom.xml always overrides what is set in the UI. docs
Any setting made in a configuration file will override settings made in the UI.
At the same time, I admit that I’m a bit rusty about how exclusions are applied here when modules are involved. I’m not sure that a project-level exclusion that includes a specific folder (the root of a module), will translate to an exclusion at the module level when inherited (or not) by that module. I’ll try and find a moment to run some tests.