markstar 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -1
- package/package.json +1 -1
- package/skills/maven-pilot/SKILL.md +28 -0
package/README.md
CHANGED
|
@@ -15,7 +15,21 @@ npx markstar
|
|
|
15
15
|
| 技能 | 命令 | 说明 |
|
|
16
16
|
|------|------|------|
|
|
17
17
|
| **data-to-chart** | `/data-to-chart` | 智能图表生成,自动选择 ECharts 图表类型并生成可交互 HTML。支持大屏/仪表盘模式。 |
|
|
18
|
-
| **maven-pilot** | `/maven-pilot` | Maven
|
|
18
|
+
| **maven-pilot** | `/maven-pilot` | Maven 依赖冲突检测与自动修复。检测 → AI 分析 → diff 预览 → 用户确认 → 修改 pom.xml → 编译验证。零第三方依赖。 |
|
|
19
|
+
|
|
20
|
+
## maven-pilot 使用示例
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
/maven-pilot check # 只检测,不修复
|
|
24
|
+
/maven-pilot fix # 检测 + 修复全量冲突
|
|
25
|
+
/maven-pilot 帮我看看有没有冲突 # 自然语言
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**特点:**
|
|
29
|
+
- 基于 Maven 内置 `dependency:tree`,不需要额外插件
|
|
30
|
+
- 修复方式:`<dependencyManagement>` 锁定版本或 `<exclusion>` 排除传递依赖
|
|
31
|
+
- 安全约束:不升级大版本、不改源代码、diff 预览 + 用户确认、修复后编译验证
|
|
32
|
+
- 编译失败自动回滚
|
|
19
33
|
|
|
20
34
|
## 卸载
|
|
21
35
|
|
package/package.json
CHANGED
|
@@ -132,3 +132,31 @@ description: Maven 依赖冲突检测与自动修复。检测当前项目的依
|
|
|
132
132
|
3. **等待用户确认:** "以上是 pom.xml 的修改方案,确认 apply 吗?(yes/no)"
|
|
133
133
|
4. **用户确认后** → 使用 Edit 工具修改 pom.xml
|
|
134
134
|
5. **用户拒绝** → "修复已取消,未做任何修改"
|
|
135
|
+
|
|
136
|
+
#### Step 5: 输出修复结果
|
|
137
|
+
|
|
138
|
+
修改完成后汇总输出:
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
修复完成,共处理 2 个冲突:
|
|
142
|
+
|
|
143
|
+
1. com.google.guava:guava
|
|
144
|
+
- 方式:dependencyManagement 锁定 30.1-jre
|
|
145
|
+
- 文件:pom.xml(新增 <dependencyManagement> 节)
|
|
146
|
+
|
|
147
|
+
2. org.slf4j:slf4j-api
|
|
148
|
+
- 方式:排除传递依赖(org.apache.zookeeper → slf4j 1.7.25)
|
|
149
|
+
- 文件:pom.xml(在 zookeeper 依赖上加 <exclusion>)
|
|
150
|
+
|
|
151
|
+
git diff 预览:
|
|
152
|
+
(展示最终 diff)
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
#### Step 6: 编译验证
|
|
156
|
+
|
|
157
|
+
修复完成后运行 `mvn compile` 验证项目仍可编译通过:
|
|
158
|
+
|
|
159
|
+
- **编译成功** → "编译通过,修复无副作用。"
|
|
160
|
+
- **编译失败** → 输出错误信息,分析是否与修复相关:
|
|
161
|
+
- 与修复相关 → 回滚修改,输出 "修复导致编译错误,已回滚。建议手动排查冲突。"
|
|
162
|
+
- 与修复无关 → "编译失败但非修复导致,可能存在存量问题。"
|