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

Module naming convention #1848

Open
rishabhmaurya opened this issue Jan 4, 2022 · 0 comments
Open

Module naming convention #1848

rishabhmaurya opened this issue Jan 4, 2022 · 0 comments
Labels
enhancement Enhancement or improvement to existing feature or request Plugins

Comments

@rishabhmaurya
Copy link
Contributor

JPMS doesn't solves Version Selection problem [0] and leaves it to build tools like gradle and maven to specify version for modular dependencies. The module-info.class generated does contain the version associated, but isn't used -

❯ java --list-modules build/distributions/opensearch-example-module-2.0.0-SNAPSHOT.jar
[email protected]
[email protected]
[email protected]
[email protected]

Since module names have to be unique, we need to decide on the common prefix. Some discussion on naming lucene modules - https://issues.apache.org/jira/browse/LUCENE-10255 which discusses naming lucene modules just with plain lucene-xxxx vsorg.apache.lucene.xxxx. My 2 cents would be to use latter convention using full qualified name - org.opensearch.xxxx, part of the reason related to how automatic modules are named in java. For a jar named ${groupID}-${artifactID}-${version}.jar, its automatic module would be named as ${groupID}.${artifactID}. So if for some module, we couldn't migrate it to JPMS, then consumers can still use its jar as automatic module, and when we migrate it in future, consumers do not have to change the module name while specifying dependencies.

[0] - http://openjdk.java.net/projects/jigsaw/spec/reqs/02#version-selection

@rishabhmaurya rishabhmaurya added enhancement Enhancement or improvement to existing feature or request untriaged labels Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Plugins
Projects
None yet
Development

No branches or pull requests

2 participants