I am creating a modular build (using module-info.java) on GitHub, but when adding a module-info.java to the modules that I want modular, no tests can be executed...
How can I achieve this?
I am using the following versions:
- junit.jupiter version 5.3.0 (first take was also unsuccessful with version 5.2.0)
- maven-compiler-plugin version 3.8.0 (first take was also unsuccessful with version 3.7.0)
- maven-surefire-plugin version 2.22.0 (first take was also unsuccessful with version 2.21.0)
A typical error from the failing tests looks like:
java.lang.reflect.InaccessibleObjectException: Unable to make
com.github.jactor.rises.commons.dto.UserDtoTest() accessible: module
jactor.rises.commons does not "opens
com.github.jactor.rises.commons.dto" to unnamed module @65e98b1c
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…