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

Automatic module name #355

Closed
bjorndarri opened this issue Nov 3, 2020 · 2 comments · Fixed by #360
Closed

Automatic module name #355

bjorndarri opened this issue Nov 3, 2020 · 2 comments · Fixed by #360

Comments

@bjorndarri
Copy link
Contributor

bjorndarri commented Nov 3, 2020

Hi,

Would you consider adding an Automatic-Module-Name clause to the jar manifest?

manifest {
     attributes(
        'Automatic-Module-Name': 'io.nats.jnats',
    )
}

Thanks.

@scottf
Copy link
Contributor

scottf commented Dec 24, 2020

@bjorndarri We are probably going to add this in. Since the client is open source, have you gotten a copy of the source and done this? I'm assuming that you are using modules in your application, can you help us understand what problem this solves?

@bjorndarri
Copy link
Contributor Author

I'm using this library in a fully modular Java application, using Gradle (without the gradle-modules-plugin). It's basically just a hazzle using non-modularized libraries in modular applications (build file bloat), so I added this little change and am using my own SNAPSHOT version of nats.io. Without this Java falls back to automatic module naming using the .jar filename, which is, apart from it just being a hazzle, quite fragile.

Adding this manifest directive is the simplest way to allow usage both with Java 8 and modularized Java > 9 applications.

Here's some additional information:
Automatic-Module-Name: Calling all Java Library Maintainers
and
Explicitly Naming Automatic Java Modules

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

Successfully merging a pull request may close this issue.

2 participants