Skip to content

feat(windows): support Maven Daemon (mvnd) - #897

Merged
xiaoyumuxi merged 3 commits into
1lck:previewfrom
NickJohnson868:codex/889-windows-mvnd
Oct 16, 2026
Merged

xiaoyumuxi merged 3 commits into
1lck:previewfrom
NickJohnson868:codex/889-windows-mvnd

Conversation

@NickJohnson868

Copy link
Copy Markdown
Contributor

Related to #889

问题与行为

Windows 的 Maven 路径解析原先只识别普通 Maven 的 bin/mvn 启动入口,填写 mvnd 安装根目录时无法找到客户端。本次让现有 Maven 设置、工具链发现及执行解析接受 mvnd 安装根目录、bin 目录和启动文件,继续复用现有 Maven 流程。

改动范围

  • 识别 mvnd.exe、mvnd.cmd、mvnd.bat 和 mvnd;补充 MVND_HOME 和 PATH 自动发现,保留项目 Wrapper、MAVEN_HOME、M2_HOME 及普通 Maven 的既有自动查找优先级。
  • 显式选择 mvnd 后执行其客户端,不替换为发行包内嵌的普通 mvn;无效显式路径仍返回失败。
  • 从版本输出中的 Apache Maven 行提取版本,避免把 Apache Maven Daemon 标题识别为版本。
  • Java 语言服务的全局设置解析支持 mvnd 的 mvn/conf/settings.xml;显式选择普通 Maven 时保留其自身配置。
  • 更新 Maven/mvnd 中英文提示,项目环境自动选择显示“自动”。
  • 增加路径、版本及配置兼容性测试和中文 Agent Note,并同步功能矩阵及生成文档。

共 8 个文件。本 PR 不包含本地搜索功能、Maven 依赖输出预算、依赖树解析等其他修改;没有修改 Skill、CI、下载脚本或依赖版本。macOS 自动发现不在本次范围内。

验证

  • 迁移前相同功能补丁的专项验证:68 项 Core Maven 相关测试、15 项 Windows 宿主相关测试通过;包括显式运行真实 mvnd 安装目录的 ignored 用例。前端类型检查通过。
  • 之前的独立开发目录完成 Windows Release 构建和最小离线 mvnd validate 验证;上述记录属于迁移前验证,不声称当前提交已完整重建。
  • 当前提交已核对:与隔离的 mvnd 补丁一致,git diff --check、针对 upstream/preview..HEAD 的测试稳定性静态检查通过,Agent Notes 与功能矩阵生成校验通过。
  • 当前提交尚未重新完成完整构建、全套测试和 GUI 手动验证,因此以 Draft 提交,功能矩阵的验证状态保持 pending。
  • 先前 Core 全套测试在与本次改动无关的 Git 用例超时;Rust Core 注释检查脚本因本机缺少 Ruby 未完整执行。未宣称这些检查通过。

待完成

  • 确认维护者接受本次功能范围。
  • 补齐当前提交的完整构建及 GUI 路径选择/构建验证后,再转为 Ready for review。

@ghfind-review ghfind-review Bot added the review: low ghfind author score; see https://ghfind.com label Sep 25, 2026

@xiaoyumuxi xiaoyumuxi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审核结论

基于 ba217ca9ad431bc53ee179e5f5bde0cdc66577d9 的完整 8 文件 diff,并追踪 Windows 工具链发现、无进程导入解析、实际启动解析和 Core 的 JDT 全局设置路径,暂未发现本次改动引入的确定性阻塞问题。此结论不等于 Windows 实机功能已验收;建议维持 Draft,补齐当前提交的目标平台验证后再转 Ready。

已检查的关键行为

  • 显式配置的根目录、bin 目录和启动文件复用同一个候选生成器;选中 mvnd 时不绕到发行包内嵌的普通 Maven,无效显式路径仍返回失败。
  • 自动候选顺序仍先考虑项目 Wrapper、MAVEN_HOME/M2_HOME 和 PATH 中的普通 Maven,再补充 MVND_HOME 与 PATH 中的 mvnd;发现结果没有额外排序打乱该顺序。
  • Maven 版本解析跳过 Apache Maven Daemon 标题;Core 对 mvnd 选择 mvn/conf/settings.xml,对显式普通 Maven 保留自己的全局配置,并覆盖嵌入式 settings 缺失时不误用 daemon 根目录配置的测试。
  • 新增默认单测使用临时目录和假启动文件,发现测试注入 probe,不依赖真实工具;中英文文案和平台功能矩阵生成视图已同步,验证状态保持 pending。

