slawekjaranowski commented on code in PR #13727:
URL: https://github.com/apache/maven/pull/13727#discussion_r4424076362
##########
maven-core/src/main/resources/META-INF/maven/extension.xml:
##########
@@ -127,8 +127,16 @@ under the License.
<exportedPackage>org.slf4j.helpers.*</exportedPackage>
<exportedPackage>org.slf4j.event.*</exportedPackage>
- <!-- JAnsi -->
- <exportedPackage>org.fusesource.jansi.*</exportedPackage>
+ <!-- JAnsi: maven-jline ships Ansi.java, forwarding ANSI calls to the
already-initialized JLine terminal, for
+ backward compatibility with code (e.g. maven-shared-utils) still
calling the JAnsi API. Named exactly,
+ not as org.fusesource.jansi.*, since Ansi is the only class
maven-jline provides; any other class in
+ that package a plugin needs falls back to its own classpath (see
ClassRealm#loadClassFromImport), so
+ this stays even though the jansi artifact itself is no longer
exported below.
+ This is deliberately not extended to cover more of jansi (e.g.
AnsiConsole): plugins have no real use
+ case for touching the console directly - Maven already offers APIs to
prompt the user and to print
+ colored messages - and letting a plugin call
AnsiConsole.systemInstall()/systemUninstall() itself could
+ hijack the shared stdout/stderr. See the discussion on #13727. -->
Review Comment:
> and letting a plugin call AnsiConsole.systemInstall()/systemUninstall()
itself could hijack the shared stdout/stderr
but we still remove `exportedArtifact` which allow plugin to call such
methods
--
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]