rtk icon indicating copy to clipboard operation
rtk copied to clipboard

Feature request: add support for maven

Open alexvanacker opened this issue 8 months ago • 3 comments

Maven (java tool) can be very verbose and this would vastly help Java developers using it.

Commands that we should support:

  • mvn test
  • mvn compile
  • mvn package
  • mvn clean
  • mvn integration-test

alexvanacker avatar Mar 05 '26 16:03 alexvanacker

Partially resolved by PR #349.

mvn compile, mvn package, mvn clean, mvn install are now covered. Uses strip_lines_matching (not keep) to strip known [INFO] noise while preserving stacktraces, plugin warnings, and unexpected output.

mvn test is not covered — requires a Rust module with a state machine to parse Surefire output. PR #288 covers this and much more.

FlorianBruniaux avatar Mar 05 '26 21:03 FlorianBruniaux

Resolved — RTK now ships a built-in TOML filter for Maven builds (see src/filters/mvn-build.toml, landed in PRs #349, #351, #386).

Estimated savings: 80-90% on real Maven builds. Strips Downloading/Downloaded artifact noise, progress bars, and blank lines — which typically represent ~80% of Maven output.

rtk mvn clean install    # strips download noise, keeps errors + BUILD summary

If you encounter any issues with this filter, feel free to reopen or file a new issue. Thanks!

pszymkowiak avatar Mar 10 '26 15:03 pszymkowiak

It is not clear to me if this is targeting only mvn, or it is supposed to work also with mvnd (the maven daemon). If not, it would be nice to have it also for the second, it speeds up builds, sometimes significantly.

aaime avatar May 07 '26 10:05 aaime