Add module names for better Java 9/Jigsaw support #274
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Jigsaw module system requires that downstream users of JTS using the module system declare JTS as a module requirement. JTS acts as an automatic module, since it is not compiled with a
module-info.java. Without this change, module users would have to reference the requirement for JTS by specifying the JAR name with the fully qualified version; this is unwieldy, will trigger necessary updates when updating the JTS version, and could cause errors when transitive dependencies rely on other versions of JTS.This change utilizes the technique of putting the module name in the manifest, so that libraries declaring modules can refer to JTS with more friendly, version-less names, e.g.:
Testing Instructions
To verify this work, I defined a Foo.java file and a manifest-info.java file, as follows:
I then compiled and ran Foo as a module:
Expected output:
This is building JTS with java 8 against commit 3fb74b6