You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you might know, the pre-9 versions of Java are running out of support quiet soon. Oracle provides extended support for JDK 8 until the end of 2030 according to https://www.oracle.com/java/technologies/java-se-support-roadmap.html. Many distributions have already switched to Java 17 as a default and a jump to Java 21 will be expected in less than 2 years.
Later versions support project jigsaw modules / JPMS. Many libraries have already added support. For instance, Apache commons libraries provide module-info, JavaEWAH which is one of jgit's dependencies provides module-info. Consider adding support for module-info, at least for org.eclipse.jgit core.
The only challenge here is to think which packages would be exposed as part of the public API.
If done properly, adding module-info would not break any existing use cases (see the example I linked). Including module-info.class in the jar means Java 9+ projects can easily use the library with jlink and without need for workarounds. Automatic modules won't solve the issue with jlink.
Alternatives considered
Moditect
Forking the project
Additional context
No response
The text was updated successfully, but these errors were encountered:
Description
As you might know, the pre-9 versions of Java are running out of support quiet soon. Oracle provides extended support for JDK 8 until the end of 2030 according to https://www.oracle.com/java/technologies/java-se-support-roadmap.html. Many distributions have already switched to Java 17 as a default and a jump to Java 21 will be expected in less than 2 years.
Later versions support project jigsaw modules / JPMS. Many libraries have already added support. For instance, Apache commons libraries provide module-info, JavaEWAH which is one of jgit's dependencies provides module-info. Consider adding support for module-info, at least for org.eclipse.jgit core.
The only challenge here is to think which packages would be exposed as part of the public API.
I've included an example here: module-info.txt
This exposes all the packages, which might not be optimal.
You'll also need a way to write the module-info. If it's not included in the src/ folder, you can use something like this: https://github.com/lemire/javaewah/blob/master/pom.xml#L135
Motivation
If done properly, adding module-info would not break any existing use cases (see the example I linked). Including module-info.class in the jar means Java 9+ projects can easily use the library with jlink and without need for workarounds. Automatic modules won't solve the issue with jlink.
Alternatives considered
Additional context
No response
The text was updated successfully, but these errors were encountered: