{"action":"created","issue":{"url":"https://api.github.com/repos/moditect/moditect/issues/67","repository_url":"https://api.github.com/repos/moditect/moditect","labels_url":"https://api.github.com/repos/moditect/moditect/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/moditect/moditect/issues/67/comments","events_url":"https://api.github.com/repos/moditect/moditect/issues/67/events","html_url":"https://github.com/moditect/moditect/issues/67","id":365409086,"node_id":"MDU6SXNzdWUzNjU0MDkwODY=","number":67,"title":"Default output directory for `module-info.class` should be `META-INF/versions/9`","user":{"login":"lukehutch","id":811305,"node_id":"MDQ6VXNlcjgxMTMwNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/811305?v=4","gravatar_id":"","url":"https://api.github.com/users/lukehutch","html_url":"https://github.com/lukehutch","followers_url":"https://api.github.com/users/lukehutch/followers","following_url":"https://api.github.com/users/lukehutch/following{/other_user}","gists_url":"https://api.github.com/users/lukehutch/gists{/gist_id}","starred_url":"https://api.github.com/users/lukehutch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukehutch/subscriptions","organizations_url":"https://api.github.com/users/lukehutch/orgs","repos_url":"https://api.github.com/users/lukehutch/repos","events_url":"https://api.github.com/users/lukehutch/events{/privacy}","received_events_url":"https://api.github.com/users/lukehutch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-10-01T10:58:51Z","updated_at":"2018-10-01T13:10:04Z","closed_at":null,"author_association":"NONE","body":"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.\r\n\r\n`META-INF/versions/9` was the location recommended by Alan Bateman on the jigsaw-dev mailing list recently as the maximally backwards-compatible location for the module descriptor (the thread name is \"Java Modules and Multi-Release Jar\" -- Alan's message is not yet in the archive, but should be there in a few hours).\r\n\r\nhttp://mail.openjdk.java.net/pipermail/jigsaw-dev/2018-September/thread.html#13932\r\n\r\nSome tools (such as the Android toolchain) are being updated to ignore classes found in `META-INF/versions` for this reason:\r\n\r\nhttps://issuetracker.google.com/u/0/issues/77587908\r\n\r\nI 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."},"comment":{"url":"https://api.github.com/repos/moditect/moditect/issues/comments/425901516","html_url":"https://github.com/moditect/moditect/issues/67#issuecomment-425901516","issue_url":"https://api.github.com/repos/moditect/moditect/issues/67","id":425901516,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTkwMTUxNg==","user":{"login":"lukehutch","id":811305,"node_id":"MDQ6VXNlcjgxMTMwNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/811305?v=4","gravatar_id":"","url":"https://api.github.com/users/lukehutch","html_url":"https://github.com/lukehutch","followers_url":"https://api.github.com/users/lukehutch/followers","following_url":"https://api.github.com/users/lukehutch/following{/other_user}","gists_url":"https://api.github.com/users/lukehutch/gists{/gist_id}","starred_url":"https://api.github.com/users/lukehutch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukehutch/subscriptions","organizations_url":"https://api.github.com/users/lukehutch/orgs","repos_url":"https://api.github.com/users/lukehutch/repos","events_url":"https://api.github.com/users/lukehutch/events{/privacy}","received_events_url":"https://api.github.com/users/lukehutch/received_events","type":"User","site_admin":false},"created_at":"2018-10-01T13:10:04Z","updated_at":"2018-10-01T13:10:04Z","author_association":"NONE","body":"Yes, I think `NONE` is fine.\r\n\r\nThe issues I have hit with a few users of my library (and I have hit it myself) is that older classpath scanners will throw an NPE when they run into the module descriptor. It's not nessicarily true that older scanners will ignore classfiles in META-INF, but the thinking is that that's the best chance you have at putting classfiles somewhere that an older scanner might intentionally not scan. (And some scanners ignore classfiles whose packages don't match their path, which hopefully happens before the NPE or similar is thrown).\r\n\r\n"}}
{"actor":{"display_login":"lukehutch"}}