Skip to content

Automatic-Module-Name entry missing since release 3.21.12 #12639

@xazap

Description

@xazap

Issue
Any newer release of protobuf-java after 3.21.12 is missing the Automatic-Module-Name entry in the META-INF/MANIFEST.MF file. This prevents using the protobuf module with a stable name instead. Instead, we are forced to the bad practice of using a filename-inferred module name.

Please restore the Automatic-Module-Name entry in the manifest or (alternatively) provide a proper module-info.class in the library.

What version of protobuf and what language are you using?
Versions containing the issue are 3.22.0, 3.22.1, 3.22.2, 3.22.3 and 3.23.0-RC2
Last version to be correct: 3.21.12
Language: Java

What operating system (Linux, Windows, ...) and version?
Irrelevant as issue pertains to the Java Platform Module System.

What runtime / compiler are you using (e.g., python version or gcc version)
Java 17

What did you do?

  1. Add "requires transitive com.google.protobuf;" to the module-info.java of a project using protobuf-java.
  2. Find compilation error due to "com.google.protobuf" cannot be resolved to a module.
  3. Find that the protobuf manifest contains no Automatic-Module-Name since version 3.21.12

What did you expect to see
I expected an Automatic-Module-Name entry in META-INF/MANIFEST.MF. This was last seen in version 3.21.12.

What did you see instead?
I found no Automatic-Module-Name entry in META-INF/MANIFEST.MF.

Note
I reported this before in #12175, which was closed because it was suggested the fix for #12017 would also restore the Automatic-Module-Name entry. However with #12017 fixed the OSGi entries are restored but the Automatic-Module-Name entry is still missing from the manifest.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions