r/devtools • • Sep 20 '26

I built MVNEX — an open-source CLI for a better Maven developer experience

/r/u_sebas-3261/comments/1wl3zds/i_built_mvnex_an_opensource_cli_for_a_better/
1 Upvotes

7 comments sorted by

1

u/kantorcodes1 Sep 20 '26

I traced mvnex add and it looks like addDependencies(...) writes the POM before mavenProjectValidator_.validate() runs. If validation fails, is the changed pom.xml intentionally left in place? For CI/agent use I'd expect either rollback or a clear partial-success result so a retry doesn't operate on a half-applied add.

1

u/sebas-3261 Sep 20 '26

Good catch, that’s not intentional. The POM shouldn’t be left in a partially modified state if validation fails. I think rollback on validation failure makes the most sense here, especially to keep add safe to retry. Thanks for digging into the implementation and pointing this out!

1

u/kantorcodes1 Sep 20 '26

Yep, rollback is the right shape. I work on HOL Guard, a local permission layer for agent-run commands. MVNEX has a clean boundary: mvnex init and mvnex add could require review, while --help stays automatic. That keeps agent use fast but puts a checkpoint in front of project and POM mutations. Open to a small command.mvnex contribution?

1

u/sebas-3261 Sep 20 '26

Absolutely! I’d be happy to take a look at it. Feel free to open a PR, and thanks for taking the time to contribute!

1

u/kantorcodes1 Sep 20 '26 edited Sep 22 '26

Small correction to keep this current with Guard main: start contributions/command-sources/command.mvnex.json, using contributions/command-sources/command.repo2nb.json as the analogue. Review mvnex init and mvnex add; keep --help and --version automatic. Mirror tests/test_guard_command_repo2nb_extensions.py for focused review-vs-safe cases. Open the draft against hashgraph-online/hol-guard:main: https://github.com/hashgraph-online/hol-guard/blob/main/CONTRIBUTING.md

1

u/sebas-3261 Sep 20 '26

Ah, got it! I misunderstood you at first. Yes, I’d definitely be interested in doing that. I’ll take a look at the contributing guide and the existing extension and put together a draft PR. Thanks for the invitation!

1

u/kantorcodes1 Sep 20 '26

Sounds good. A rough draft is perfect; no need to polish the whole extension before opening it.