Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
12.0
-
None
Description
Here is a test project https://github.com/PashaTurok/jpms-resource-test1 that has module-info in src/test/java (it is possible starting from surefire/failsafe 3.0.0-M5.
When we do in-module testing the name of the src/test/java/module-info is the same as the name of src/main/java/module-info. For details see https://sormuras.github.io/blog/2018-09-11-testing-in-the-modular-world.html
However, NB works badly with such configuration it shows erros and doesn't fix imports etc. See the picture.
To make situation clearer.
There are these alternatives to use tests with jpms modules:
1. main and test without module-info (classpath)
2. main with module-info, but test without module-info (main in modulepath and tests in classpath)
3. main and test on modulepath:
- Two modules: one is a main module and the other is a test module with different packages.
- One merged module that contains both tests and main classes with same package names.
This issue is about 3.2.
These details were also discussed for SF and FS plugins here https://issues.apache.org/jira/browse/SUREFIRE-1811
Attachments
Attachments
Issue Links
- links to