Repository navigation
Backlog
Labels
documentationImprovements or additions to documentationinternalNothing to be added to CHANGELOG, only internal storywindowsspecific for Microsoft Windows OS
Description
Context
Building the documentation module (ide-doc) fails on Windows when Maven runs on JDK 27. On JDK 25 and on Linux/macOS it still works, which is why CI stays green. Contributors on Windows with a current JDK, though, can't build the docs or run a full build from the root folder.
Description
Observed (mvn compile in documentation):
[ERROR] Failed to execute goal org.asciidoctor:asciidoctor-maven-plugin:3.2.0:process-asciidoc (generate-doc) on project ide-doc: ... java.lang.ExceptionInInitializerError: null
...
Caused by: java.lang.ClassCastException: class jdk.internal.foreign.layout.ValueLayouts$OfIntImpl cannot be cast to class java.lang.foreign.ValueLayout$OfLong
at com.sun.security.auth.module.UnixSystem.<clinit> (UnixSystem.java:84)
at org.jruby.platform.UnixPlatform.<init> (UnixPlatform.java:46)
at org.jruby.platform.Platform.initPlatform (Platform.java:140)
at org.jruby.platform.Platform.<clinit> (Platform.java:43)
...
at org.asciidoctor.jruby.internal.JRubyAsciidoctor.createRubyRuntime (JRubyAsciidoctor.java:120)
Expected: the module builds on Windows with JDK 27 and generates IDEasy.pdf.
Steps to reproduce:
- Use Windows with Maven running on JDK 27.
- Run
mvn compilein thedocumentationfolder.
Root cause:
documentation/pom.xmladdsorg.jruby:jruby-complete:${jruby.version}(9.2.6.0) as a dependency ofasciidoctor-maven-plugin. It comes first on the plugin classpath and overrides JRuby 9.4.12.0, which asciidoctorj 3.0.0 (used by plugin 3.2.0) already brings.- JRuby 9.2.6 initializes
Platform.INSTANCEbeforeIS_WINDOWSis set. So on Windows it always picksUnixPlatform, which loadscom.sun.security.auth.module.UnixSystemvia reflection. - Up to JDK 25, loading that class on Windows fails with a regular exception. JRuby catches it and falls back to
UnsupportedPlatform. - JDK 27 implements
UnixSystemwith the FFM API. Its static initializer casts the Clonglayout toValueLayout.OfLong, which fails on Windows becauselongis 32-bit there. The resultingExceptionInInitializerErroris not caught by JRuby.
Proposed fix: remove the jruby-complete plugin dependency and the jruby.version property, so the plugin uses the JRuby version that asciidoctorj brings. JRuby 9.4 no longer has this platform detection code.
Related & Notes
- Affected file:
documentation/pom.xml - The pin was added in #815: decouple from docgen and fix ant adoc processing #949 (for Links within IDEasy.pdf generally do not work #815), when the project still used
asciidoctor-maven-plugin1.6.0. It was kept when the plugin was bumped to 3.2.0 in Bump org.asciidoctor:asciidoctor-maven-plugin from 1.6.0 to 3.2.0 #1161. - Verified locally on Windows: with the pin removed, the module builds on both JDK 27 and JDK 25. The generated
IDEasy.pdfhas the same size as with the old pin (4,865,528 bytes). - Workaround until this is fixed: skip the docs with
-Dasciidoctor.skip=true, exclude the module with-pl '!documentation', or run Maven on JDK 25. - Another local-only failure caused by JDK 27: AgyTest fails locally #2925
- Out of scope: upgrading
asciidoctorj-pdf(still1.5.0-alpha.18).
Acceptance Criteria
-
documentation/pom.xmlno longer pinsjruby-completeand no longer definesjruby.version -
mvn compileindocumentationsucceeds on Windows with JDK 27 -
mvn compileindocumentationstill succeeds on JDK 25, and CI is green -
IDEasy.pdfis still generated, with unchanged content
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationinternalNothing to be added to CHANGELOG, only internal storywindowsspecific for Microsoft Windows OS
Type
Projects
- StatusShow more project fields🆕 New
Activity