非阻塞建议与验收缺口

  1. 补充 MVND_HOME/PATH 自动发现与既有 Maven/Wrapper 优先级的确定性回归测试。当前新增测试主要覆盖显式配置,不能单独证明新增的环境变量发现分支和自动回退顺序;见第一条 inline。
  2. 保留现有“不启动 daemon”的路径集成测试,同时单独补充 Windows 上真正调用 mvnd 的受控构建验证。该 ignored 用例只检查路径存在和解析结果,不能替代实际客户端执行、全局设置生效或 JDT 导入验证;见第二条 inline。

本提交的 CI 与验证边界

已查询此 head,返回的 6 个 Actions 工作流均为 completed/success。进一步检查 Windows CI 的 job/step:Test shared Rust Core、Test Windows Rust host、前端类型检查和前端测试均成功,但 Test real JDT on Windows 为 skipped。因此当前已有本提交的 CI 测试证据,不应再只引用迁移前分支的通过记录;同时也不能把 CI 总体成功理解为真实 JDT/mvnd 端到端已经通过。

本轮没有本地运行 Cargo/Bun、启动真实 mvnd/JDT LS 或进行 Windows GUI 验证;以上为代码审查与实际 CI 记录核对。本次仅提交 Review 评论,不批准、不合并,也不改变 Draft 状态。

