-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hyphen module name breaks module based projects #321
Comments
Thank you for the report, we just reused our artifact id's without giving it enough thought. As we do not have any modularized applications using chartfx: is this "just" a spec violation or does this actually stop you from using this in your module-info.java? Should be fixed anyway of course, but if users could already be using the current non-conforming module name, we should communicate this differently. |
Dependent applications wont compile so it's more than just a spec violation. This is the following javac error on both Oracle 11.0.7 and OpenJDK-11.0.3. error: cannot access module-info Amending the manifest as per above works fine. |
Module names should not contain hyphens, so we cannot reuse our artifact names. Instead introduce a new property which will be set in each module. fixes #321
Thanks for the clarification, prepared a pull request which will be merged as soon as CI passes. |
Module names should not contain hyphens, so we cannot reuse our artifact names. Instead introduce a new property which will be set in each module. fixes #321
As per the JSE 9+ specs;
https://docs.oracle.com/javase/specs/jls/se9/html/jls-7.html#jls-ModuleDeclaration
https://docs.oracle.com/javase/specs/jls/se9/html/jls-3.html#jls-3.8
A module/package identifier, within the module descriptor(module-info.java) needs to be an alphanumeric string. The suggested workaround for module based projects is to use a period in place of the hyphen, for the "Automatic-Module-Name" in the manifest as such:
Automatic-Module-Name: de.gsi.chart.chartfx.chart
Further info on module resolution:
https://docs.oracle.com/javase/9/docs/api/java/lang/module/ModuleFinder.html
Love your work.
The text was updated successfully, but these errors were encountered: