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

Research exporting public API packages as Java Module #1434

Closed
milleruntime opened this issue Nov 15, 2019 · 11 comments
Closed

Research exporting public API packages as Java Module #1434

milleruntime opened this issue Nov 15, 2019 · 11 comments
Assignees
Milestone

Comments

@milleruntime
Copy link
Contributor

It may be possible to use the Modules system, added in Java 9, to export the packages we want to treat as public API as a single module.

@milleruntime milleruntime self-assigned this Nov 15, 2019
@keith-turner
Copy link
Contributor

I read this and thought it was a good overview

http://tutorials.jenkov.com/java/modules.html

@milleruntime
Copy link
Contributor Author

I think a good first step would be adding the Automatic-Module-Name to our JAR manifest files and getting our dependencies to set this property as well. Here is a good blog post explaining the situation:
http://branchandbound.net/blog/java/2017/12/automatic-module-name/

@keith-turner
Copy link
Contributor

We should probably look for Accumulo dependencies that have not yet set Automatic-Module-Name and encourage them to set it.

@milleruntime
Copy link
Contributor Author

We should probably look for Accumulo dependencies that have not yet set Automatic-Module-Name and encourage them to set it.

I am going to try and write a script to analyze our dependencies and generate a list. Otherwise it will be time consuming to inspect each JAR by hand.

@milleruntime
Copy link
Contributor Author

It turns out the maven dependency plugin already does this so we can generate a list easily with the following command:
mvn dependency:list -DexcludeTransitive=true | grep "(auto)" | grep -v "optional" | sort | uniq

@milleruntime
Copy link
Contributor Author

milleruntime commented Nov 20, 2019

For dependencies that have not broached the subject yet, I created the following issues about adding automatic-module-name:

@milleruntime
Copy link
Contributor Author

Here is a list of dependencies without a module name and their status:

@milleruntime
Copy link
Contributor Author

I am no longer planning on doing research for this so closing.

@EdColeman
Copy link
Contributor

Isn't this something that will need to be done (eventually)? When that day comes, would any work done now be OBE,? Are there steps that should adopt now that would lessen future work / pain?

Why not keep it open as a marker for future technical debt? Maybe someone else would be interested?

@ctubbsii
Copy link
Member

Isn't this something that will need to be done (eventually)?

Yes, probably.

When that day comes, would any work done now be OBE,? Are there steps that should adopt now that would lessen future work / pain?

The automatic module stuff above will be a useful starting point.

Why not keep it open as a marker for future technical debt? Maybe someone else would be interested?

It's not really technical debt, as modules aren't necessary or required. If somebody else is interested, we could always re-open or create a more narrowly scoped task. This one is a bit wide open, and there's no specific action to take in response to it. I'm not sure it's adding any value being perpetually open. If you want, you could add a "backlog" tag to it, or something to find it (and others like it) more easily later.

@ice1000
Copy link

ice1000 commented Oct 7, 2022

JCommander has a substitute called picocli which supports jpms.

@ctubbsii ctubbsii added this to the 2.1.0 milestone Jul 12, 2024
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

5 participants