Skip to content

feat(maven): 声明 Maven 运行配置类型、启动前任务与设置搜索关键词 - #35

Merged
1lck merged 1 commit into
mainfrom
feat/run-config-types-and-setting-regions
Nov 19, 2026
Merged

1lck merged 1 commit into
mainfrom
feat/run-config-types-and-setting-regions

Conversation

@1lck

@1lck 1lck commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

PR 类型

  • feat(纯声明式清单与本地化翻译跟进新版插件 UI 契约)

改动功能点明细

  1. io.github.lithe-idea.maven-build/plugin.json:
    • 在 requires 中新增声明 "runConfigurationTypes": 0 与 "beforeLaunchTasks": 0。
    • 在 buildSystems[0].runConfigurationTypes 中新增声明式任务运行配置类型 maven(displayName: "Maven"、icon: icons/maven.svg、execution: "task"),包含 goals(命令行参数)、profiles(-P)、skipTests(-DskipTests)、offline(-o)四个表单字段。
    • 在 buildSystems[0].beforeLaunchTasks 中新增启动前任务 goal(displayName: "Run Maven Goal"、icon: icons/maven.svg),包含 goals 参数字段。
    • 新增 settingRegions 声明:
      • build(page.buildSystemID = "maven"):mvn、mvnw、Maven Wrapper、MAVEN_HOME、pom.xml、settings.xml、localRepository、.m2、profiles、dependencies。
      • compiler(page.compilerID = "maven"):maven-compiler-plugin、javac、release、source、target、encoding。
  2. io.github.lithe-idea.maven-build/l10n/zh-Hans.json:
    • 补充契约 v1 $schema 声明。
    • 补齐之前缺失的 settings.mavenExecutable(“Maven 程序”)与 sections.Maven 中文翻译。
    • 新增 settingRegions.build.keywords、settingRegions.compiler.keywords 中文搜索关键词,以及 runConfigurationTypes.maven.maven(Maven)和 beforeLaunchTasks.maven.goal(运行 Maven 目标)全套字段翻译。
  3. scripts/test.mjs:
    • 新增检查步骤 the manifest declares Maven task run configurations, before-launch tasks and setting regions,校验新增能力声明、表单字段、设置区域与中文翻译词条。
  4. docs/feature-matrix.md:
    • 更新 java-maven-project-settings 并新增 maven-task-run-configurations 条目与验证证据。

申请能力、权限与日志说明

  • 新增 / 升级能力:新增 requires.runConfigurationTypes: 0、requires.beforeLaunchTasks: 0;未申请新权限。
  • 日志事件说明:本次为纯声明式清单与翻译扩展,未改动 Maven 扩展或设置/构建提供者 Java 源码,未新增日志事件。
  • 契约与仓库归属:针对 Lithe-IDEA/Lithe-core-rust 提交 9dea6aa6eaaf830c3568b647aa7daae5018b9727 校验;所有功能矩阵(docs/feature-matrix.md)、翻译(io.github.lithe-idea.maven-build/l10n/zh-Hans.json)和测试(scripts/test.mjs)均在本插件仓库内维护,对 Lithe 宿主零依赖。

本机已运行的验证(macOS arm64)

  • node scripts/test-process.mjs:9/9 通过
  • node scripts/package.mjs:通过(生成 dist/maven-build-1.0.1-{darwin,linux,windows}.zip)
  • node --test --test-timeout=60000 scripts/package/*.test.mjs:3/3 通过
  • node scripts/test.mjs(使用临时空白 <settings/> 通过 MAVEN_ARGS 隔离本机个人 ~/.m2/settings.xml 全局 ali/nexus profile 后运行真实 Maven 3.9.14 集成测试):全部通过(含本次新增清单与中文翻译检查)
    • 注:未隔离本机个人 ~/.m2/settings.xml 时,原 profiles become choices of the Profiles option 用例会读到本机用户的 ali/nexus profile,属于本机环境差异。
  • JSON Schema(plugin-manifest.schema.json、plugin-l10n.schema.json)、Core 语义校验(plugins.settings.catalog、plugins.declarative.settingsState、runConfig.configurationTypes、runConfig.editorForm)与 Viva 无头运行配置/设置界面预览均通过。
  • 尚未原生验证的平台:Windows 与 Linux 原生集成与 UI 交互仍待 CI 及实机验证。

@1lck
1lck marked this pull request as ready for review November 19, 2026 06:22
@1lck
1lck merged commit d8eda74 into main Nov 19, 2026
11 checks passed
@1lck
1lck deleted the feat/run-config-types-and-setting-regions branch November 19, 2026 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant