question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default output directory for `module-info.class` should be `META-INF/versions/9`

See original GitHub issue

There 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:closed
  • Created 5 years ago
  • Comments:19 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
gunnarmorlingcommented, Dec 16, 2018

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.

1reaction
gunnarmorlingcommented, Dec 12, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

META-INF/versions/9/module-info.class - java - Stack Overflow
1 would currently support up to Java 15). After installing Java 11 with sudo dnf install java-11-openjdk. alternatives --display java will list ......
Read more >
module-info.class must be in root of jar, not META-INF/versions/9
This triggers build warnings on javac. The module-info. class shouldn't be in the META-INF/versions/9 in the jar file, it should be in the...
Read more >
Pingfederate Jetty version and custom application deploy issue.
Hi, I want to build my application in PingFederate under /PF_HOME/server/default/deploy, however the deployment keep failed.
Read more >
picocli - a mighty tiny command line interface
Use system property picocli.converters.excludes to specify a comma-separated list of fully qualified class names for which the converter should not be loaded.
Read more >
io.github.classgraph : classgraph : 4.8.104 - Maven Central
module-info.class cannot be copied to the target directory, otherwise --> <! ... META-INF/versions/9 , so we need to set the Multi-Release entry to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found