From f12a5bcb51adb45cbf0deeaafea7f68b50f04606 Mon Sep 17 00:00:00 2001 From: Yao Jingxi <23722032@bjtu.edu.cn> Date: Sun, 15 Nov 2026 00:01:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Maven=20=E5=91=BD=E4=BB=A4=E5=BC=BA?= =?UTF-8?q?=E5=88=B6=E5=BD=A9=E8=89=B2=E8=BE=93=E5=87=BA=EF=BC=8C=E8=AE=A9?= =?UTF-8?q?=20Lithe=20=E6=8E=A7=E5=88=B6=E5=8F=B0=E6=98=BE=E7=A4=BA=20Mave?= =?UTF-8?q?n=20=E7=9A=84=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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,项目模型和依赖读输出文件,都不受影响。 --- README.md | 1 + io.github.lithe-idea.maven-build/plugin.json | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index b2c4bc3..e6180ad 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ | 自定义目标 | “Run Maven Goal…” 输入任意目标和参数 | | 测试 | 运行模块、测试类或单个方法,读取 Surefire/Failsafe 的 JUnit XML 报告 | | 诊断 | 把编译输出中的 `[ERROR]`/`[WARNING] 文件:[行,列]` 显示为问题 | +| 彩色输出 | 每条 Maven 命令都带 `-Dstyle.color=always`,即使输出不是终端也保留 Maven 的颜色;Lithe 的构建、运行和测试控制台按颜色显示 `[INFO]`、`[WARNING]`、`[ERROR]` 和 `BUILD SUCCESS`,匹配诊断前会先去掉颜色转义 | | 依赖 | 显示整个反应堆或单个模块的依赖树(含作用域和传递依赖),反应堆内未安装的兄弟模块也能解析 | | 同步 | `pom.xml`、`.mvn/maven.config`、`.mvn/extensions.xml` 变化后重新读取项目 | diff --git a/io.github.lithe-idea.maven-build/plugin.json b/io.github.lithe-idea.maven-build/plugin.json index 39a57f9..97e7154 100644 --- a/io.github.lithe-idea.maven-build/plugin.json +++ b/io.github.lithe-idea.maven-build/plugin.json @@ -55,6 +55,7 @@ "globalArguments": [ "-B", "-ntp", + "-Dstyle.color=always", "${optionArguments:profiles}", "${optionArguments:settingsFile}", "${optionArguments:localRepository}",