[
https://issues.apache.org/jira/browse/FLINK-25000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17956055#comment-17956055
]
牛一凡 commented on FLINK-25000:
-----------------------------
Hello, I compiled Flink 1.18.1 based on JDK 17.
I've noticed that the main change in this issue is that the final version of
Scala depends on whether the jdk version of the maven environment is JDK17 or
not.
So I understand that I don't need to interfere with the Scala version anymore
to compile correctly. But actually, I'm having this issue:
!image-2025-06-04-16-57-00-421.png!
[ERROR] Failed to execute goal
net.alchim31.maven:scala-maven-plugin:3.2.2:compile (default-cli) on project
flink-annotations: wrap: org.apache.commons.exec.ExecuteException: Process
exited with an error: 1 (Exit value: 1) -> [Help 1]
!image-2025-06-04-16-57-59-449.png!
[ERROR] scalac error: 'jvm-17' is not a valid choice for '-target'
[INFO] scalac -help gives more information
[ERROR] scalac error: bad option: '-target:jvm-17'
The compilation command I used was:
mvn clean install -Dmaven.compiler.source=17 -Dmaven.compiler.target=17
-DskipTests -Dfast -Pskip-webui-build -T 1C
My JDK version is:
java version "17.0.15" 2025-04-15 LTS
Java(TM) SE Runtime Environment (build 17.0.15+9-LTS-241)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.15+9-LTS-241, mixed mode, sharing)
I don't understand why this is happening. Are the changes in this issue valid?
Or am I doing something wrong?
> Scala 2.12.7 doesn't compile on Java 17
> ---------------------------------------
>
> Key: FLINK-25000
> URL: https://issues.apache.org/jira/browse/FLINK-25000
> Project: Flink
> Issue Type: Sub-task
> Components: API / Scala
> Reporter: Chesnay Schepler
> Assignee: Chesnay Schepler
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.18.0
>
> Attachments: image-2025-06-04-16-57-00-421.png,
> image-2025-06-04-16-57-59-449.png
>
>
> Fails with "fails with /packages cannot be represented as URI" during
> compilation.
> 2.12.15 was working fine.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)