[
https://issues.apache.org/jira/browse/FLINK-40145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18116031#comment-18116031
]
Martijn Visser commented on FLINK-40145:
----------------------------------------
The Kotlin dependency tree is not the problem. The shaded flink-model-triton
jar copies
kotlin-stdlib-jdk8's META-INF/versions/9/module-info.class into itself and is
marked
Multi-Release: true, so the jar declares itself to be module kotlin.stdlib.jdk8
while bundling all
of kotlin/**. maven-javadoc-plugin reads that descriptor, switches to
--module-path, and javadoc
reports the split against the real kotlin.stdlib.
{code}
[WARNING] kotlin-stdlib-1.8.21.jar, kotlin-stdlib-jdk7-1.8.21.jar,
kotlin-stdlib-jdk8-1.8.21.jar define 1 overlapping classes:
[WARNING] - META-INF.versions.9.module-info
{code}
It started with FLINK-40084 on 2026-07-09, which added the Multi-Release
manifest entry. The last
green build is 76907 of the same day and the first failure is 76959 the day
after.
flink-model-openai survives only because error_prone_annotations happened to
win the same race
there, and its descriptor requires nothing.
Fix is to exclude META-INF/**/module-info.class for all artifacts rather than
only for jackson, as
FLINK-40084 already did for flink-sql-avro. master only: release-2.3 and
release-2.2 do not set
Multi-Release on these modules, and without that manifest entry the versioned
descriptor is never
read.
> flink-model-triton javadoc fails on JDK 11: kotlin.stdlib split-package
> -----------------------------------------------------------------------
>
> Key: FLINK-40145
> URL: https://issues.apache.org/jira/browse/FLINK-40145
> Project: Flink
> Issue Type: Bug
> Components: Library / Machine Learning
> Affects Versions: 2.4.0
> Reporter: Martijn Visser
> Assignee: Martijn Visser
> Priority: Critical
>
> https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=77068&view=results
> (leg: cron_snapshot_deployment_maven)
> {code}
> [ERROR] error: module kotlin.stdlib reads package kotlin.text from both
> kotlin.stdlib.jdk8 and kotlin.stdlib
> ... (repeated for kotlin.system, kotlin.sequences, kotlin.reflect,
> kotlin.ranges,
> kotlin.random(.jdk8), kotlin.properties, kotlin.math)
> [ERROR] Command line was: .../jdk-11.0.19+7/bin/javadoc ...
> {code}
> The snapshot-deployment javadoc build for flink-model-triton fails on JDK 11
> because the
> OpenAI Java client dependency chain pulls kotlin-stdlib-1.9.10 together with
> kotlin-stdlib-jdk8-1.9.10 (via openai-java 1.6.1 / okhttp 4.12.0). On JDK 11
> the javadoc
> tool sees both jars as automatic modules named `kotlin.stdlib` and rejects
> the split
> packages (kotlin.text etc. exported from both). Deps observed on the module
> path:
> kotlin-reflect/stdlib/stdlib-common/stdlib-jdk7/stdlib-jdk8 1.9.10, okhttp
> 4.12.0,
> okio 3.6.0, openai-java(-core/-client-okhttp) 1.6.1, jackson-module-kotlin
> 2.21.3.
> Only bites javadoc generation (snapshot deploy), not compile/test.
> Proposed fix directions (for owner): exclude kotlin-stdlib-jdk7/jdk8 (folded
> into
> kotlin-stdlib since 1.8) so only one kotlin.stdlib module is on the path; or
> skip/relax
> javadoc for flink-model-triton; or exclude these deps from the javadoc
> classpath.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)