./gradlew test
Output:
java.lang.ClassCastException: slf4j.api@1.7.25/org.slf4j.helpers.NOPLoggerFactory cannot be cast to org.gradle.internal.logging.slf4j.OutputEventListenerBackedLoggerContext
./gradlew build -b build-junit-platform-plugin.gradle
Output:
BUILD SUCCESSFUL in 6s
- It appears that there is an issue with
JUnitPlatform.class
in the JPMS. - Using the JUnit4
@RunWith(JUnitPlatform.class)
annotation will also produce the exception.
- The test code is very basic and does nothing other than depend on code that uses the
slf4j-api
.