Comment thread windows/tauri/src-tauri/src/run.rs Outdated
}
}
if let Some(home) = std::env::var_os("MVND_HOME") {
executables.extend(custom_maven_executable_candidates(Path::new(&home)));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

非阻塞测试建议:新增的 mvnd_paths_resolve_consistently_for_import_discovery_and_execution 始终传显式路径,并向 discover_maven_candidates 直接提供候选,因此没有执行这里的 MVND_HOME/PATH 自动发现分支。建议通过可注入的环境/候选来源,或隔离子进程,覆盖“仅 MVND_HOME”“仅 PATH mvnd”“普通 Maven 与 mvnd 并存”“有效 Wrapper 优先”和“无效 MVND_HOME 回退”,并断言无进程导入解析与启动解析选中同一个客户端。避免在并行单测中直接修改进程级 PATH/MVND_HOME。当前代码的候选顺序看起来符合既有优先级;这里建议补的是防回归证据,不是已确认的顺序错误。

Comment thread windows/tauri/src-tauri/src/run.rs Outdated

#[test]
#[ignore = "integration: requires LITHE_TEST_MVND_HOME pointing to a real distribution"]
fn mvnd_installed_distribution_resolves_without_spawning_a_daemon() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

验收边界建议:这个测试名称准确表达了“不启动 daemon”,实际也只检查文件存在以及 home/bin/executable 的解析一致性;即使客户端无法运行或构建读取了错误的设置,它仍可能通过。建议保留此轻量测试,另设显式启用的 Windows 进程级用例或记录当前 head 的实机验收:使用独立临时项目、daemon registry 和本地仓库,设置执行超时,真正通过解析结果运行最小构建,并核对预期的全局设置生效。清理只针对该测试拥有的 daemon/资源,不要影响用户其它构建。当前 Windows CI 的真实 JDT job 被跳过,JDT 全局配置的端到端验证也应单独补齐;不把现有路径测试或迁移前的实测视作已覆盖。

@1lck

1lck commented Sep 26, 2026

Copy link
Copy Markdown
Owner

@NickJohnson868 同步一下:#890 的根本修复在 #908,由我们这边完成。它和本 PR 的 mvnd 支持是独立的两件事,本 PR 仍然需要继续推进。

需要留意的一点:两个 PR 都修改了 rust/lithe-core/src/project/maven.rs。#908 改的是 dependency_plan,并把依赖树解析移到新模块 maven_dependency_tree.rs;本 PR 改的是 conf/settings.xml 的定位逻辑,不重叠。后合入的一方可能需要做一次简单的 rebase。

另外,#908 之后依赖树由插件通过 -DoutputFile 写入文件,不再从控制台输出解析,所以 mvnd 的控制台格式差异不会再影响依赖树。

Resolve explicit mvnd installations and automatic candidates consistently for execution and Maven import. Read embedded Maven settings and versions, support macOS aliases and cache invalidation, and cover both platforms with regression fixtures and tests. Refs 1lck#889.
@xiaoyumuxi
xiaoyumuxi marked this pull request as ready for review October 16, 2026 04:02
@xiaoyumuxi
xiaoyumuxi merged commit b881b61 into 1lck:preview Oct 16, 2026
20 checks passed
1lck added a commit that referenced this pull request Oct 16, 2026
* 统一 Problems 面板样式、图标与源码预览 (#1231)

* 统一 Problems 面板样式、图标与源码预览

* 修复 Agent 活动面板测试对桌面键盘焦点的依赖

* 修复活动面板测试因窗口对象地址复用产生的误判

* 修复 Problems 审核反馈中的标签范围、预览动作和本地化问题

* 修复 Run 加载就绪竞态并显式控制快照回归测试

* fix(settings): 设置对话框入场结束后清理 filter,避免整层模糊 ([#1229](#1229)) (#1236)

Windows 设置对话框的入场动画会让 motion 把插值终值保留成常驻 inline 样式
`filter: blur(0px)`,整个弹窗因此一直处在滤镜合成层里;该层不做子像素抗锯齿

- utils/motion.ts:新增 overlayEntranceSelfClearing,保留 blur(2px)→blur(0px)
  入场,用 transitionEnd 在动画结束后把 filter 覆盖成 none
- ui/dialog.tsx:新增 clearEntranceFilter(默认 false,其它对话框行为不变),
  减少动效分支直接使用 filter: none,不依赖 transitionEnd
- settings-dialog.tsx:设置对话框启用 clearEntranceFilter
- 功能矩阵 application-settings:补充 dialog.tsx 与 motion.ts 证据、决策说明,以及 125%/150% 缩放下的实机验证方式

没有在报障机器上验证过,若仍然整层发虚,需要回到显示缩放比与 WebView2 缩放路径继续排查

* fix(macos): 统一 Git Log Worktrees 共享样式 (#1222)

* fix(macos): unify Git Log Worktrees shared styles

* fix(macos): preserve worktree selection at keyboard bounds

Skip duplicate selection callbacks and recompute document height when row counts change at the same width. Cover both review findings with native regression tests.

* test(macos): stabilize agent activity popup lifecycle

* test(run): explicitly release deferred workspace snapshots

* fix(agent): allow HTTP endpoints for imported providers (#1251) (#1253)

* 修复 Codex 已是最新版时仍显示更新按钮 (#1217)

* 修复 Codex 已是最新版时仍显示更新按钮

* 修复 Agent 状态契约测试对可选更新字段的校验

* 修复 Codex 更新探测输入兼容性并保留旧版本升级指引

* 修复 Agent 活动菜单测试的布局同步与弹窗归属判断

* 固定 Run 入口测试的快照发布顺序并清理测试工作区

* 为 Windows 原生冲突跳过集成测试设置独立有界预算

* 限定 Homebrew 更新状态并按界面语言显示 Agent 预检文案

* fix(agent): align Codex update checks with latest release

* test(macos): retain popup dismissal and layout readiness gates

* test(windows): await installer descendant termination

* test(windows): return success after observed process exit

---------

Co-authored-by: Yao Jingxi <23722032@bjtu.edu.cn>

* Merge pull request #1220 from 1lck/codex/debug-console-parity

完善 Debug 面板、JSON 变量查看与 JVM 性能监控

* fix(editor): publish undo content changes to the save pipeline (#1235)

The document pipeline subscribed to editor.onDidChangeModelContent
and read EditorModelSource.lastChange. On the undo/redo path Monaco
delivers the editor-level event before the source's own model
subscription updates lastChange, so the pipeline republished the
pre-undo document. The store saw identical content, kept the buffer
clean, and both auto-save and manual save skipped the write - the
file on disk kept the undone edits while the editor showed them
reverted, which the Git status panel then reported as pending
changes (#1129).

Subscribe the pipeline to the model instead, registered after the
source: model listeners run in registration order, so lastChange is
always fresh. Add regression tests covering the undo bookkeeping
(ancestor alternativeVersionId) at the model-source level.

Co-authored-by: Lichenkang <2188718831@qq.com>

* feat(windows): support Maven Daemon (mvnd) (#897)

* feat(windows): support Maven Daemon (mvnd)

Relates to #889

* feat(java): support mvnd on Windows and macOS

Resolve explicit mvnd installations and automatic candidates consistently for execution and Maven import. Read embedded Maven settings and versions, support macOS aliases and cache invalidation, and cover both platforms with regression fixtures and tests. Refs #889.

---------

Co-authored-by: Yao Jingxi <23722032@bjtu.edu.cn>

* feat(windows): 编辑器字体新增内置 JetBrains Mono (#1254)

随包分发 @fontsource/jetbrains-mono(styles.css 引入 400/500/600/700 四个字重);字体选择器的内置候选列表与字体 store 的无桥回退目录加入 JetBrains Mono,可在设置 → 编辑器中选择;默认等宽字体仍是 Geist Mono,未做任何默认值迁移;同步更新编辑器字体能力记录的 Windows 说明与验收项。

* fix: AutoBuild 安装为 Lithe-Dev 并隔离正式版设置与缓存 (#1255)

* fix: isolate Lithe-Dev identity and runtime state from stable

* fix: import Stable settings once into isolated Dev profiles

* fix: preserve native profile settings and independent Dev startup

* test: compare Maven settings as native paths on Windows

* ci: route heavy macOS validation to shared Mac mini runners (#1258)

* chore(ci): remove the in-repository PR review workflow (#1265)

PR reviews now run in the external Lithe review bot. The workflow fired on
every PR comment (about 40 skipped runs a day) and duplicated the bot's
response to @lithe review.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(macos): 编辑器字体等宽判断改为只看实测字宽 (#1263)

* fix(macos): measure editor font advances instead of trusting the monospace trait

Lantinghei TC declares the monoSpace symbolic trait while its Latin glyphs are
proportional, so the editor font picker offered it as a programming font.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(matrix): record measured monospace detection for editor fonts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* ci: macOS CI 按空闲池动态分配 runner,Mac mini 增量编译 (#1262)

* ci: route macOS lanes to the free pool and build incrementally on Mac minis

- Choose the Mac mini or hosted pool per lane in the classify job from the
  repository's active jobs; pushes and manual runs stay on the Mac minis, and
  API failures fall back to the previous fixed routing.
- Keep each Mac mini runner's .build, rust/target, and verified download
  stores between jobs (checkout clean: false plus a scoped git clean), discard
  them on toolchain changes or size/disk limits, and skip GitHub cache there.
- Run the Swift-linked Rust Core bridge checks in the Swift tests job on its
  existing build; the Rust Core job now runs only Rust checks.
- Classify both endpoints of renames instead of selecting every lane.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: keep Swift tests on hosted runners until Mac minis keep a display session

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: prefer Mac mini runners that keep the matching build configuration

Debug lanes (Swift, plugin, Rust Core tests) prefer runners labeled
lithe-mac-mini-debug and packaging prefers lithe-mac-mini-release, so each
runner's kept build outputs match its next job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(ci): disable automatic gc in the classifier fixture repository

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* ci: run only post-merge-observable checks after merge and pin the Xcode SDK (#1268)

- Pushes to preview build only the universal package when the merge touched
  packaged content; Windows CI no longer runs on preview pushes.
- Pull requests from preview into main rerun no lane; macOS CI requires that
  the same commit already passed as a preview push.
- Pushes to main trigger no CI (Plugin, Database, matrix, issue automation).
- Self-hosted runners pin SDKROOT to the selected Xcode's SDK: the Mac minis'
  Command Line Tools SDK 27 broke linking the x86_64 slice.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(windows): specify bootstrap plugin configuration type (#1270)

* chore(ci): move issue claiming to the lithe-bot-console bot (#1269)

The "Lithe issue claim" workflow ran on every issue and pull request comment
(about 30 runs a day, most of them skipped) plus a daily schedule. The
self-hosted lithe-code-review App now handles /assign, /unassign and the daily
stale-claim sweep with the same rules and comment markers.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: arkleselect <166632698+arkleselect@users.noreply.github.com>
Co-authored-by: haloneko <bitbad@qq.com>
Co-authored-by: Xiaoyumuxi <23722032@bjtu.edu.cn>
Co-authored-by: Y.Hill <3046829330@qq.com>
Co-authored-by: Nick Johnson <63852938+NickJohnson868@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: low ghfind author score; see https://ghfind.com

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants