elharo opened a new pull request, #890: URL: https://github.com/apache/maven-shade-plugin/pull/890
## Problem `ModuleInfoConfigurationTest.mergesExplicitAndAutomaticModuleBoundariesWhenRequested` fails when the analysis JDK is JDK 9-15 (issue #889): ``` Cannot infer module requirements for automatic module automatic.module ... retained class automatic.api.PublicType references java.lang.Object, which is not present in the shaded output, any resolved dependency, or the Java 9 platform represented by .../jdk-11 ``` Those JDKs use the legacy `ct.sym` layout, where class signatures omit the module directory and module descriptors live under `<release>-modules`: ``` 9A/java/lang/Object.sig 9-modules/java.base/module-info.sig ``` `PlatformModuleIndex` assumed the module-prefixed layout used by newer JDKs, so it parsed `9A/java/lang/Object.sig` as module `java`, class `lang/Object`, and `java.lang.Object` was never indexed. ## Fix - Detect the legacy `ct.sym` layout. - Read module descriptors from `<release>-modules`, stripping the suffix before parsing the release set. - Map legacy class signatures to their owner module using the packages exported by the historical module descriptors, falling back to the current JDK's jmods. - Read current-release classes before historical ones so that fallback is available. ## Testing - Added `PlatformModuleIndexTest.indexesLegacyHistoricalPlatformOwnership`, including a module that no longer exists in the current JDK. - `mvn verify -DskipITs` passes on JDK 11 and JDK 17 (126 tests). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
