gnodet commented on PR #13208:
URL: https://github.com/apache/maven/pull/13208#issuecomment-5750812228

   Thanks for this contribution — the use case is real and the API design 
(`OutputCapabilities` as an injectable service with a fallback `Map<String, 
String>` in request data for older-API plugins) is clean.
   
   A few thoughts before this can move forward:
   
   **Milestone / branch targeting**
   
   This PR targets `master` (4.1.0), which is the right vehicle. However, the 
integration points it touches — `LookupInvoker`, `LookupContext`, and 
`PlexusContainerCapsule.updateLogging()` — are actively being reshaped by the 
logging feature chain currently under review (#12694, #13180, and related PRs). 
This PR will need to be rebased on top of `feature/console-modes` (#13180) 
before it can be cleanly reviewed, as the context initialization path is 
changing there.
   
   **Interaction with `--console=machine`**
   
   When `--console=machine` is active (#13180), Maven writes JSON lines to 
stdout rather than using the terminal for human-readable output. In that case, 
`Destination` should be deterministically `REDIRECTED` (or a new `MACHINE` 
value) derived directly from the console mode flag, not from JLine terminal 
introspection. Right now `TerminalOutputCapabilities.destination()` will likely 
give the right answer incidentally (dumb terminal → `REDIRECTED`), but it's 
fragile — if the stdout routing ever changes in machine mode, the detection 
would silently regress. Once rebased on `feature/console-modes`, the 
`MavenInvoker.determineConsoleMode()` result should feed directly into the 
`outputCapabilities` supplier in `LookupContext`.
   
   **Backports (#13209, #13210)**
   
   I'd recommend keeping the 3.10.x and 4.0.x backports as drafts for now. This 
is new API surface, not a bug fix, and adding a new injectable service to 
maintenance branches is invasive. If `dependency:tree` or other tools have a 
concrete regression to fix, that's a different conversation — but the general 
feature belongs in 4.1.0.


-- 
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]

Reply via email to