Repository navigation
feat(maven): 编译和启动统一使用项目 JDK,去掉单独的 JDK (JAVA_HOME) 构建选项 - #38
Merged
Merged
Conversation
Lithe 已按 java 运行时(项目 JDK、JAVA_HOME、PATH)把 JDK 作为 JAVA_HOME 传给 Maven,运行应用也用同一个 JDK。构建选项里的 JDK (JAVA_HOME) 是第二个 JDK 来源: 设成与项目 JDK 不同的版本时,编译和启动用的 JDK 不同,会出现 UnsupportedClassVersionError。去掉它,与 IntelliJ IDEA 的单一项目 SDK 一致; 以前保存的值由宿主列出并提供清除。 Refs 1lck/Lithe-IDEA#2203 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue
改动
构建选项里的
JDK (JAVA_HOME)只影响运行mvn时的环境,运行应用用的却是工具链里的项目 JDK(RunPreparation返回{"kind":"toolchain","value":"java"})。两者设成不同版本时,会出现 21 编译、17 启动,报UnsupportedClassVersionError。IntelliJ IDEA 只有一个项目 SDK,编译和运行都用它。plugin.json删除javaHome选项。Maven 用的 JDK 仍按invocation.runtimeDependencies的java解析:依次是项目 JDK(工具链)、JAVA_HOME、PATH上的java,由宿主作为JAVA_HOME传给 Maven,运行应用也用同一个 JDK。docs/feature-matrix.md的java-maven-project-settings改为五个构建选项,验收步骤增加“切换项目 JDK 后,编译和启动都使用新的 JDK”。兼容性:删除选项不会导致任何已发布的宿主拒绝清单。以前保存的
javaHome会被 Core 列进droppedOptions,不再生效。新版宿主会在构建选项对话框里列出它,并提供清除(Lithe-core-rust#123 和配套桌面 PR)。验证
node scripts/package.mjs、node scripts/test.mjs:35 项通过。剩下的profiles become choices of the Profiles option失败是已有问题 test: scripts/test.mjs 的主模型用例读取本机 ~/.m2/settings.xml,本机有 profile 时失败 #36(测试读取了本机~/.m2/settings.xml),与本改动无关。🤖 Generated with Claude Code