Affects Version/s: 2.21.0
Fix Version/s: None
Component/s: process forking
- two JPMS modules `org.foo.a` and `org.foo.b`, both with module-info
- `org.foo.a` requires `org.foo.b`
- `org.foo.b` exports package `org.foo.b.c`
- `org.foo.a` contains a text file: src/main/resources/org/foo/b/c/Foo.txt
- when surefire is run on module `org.foo.a` a dump file error occurs:
While the scenario is one that JPMS rejects, surefire should handle it better. The compiler compiles the code just fine because it doesn't see the resources as a package. Surefire is thus the first part of Maven that sees it as a "package" that clashes with the module org.foo.b.
Clearly, some part of surefire needs to be taught to about java.lang.module.ResolutionException, as the error is tricky to find/see because it is a dump file.