Repository navigation
feat(maven): 模型报告 Settings File 与 Local Repository 的实际值 - #37
Merged
Merged
Conversation
扩展在 litheBuildModel 的 optionDefaults 中报告不传参数时 Maven 实际使用的 用户设置文件(~/.m2/settings.xml)和本地仓库(本次读取的设置中的 <localRepository>,没有时为 ~/.m2/repository),对应 IntelliJ IDEA Maven 设置里 PathOverrider 灰显的默认值。宿主据此显示“覆盖”复选框;旧宿主忽略 这两项,所以清单不变、兼容所有已发布的桌面版本。 Refs 1lck/Lithe-IDEA#2152 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1lck
marked this pull request as ready for review
November 19, 2026 12:42
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
改动
IDEA 的 Maven 设置里,用户设置文件和本地仓库在没有覆盖时灰显 Maven 实际使用的路径(
PathOverrider,取值规则见MavenUtil.resolveUserSettingsPath/resolveLocalRepository)。Lithe 宿主已经支持(Lithe-core-rust#120、#121,1lck/Lithe-IDEA#2210):模型为文本、文件、目录选项报告的optionDefaults会作为implicitValue显示,并配有“覆盖”复选框。本 PR 让 Maven 扩展报告这两个值:settingsFile:~/.m2/settings.xml,即 Maven 默认的用户设置文件。localRepository:本次读取的设置(用户设置文件,然后是全局设置)中的<localRepository>,没有时为~/.m2/repository。用户用 Settings File 覆盖了设置文件时,本地仓库跟随被覆盖的文件,与 IDEA 一致。optionDefaults现在总是输出;没有默认激活的 profile 时,不再包含profiles键。清单没有变。旧 Core 只接受
choicesFromModel选项的optionDefaults,会静默丢弃这两项,所以兼容所有已发布的桌面版本。选项的description和中文名会让旧 Core 拒绝整个清单,要等包含 Core #120 的桌面版发布后再加。验证
node scripts/package.mjs、node scripts/test.mjs(macOS arm64,本机 Maven):新增用例the model reports the settings file and local repository Maven uses通过;已有用例改为只断言optionDefaults.profiles。共 35 项通过。profiles become choices of the Profiles option本机失败,是已有问题:主模型用例读取了本机~/.m2/settings.xml中的 profile,与本改动无关,已提交 test: scripts/test.mjs 的主模型用例读取本机 ~/.m2/settings.xml,本机有 profile 时失败 #36。CI 机器上没有用户设置,不受影响。docs/feature-matrix.md的java-maven-project-settings补充了实际值说明。🤖 Generated with Claude Code