Default output directory for `module-info.class` should be `META-INF/versions/9`
See original GitHub issueThere are still a lot of old Java tools that choke when they hit a module-info.class
file. It may take a long time for this problem to be solved, since old libraries pull in even older libraries in their transitive dependency graph.
META-INF/versions/9
was the location recommended by Uwe Schindler as the maximally backwards-compatible location for the module descriptor, pointed out by Alan Bateman on the jigsaw-dev mailing list recently:
http://mail.openjdk.java.net/pipermail/jigsaw-dev/2018-October/013940.html
Some tools (such as the Android toolchain) are being updated to ignore classes found in META-INF/versions
for this reason:
https://issuetracker.google.com/u/0/issues/77587908
I tried using <outputDirectory>
to specify where the module descriptor would be saved, but that affects the output jarfiles, not the location of module-info.class
. Is there a way to save the module descriptor anywhere other than the root of the build target? If so, it would be a good idea to have the default be target/META-INF/versions/9
, at least for the foreseeable future.
Issue Analytics
- State:
- Created 5 years ago
- Comments:19 (19 by maintainers)
Top GitHub Comments
Agh, so I ran into some issues with the set-up for the release today 😦 I’ll keep working on this in the course of the next days.
Hey @lukehutch, thanks for the reminder! Apologies for the delay (and just ignoring your earlier question about the release, I somehow missed that). I’ll try and push out a release over the weekend.