Missing opens directive in module descriptor
See original GitHub issueProblem
Using Pioneer on the module path fails with:
java.lang.reflect.InaccessibleObjectException:
Unable to make org.junitpioneer.jupiter.IssueExtension() accessible:
module org.junitpioneer does not "opens org.junitpioneer.jupiter" to module org.junit.platform.commons
when using an extension located in package org.junitpioneer.jupiter
.
Possible Solution
Open packages that contain types using JUnit Platform’s reflection support to module org.junit.platform.commons
.
opens org.junitpioneer.jupiter to org.junit.platform.commons;
Work around
Pass --add-opens org.junitpioneer/org.junitpioneer.jupiter=org.junit.platform.commons
on the command-line or at the right place of your build tool when
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
Missing opens directives in module descriptors #1877 - GitHub
Fix by adding appropriate opens to org.junit.platform.commons directives. Find other places where reflection support from org.junit.platform.
Read more >java - How to suppress the "requires transitive directive for an ...
After upgrading a Maven project to Java 9 and adding a module descriptor, javac complains about a transitive dependency ...
Read more >NG8003: No directive found with export - Angular
Angular can't find a directive with {{ PLACEHOLDER }} export name. This is common with a missing import or a missing exportAs on...
Read more >Java Modules - Jenkov.com
If any required modules are not found at startup, the Java VM reports the missing module and shuts down. Before Java 9 missing...
Read more >Go Modules Reference - The Go Programming Language
The go command starts by searching the build list for modules with paths ... As of the Go 1.17 release, if the go...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We use a similar setup in AssertJ (for another purpose: verify what happens with different classpath content) and the main drawback is not being IDE friendly, so maintaining those tests is a bit of a hassle.
We plan to introduce a Maven multi-module project with the next major version and have separate modules for integration testing, automatically detected by the IDE so easier to be maintained.
Something similar (still Maven focused) was also discussed on StackOverflow and Twitter.
The limitations might be strictly connected to the Maven setup (i.e., the
maven-invoker-plugin
). I am not sure if something similar with Gradle would have the same issues.Making
IssueExtension
,StopwatchExtension
, and friendspublic
should also do the trick.