Add jlink-compatible Java9/Jigsaw module-info (not automatic modules)
See original GitHub issueLatest version has automatic modules and can be used in Java 9 projects (#114). However, this is not compatible with the jlink tool.
Steps to reproduce the problem (provide example input):
- create a Java 9 based project that uses modules
- Use jlink
Expected behavior:
jlink links the prokect
Actual behavior:
jlink reports an error:
> Task :link FAILED
Error: automatic module cannot be used with jlink: org.commonmark.ext.gfm.strikethrough from file:///Users/axel/.gradle/caches/modules-2/files-2.1/com.atlassian.commonmark/commonmark-ext-gfm-strikethrough/0.11.0/2b3f085711511202c380f2540760d64302c6bb7e/commonmark-ext-gfm-strikethrough-0.11.0.jar
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:25
Top Results From Across the Web
Add jlink-compatible Java9/Jigsaw module-info (not automatic ...
Latest version has automatic modules and can be used in Java 9 projects (#114). However, this is not compatible with the jlink tool....
Read more >Java 9: discovering modules - The Worldline engineering Blog
Java 9 is coming soon with a brand new (and long awaited) modular system. ... Module System (JPMS), more known by its project...
Read more >Java 9+ modularity: The difficulties and pitfalls of migrating ...
By looking at compatibility, migration issues, and techniques, explore the new APIs and tools, changes, deletions, and deprecations in Java ...
Read more >jlink not using automatic modules - Stack Overflow
You can't use jlink directly because it does not support automatic modules but this problem can be avoided by just not using the...
Read more >Moving to Java 9 - module-info.class not found for <module ...
%JAVA_HOME%/jmods;target\terminalfx.jar;target\dependency --add-modules ... I suspect jackson.databind is an automatic module. jlink does not
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
Hey everyone. I think it’s time we modularized commonmark-java itself. I don’t think Android tooling has a problem with module-info files anymore (that was the original blocker).
I’m gonna look at @ice1000’s work as a starting point. One tricky part is going to be that until now, the classes in the
internal
package were accessible and I know some people have used them to extend inline parsing. If we no longer export those it’s going to be harder. But maybe this is a good point in time to actually make those things public. There’s some work that happened as part of https://github.com/commonmark/commonmark-java/issues/113 already.I can’t commit to a time frame at this point though.
Thank you for the hint. I tried now all Versions from 0.13.1 up to 0.16.1 … all with the same result:
There is an automatic-module-name declaration in the jars manifest:
There ist also no module-info.java in the jar, so i think jlink isnt wrong with its suggestion.