Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add module-info.java to have an example that works with Jigsaw too. #172

Open
Brixomatic opened this issue Aug 7, 2022 · 1 comment
Open

Comments

@Brixomatic
Copy link

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
Copy link
Member

sormuras commented Aug 7, 2022

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

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

No branches or pull requests

2 participants