Add module-info.java to have an example that works with Jigsaw too.
Opened this issue · 1 comments
Brixomatic commented
Unfortunately this simple example doesn't show how to meaningfully combine JUnit with Jigsaw.
If I'm not mistaken, junit should not be in the "requires" section of the module-info,java, as it is not required by the module, only by its tests.
sormuras commented
Short answer: Create dedidated (project-internal) test modules (that binaries are not published to an external repository).
Or: JUnit should not be a dependency of the main scope, as it is not used by main classes, only by its tests.
Longer answer: https://sormuras.github.io/blog/2018-09-11-testing-in-the-modular-world