Skip to content
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

Add Automatic-Module-Name for JDK9 interoperability #397

Closed
zyxist opened this issue Sep 3, 2017 · 3 comments
Closed

Add Automatic-Module-Name for JDK9 interoperability #397

zyxist opened this issue Sep 3, 2017 · 3 comments
Milestone

Comments

@zyxist
Copy link

zyxist commented Sep 3, 2017

Hello! JDK9 introduces a new manifest entry Automatic-Module-Name that allows specifying the stable automatic module name for forward compatibility with Jigsaw.

It would be nice to specify the module name explicitly (something like com.fasterxml.jackson.core, I suppose), rather than rely on the default generator that creates the name from the JAR archive name.

The other Jackson projects should be updated as well.

@cowtowncoder
Copy link
Member

That sounds reasonable, and should not require use of JDK 9 (which is a requirement for quite a while now).
Now, I haven't followed up on how module system works etc, but it should be possible to learn more about it. I assume (for example) that each jar should get its separate module name?

One follow-up question: would the default name of ${maven.group.id}.${maven.artifact.id} perhaps make sense? It could be added in a parent pom (jackson-parent), and only overridden in cases where it makes sense.

@aseovic
Copy link

aseovic commented Oct 2, 2017

Would it be possible to add Automatic-Module-Name to non-core modules as well?

I just had to do that on another project with many modules, and the easiest approach was to configure felix plugin in a parent POM to use ${automatic.module.name} property (which can be defaulted to the package name in the same POM), and override it selectively where necessary.

Happy to help get it done, too. I know it's a mindless and boring task, but it does make it much easier to consume Jackson from Java 9 and provides stable module name for the future.

@cowtowncoder
Copy link
Member

@aseovic Sure, that is the plan. I was hoping to test this first with core components, but assuming it works it should be rolled out eventually to all modules. Approach taken is indeed to use default name, and that should work for all modules I think.

Help with PRs would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants