feat(mvn): add Maven wrapper (mvnw) support and test goal#1
Open
feat(mvn): add Maven wrapper (mvnw) support and test goal#1
Conversation
- Support ./mvnw and mvnw as command prefixes alongside mvn - Add missing `test` goal to Maven filter match pattern - Extend strip patterns: Scanning for projects, Compiling N source files, Recompiling the module, empty [ERROR], [Help] boilerplate - Add 6 new inline tests based on real Maven compilation output - Update spring-boot.toml to also match mvnw/gradlew wrappers - Add mvnw/./mvnw to rewrite_prefixes in discover rules
Split `test` goal from mvn-build into a separate mvn-test.toml filter that uses keep_lines_matching for aggressive filtering (failures-only). - mvn-test uses replace stage to blank surefire boilerplate before keep - Keeps only: [ERROR], [WARNING], BUILD status, test summaries, assertion details (expected/but was), stack traces, Total time - Strips: [Help] links, "See surefire-reports", "Re-run Maven" hints - 3 inline tests from real maven-mcp project logs - Update builtin filter count: 58 → 59
Real-world Maven test logs (3381 lines from Spring Boot + Testcontainers project) showed [WARNING] matches 2296 lines of dependency model and Liquibase noise. Remove WARNING from keep filter — test failures are always [ERROR]. Also tighten Exception pattern to avoid false positives on class names like DOMException or ExceptionHandler. Result: 3381 lines → 3 lines (99.9% savings) on real project log. Add inline test with real project failure data.
Real-world success log (10380 lines, 954 tests) showed 165 lines
matched by keep filter — too noisy for a green build. Add match_output
with unless guard: if output contains "Tests run: N, Failures: 0,
Errors: 0" and no [ERROR]/FAILURE, short-circuit to one-liner summary.
Result: 10380 lines → 1 line ("mvn test: ok") on success.
Failure logs still show full error details (unless guard skips rule).
Real-world log (3343 lines, ClassNotFoundException during test discovery) showed ~90 lines of Maven/JUnit/Surefire/JDK framework stack frames. Strip these via replace rules, keeping only application-relevant frames. Stripped: org.apache.maven.*, org.junit.platform.*, org.codehaus.plexus.*, java.base/*, "... N more" suffixes.
…ck traces Real-world log with 9 identical stack traces (UrlWhitelistChecker compilation errors) showed 75 filtered lines, mostly repetition. Use tail_lines=25 to capture Maven's own deduplicated summary section at the end of output — includes failure list, assertion details, test count, BUILD status, and Total time. Result: 3279 lines → 25 lines (99.2% savings), zero repetition.
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.
Summary
./mvnwandmvnwsupport to Maven TOML filter and rewrite rules (same pattern as Gradle wrapper)testgoal to Maven filter —mvn testwas not being filteredspring-boot.tomlto also matchmvnw spring-boot:runandgradlew bootRunTest plan
cargo run -- verify --filter mvn-build— 8/8 inline TOML tests passcargo test --all— 1350 tests passcargo fmt --all --check— cleanrtk mvnw clean installon a real Maven projectrtk ./mvnw teston a real Maven project