JPMS: Wrong export in module-info
See original GitHub issueI am using JPMS and unable to import faker
classes and they are not exported. Instead I see wrong exports in the decompiled class. PFA the screenshot
module com.fasterxml.jackson.annotation {
exports com.fasterxml.jackson.annotation;
opens com.fasterxml.jackson.annotation;
}

Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
JPMS Module System Issue - java - Stack Overflow
I created 2 random modules I exported "com.alice" package from folder A and require the module in folder B. Then compiled A: javac ......
Read more >requires transitive and qualified exports in JPMS - CodeRanch
Options A, B, C, and D are incorrect because the keyword is exports, not export. Options E and F are incorrect because you...
Read more >Incorrect export of `com.fasterxml.jackson.jaxrs.json ... - GitHub
When running an app with 2.10.1 using JPMS, I get the following error: Error occurred during initialization of boot layer java.lang.module.
Read more >Java 9 modules - JPMS basics - Stephen Colebourne's blog
Unfortunately, quite a few things can go wrong. 1) All use of module-info files only applies if using modular jars on the modulepath....
Read more >JPMS Libraries - bnd
This annotation specifies the module name(s) to which a exported is targeted. @org.osgi.annotation.bundle.
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 Free
Top 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
I suspect that the module-info.class comes from a shadowed jackson dependency and is added automatically by shadow plugin. The way I see going about this issue is we need to add a module-info.class manually for JPMS support in kotlin-faker, and also probably add explicit support for java9 (via own jar that would include this module-info.class?) As I mentioned, there’s no support for java modules now in kotlin-faker, so this needs to be added. I’ll need to experiment a bit with this.
Hi @overfullstack , thanks for reporting this.
I don’t think I’ve ever explicitly added modules support to faker - a lot of the code I work with is still stuck on java 8… 😄 But this looks very weird nevertheless, not sure why the module would be registered with this name… I’ll take a closer look at it as soon as I have some time, but also feel free to submit a PR with a fix if you want to.