Repository navigation
feat: Maven 命令强制彩色输出,让 Lithe 控制台显示 Maven 的颜色 - #19
Merged
Merged
Conversation
globalArguments 加 -Dstyle.color=always。Lithe 用管道读 Maven 输出,-B 批处理模式下 Maven 默认不输出颜色;带上这个参数后,[INFO]、[WARNING]、[ERROR]、BUILD SUCCESS 会保留 ANSI 颜色,由 Lithe 桌面端解码后着色显示(1lck/Lithe-IDEA#1932,Core outputStyle.decode)。诊断匹配前 Core 已去掉颜色转义;测试结果读 JUnit XML,项目模型和依赖读输出文件,都不受影响。
xiaoyumuxi
marked this pull request as ready for review
November 14, 2026 16:04
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.
关联
outputStyle.decode。改动
plugin.json的invocation.globalArguments加-Dstyle.color=always。Lithe 通过管道读取 Maven 输出,-B批处理模式下 Maven 默认不输出颜色。带上这个参数后,[INFO]、[WARNING]、[ERROR]和BUILD SUCCESS会保留 ANSI 颜色,桌面端解码后着色显示。参数对生命周期、插件目标、自定义目标、测试、运行配置,以及读取模型和依赖的命令都生效。不受影响的部分
build.decodeDiagnostics匹配lineMatcher前会先去掉 CSI 转义(rust/crates/build/src/outputs.rs中的strip_ansi),所以^\[(ERROR|WARNING)\] …仍能匹配。${outputFile},都不经过控制台输出。version.arguments(--version),不带globalArguments。验证
mvn -B -ntp -Dstyle.color=always validate | cat -v):Maven 3.6.3、3.9.4、3.10.0 都输出ESC[1;34mINFO一类转义;不带这个参数时没有转义。node scripts/test-process.mjs、node scripts/package.mjs:通过。node scripts/test.mjs:Maven 3.10.0 和 3.6.3(CI 矩阵中最老的版本)各 14 项全部通过。scripts/verify-scripts.mjs需要--host-bundle指定已安装的 Lithe 程序包,本次没有运行;CI 也不运行它。发版注意