slawekjaranowski commented on PR #13888: URL: https://github.com/apache/maven/pull/13888#issuecomment-6727335124
I checked `plexus-interactivity` against this PR. `plexus-interactivity-api` has a JLine-based [`JLineInputHandler`](https://github.com/codehaus-plexus/plexus-interactivity/blob/master/plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/jline/JLineInputHandler.java), which uses `org.jline:jline-reader`. This PR doesn't affect it: - `jline-reader` is an `optional` dependency of `plexus-interactivity-api`, so it never ends up on a plugin's classpath unless the plugin adds it itself. - Core never shipped `jline-reader` and never exported `org.jline.*` to plugins, so a plugin could not get it from core before this PR either. - `JLineInputHandler` is `@Named("jline")`. `DefaultPrompter` injects an unqualified `InputHandler`, so Sisu gives it `DefaultInputHandler`, which is a plain `BufferedReader` over `System.in`. - A plugin that explicitly asks for the `jline` hint and adds `jline-reader` uses its own JLine from the plugin classpath. That works the same before and after this PR. A GitHub code search turned up no Maven plugin that does this. **Tested:** I built the PR branch and ran the plugins that prompt for input, with stdin piped in and in a real terminal (via `script`): | Plugin | `plexus-interactivity-api` | Result | |---|---|---| | `maven-help-plugin:3.5.2:evaluate` | 1.5.1 | prompt works, expression evaluated | | `versions-maven-plugin:2.24.0:set` | 1.6.0 | prompt works, version updated | I ran both on current 3.10.x (with JLine) too, and they behave the same. So, @cstamas: a plugin would bring its own JLine and set it up on first use, but by default plugins don't use JLine at all. This does not block the PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
