Bug
Multi-release JAR detection is broken on Windows because File.separatorChar is used to build the path prefix, but FileSetManager.getIncludedFiles() always returns forward-slash paths regardless of the operating system.
Location
AbstractJarMojo.java:248-249:
p -> p.startsWith("META-INF" + File.separatorChar + "versions" + File.separatorChar)
On Windows, File.separatorChar is \, so the prefix becomes META-INF\versions\, which never matches the forward-slash paths returned by FileSetManager (e.g. META-INF/versions/9/module-info.class).
Effect
The Multi-Release: true manifest entry is never added for multi-release JARs when the build runs on Windows. The JAR is still created but lacks the manifest entry, so the JVM will not use versioned classes from META-INF/versions/.
Fix
Replace File.separatorChar with the forward slash character "/". JAR paths always use forward slashes per the JAR specification, and FileSetManager normalizes to forward slashes on all platforms.
Bug
Multi-release JAR detection is broken on Windows because
File.separatorCharis used to build the path prefix, butFileSetManager.getIncludedFiles()always returns forward-slash paths regardless of the operating system.Location
AbstractJarMojo.java:248-249:On Windows,
File.separatorCharis\, so the prefix becomesMETA-INF\versions\, which never matches the forward-slash paths returned byFileSetManager(e.g.META-INF/versions/9/module-info.class).Effect
The
Multi-Release: truemanifest entry is never added for multi-release JARs when the build runs on Windows. The JAR is still created but lacks the manifest entry, so the JVM will not use versioned classes fromMETA-INF/versions/.Fix
Replace
File.separatorCharwith the forward slash character"/". JAR paths always use forward slashes per the JAR specification, andFileSetManagernormalizes to forward slashes on all platforms.