Closed leadpony closed 10 months ago
Thanks for the issue! I am fine with the names asciidoctorj.api, asciidoctorj.core etc. About your example I'd prefer to not put it into the configuration of the bnd plugin. Its purpose is for building OSGi modules, and I think it might be confusing to find that property there.
For 3.0 I'd prefer to also add proper module-info files that also declare the dependencies.
@robertpanzer
Thank you for your reply.
I am fine with the names asciidoctorj.api, asciidoctorj.core etc.
Which one you mean?
asciidoctorj.api
org.asciidoctor.asciidoctorj.api
Module names must be globally unique and traditionally the reverse DNS notation is used to secure the uniqueness.
Its purpose is for building OSGi modules, and I think it might be confusing to find that property there.
I agree.
My request is:
The following sentense is from the book Java 9 Modularity published by O'Reilly:
Reserving a module name with
Automatic-Module-Name
in the manifest is something you should do as quickly as possible.
My request is not about the full modularization equipped with a module descriptor, bacause it takes long time as in the issue #1036, which seems to be posted 2 years ago.
If I understand correctly the current automatic module names would be asciidoctorj.api and asciidoctorj. Changing that to org.asciidoctor.asciidoctorj.api would be a breaking change imo, since AsciidoctorJ should work with JPMS atm and users might already be relying on that.
We can consider the move to org.asciidoctor.asciidoctorj.api
for AsciidoctorJ 3.0, but not for 2.5.x.
Yes, you are right.
Currently the users of AsciidoctorJ are using filename-based, non-canonical module names because the library lacks Automatic-Module-Name
entries in the manifest.
I hope that 3.0.0-alpha.2 contains the modification to the manifest files.
The artifacts in my project are JPMS (Java Platform Module System) modules and one of them depends on AsciiDoctorJ API. It works fine with both the stable
2.5.10
and the latest3.0.0-alpha-1
.module-info.java
in my module is like this.Building this module using Maven emmits the following message:
This message prevents me from publishing my module to the Maven Central.
Fixing this problem is very easy. It just requires to add
Automatic-Module-Name
attribute in thebuild.gradle
in asciidoctorj-api project to name the automatic module explicitly:This does harm nothing when JVM is running without module path.
Please note that the name given for the automatic module illustrated above is simply constructed with the group ID and the artifact ID replacing
-
with.
. You can change it if there is more appropriate name for this project.Please also see this excellent article: Automatic-Module-Name: Calling all Java Library Maintainers