Skip to content

Commit 1c64efd

Browse files
alexvanackerclaude
andcommitted
fixup! feat: add Maven (mvn) command support with 7 subcommands (rtk-ai#338)
fixup! feat: add Maven (`mvn`) command support with 7 subcommands (rtk-ai#338) Address PR rtk-ai#368 review comments: - Fix multi-module test accumulation (aggregate vs per-class lines) - Tighten test name heuristic (exclude stack traces and error messages) - Add Failsafe warning for `integration-test` deferred reporting - Extract `run_mvn_filtered` helper (eliminate ~280 lines of duplication) - Fix 6-part classifier coordinate parsing in dependency:tree - Fix over-broad `Building ` noise filter (preserve jar/war lines) - Replace raw byte indexing with safe `strip_prefix` - Add mvnd detection and discovery rules - Add missing subcmd_savings (package, install, integration-test) Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 26232db commit 1c64efd

File tree

2 files changed

+251
-307
lines changed

2 files changed

+251
-307
lines changed

src/discover/rules.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub const PATTERNS: &[&str] = &[
4545
r"^go\s+(test|build|vet)",
4646
r"^golangci-lint(\s|$)",
4747
// Maven
48-
r"^(\.\/mvnw|mvnw|mvn)\s+",
48+
r"^(\.\/mvnw|mvnw|mvnd|mvn)\s+",
4949
// AWS CLI
5050
r"^aws\s+",
5151
// PostgreSQL
@@ -337,13 +337,16 @@ pub const RULES: &[RtkRule] = &[
337337
// Maven
338338
RtkRule {
339339
rtk_cmd: "rtk mvn",
340-
rewrite_prefixes: &["./mvnw", "mvnw", "mvn"],
340+
rewrite_prefixes: &["./mvnw", "mvnw", "mvnd", "mvn"],
341341
category: "Build",
342342
savings_pct: 80.0,
343343
subcmd_savings: &[
344344
("test", 90.0),
345345
("clean", 90.0),
346346
("compile", 75.0),
347+
("package", 80.0),
348+
("install", 80.0),
349+
("integration-test", 85.0),
347350
("dependency:tree", 65.0),
348351
],
349352
subcmd_status: &[],

0 commit comments

Comments
 (0)