-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MNG-8283] Maven CLIng #1750
[MNG-8283] Maven CLIng #1750
Conversation
dd29541
to
721a314
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved but:
- not sure if the
org.apache.maven.cling.invoker.mvn.daemon
should be in this PR, it may be left out for now - the ITs are slow and this need to be fixed (seems about always forking)
The "slow ITs": originally ITs run for about ~17m and in this PR they started to run for ~1h, huge difference. Cause found and fixed: turned out that my change to Last run is again ~17m proving that fix works, fix is in IT suite: |
Re "daemon": is not (yet) daemon, will rename it to "resident" as it will be basis for shell-like and daemon-like use cases. IMO can remain here, and mvnd will (most probably) have some subclass of it. |
They need mvn4 not mvn3
I don’t know if this is expected, but this change breaks running Maven through IntelliJ. Indeed it invokes Maven through Also note that the exception is a bit confusing since it does not say where this property is being used.
|
I suppose we could make it default to |
New CLI for Maven. Goals are reusability, extensibility and easier embeddability (a la mvnd). If you build this branch, you will end up with Maven distro that uses "new"
maven-cli:org.apache.maven.cling.MavenCling
class as entry point instead of "old"maven-embedder:org.apache.maven.cli.MavenCli
.First step is to make "pretty much equivalent" capable CLI as compared to "old", with some exceptions:
-llr
present ONLY to make Maven fail are gone (now Arg parser will fail).Current state of affairs is messy, MavenCli mixes everything it can, contains interleaved logic for bootstrapping, arg parsing, default logic and executing Maven. First goal is to clean this up.
Commons CLI are also hidden in this PR, so is ClassWorlds. This basically opens up way to have "alternative" CLI arguments parsers as well.
Note: naming, as always is off. We just could not come up with better names, so "invoker" is used, but they are too generic, and they clash with existing Maven Invoker. But have to say, that this work could replace Maven Invoker on longer run with some much simpler and cleaner solution.
Currently the "local" (CLI) flow is this:
But the point is if you "come up" somehow with a Request instance, one can also do just:
Local parser:
Local invoker:
There are some experiments ongoing as well, like
ForkedInvoker
is, but alsoMavenTool
.