arturobernalg commented on PR #13727:
URL: https://github.com/apache/maven/pull/13727#issuecomment-6539461905

   @gnodet thanks for the detailed analysis, you're right that just dropping 
the exportedArtifact entry reintroduces a worse problem.
   
   Pushed 788a7727: kept `org.fusesource.jansi:jansi` excluded from 
exportedArtifact, and gave maven-jline a real shim instead of just `Ansi.java` 
- `AnsiConsole`, `AnsiPrintStream` and `AnsiMode`, delegating to 
`org.jline.jansi.AnsiConsole`. 
`systemInstall()`/`systemUninstall()`/`isInstalled()` now forward straight to 
JLine's own install, `out()` returns a stream that always writes to whatever 
`System.out` currently is, and `setMode()` is a no-op since the terminal Maven 
already installed owns that decision. `extension.xml`'s exportedPackage list is 
narrowed to those four exact classes.
   
   This keeps the original fix (AnsiConsole is no longer missing from a 
plugin's realm, fixing the jkube case) without a second System.out/System.err 
install racing JLine's. Added AnsiConsoleTest covering the delegation 
(isInstalled/systemInstall/systemUninstall match org.jline.jansi.AnsiConsole, 
out() writes to the live System.out, getTerminalWidth delegates, setMode is a 
no-op), and updated ExtensionDescriptorBuilderTest to assert the artifact 
exclusion and the four package exports instead of asserting jansi is gone 
entirely. Full maven-core + maven-jline suites, checkstyle, spotless and rat 
all pass locally.


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