Skip to content

Commit b560a9b

Browse files
alexvanackerclaude
andcommitted
fixup! feat: add Maven (mvn) command support with 7 subcommands (#338)
fixup! feat: add Maven (`mvn`) command support with 7 subcommands (#338) Address PR #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 cdcd2e2 commit b560a9b

2 files changed

Lines changed: 251 additions & 307 deletions

File tree

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
@@ -304,13 +304,16 @@ pub const RULES: &[RtkRule] = &[
304304
// Maven
305305
RtkRule {
306306
rtk_cmd: "rtk mvn",
307-
rewrite_prefixes: &["./mvnw", "mvnw", "mvn"],
307+
rewrite_prefixes: &["./mvnw", "mvnw", "mvnd", "mvn"],
308308
category: "Build",
309309
savings_pct: 80.0,
310310
subcmd_savings: &[
311311
("test", 90.0),
312312
("clean", 90.0),
313313
("compile", 75.0),
314+
("package", 80.0),
315+
("install", 80.0),
316+
("integration-test", 85.0),
314317
("dependency:tree", 65.0),
315318
],
316319
subcmd_status: &[],

0 commit comments

Comments
 (0)