Bug 66438

Summary: Tomcat has broken module-info.class files
Product: Tomcat 10 Reporter: Mike Hearn <mike>
Component: PackagingAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ------   
Hardware: PC   
OS: Mac OS X 10.1   

Description Mike Hearn 2023-01-22 22:21:19 UTC
The module-info.class file in tomcat-embed-core-10.1.5.jar isn't valid and gets rejected by tools like jlink. Decompiling it with fernflower shows why:

open module org.apache.tomcat.embed.core {
    requires jakarta.annotation;
    requires jakarta.ejb-api;
    requires jakarta.mail;
    requires jakarta.persistence-api;
    requires jakarta.xml.rpc-api;
    ...
}

Oops. Those Jakarta module names aren't valid Java identifiers. You are apparently synthesizing a module-info.class file without using javac and it results in something that looks like it complies with JPMS but which doesn't.
Comment 1 Mark Thomas 2023-01-23 19:55:58 UTC
Thanks for the report.

Fixed in:
- 11.0.x for 11.0.0-M3 onwards
- 10.1.x for 10.1.6 onwards