Skip to content

build(deps): replace fusesource.jansi with jline.jansi for ANSI support - #377

Closed
HarshMehta112 wants to merge 1 commit into
apache:masterfrom
HarshMehta112:fix/#373
Closed

HarshMehta112 wants to merge 1 commit into
apache:masterfrom
HarshMehta112:fix/#373

Conversation

@HarshMehta112

Copy link
Copy Markdown
Contributor

Fixes #373

Changes

  • Updated org.jline:jansi to version 3.25.1 (last version supporting Java 8)
  • Ensured compatibility with existing usage in maven-shared-utils

Notes

  • Versions of jansi newer than 3.25.1 require Java 11+, so they cannot be used while maintaining Java 8 support.
  • This is a dependency-only change with no functional impact expected.

Summary

This update preserves Java 8 compatibility while keeping the dependency as up to date as possible within supported constraints.

@slawekjaranowski slawekjaranowski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is no so easy, this class is used by Maven until 3.9.x and many plugins ....

Maven also exports such packages

In Maven 3.10.x we will MessageBuilderFactory class.

So I will not touch it, we can make it deprecated.

@slachiewicz
slachiewicz requested a review from gnodet July 2, 2026 06:07
@slachiewicz slachiewicz added the wontfix This will not be worked on label Sep 9, 2026
@slachiewicz slachiewicz closed this Sep 9, 2026
slachiewicz added a commit that referenced this pull request Sep 10, 2026
Maven 3.10.0 introduces org.apache.maven.message.MessageBuilderFactory,
and Maven 4 org.apache.maven.api.services.MessageBuilderFactory, which
supersede this package.

This is the outcome of the review on #377, which proposed swapping Jansi
for org.jline:jansi here. That swap was rejected: Maven exports this
package up to 3.9.x and many plugins compile against it, so changing the
ANSI provider underneath them is not safe. Deprecation is the agreed
route instead.

The package-private implementations are marked too, so implementing a
deprecated interface does not warn.
slachiewicz added a commit that referenced this pull request Sep 10, 2026
Maven 3.10.0 introduces org.apache.maven.message.MessageBuilderFactory,
and Maven 4 org.apache.maven.api.services.MessageBuilderFactory, which
supersede this package.

This is the outcome of the review on #377, which proposed swapping Jansi
for org.jline:jansi here. That swap was rejected: Maven exports this
package up to 3.9.x and many plugins compile against it, so changing the
ANSI provider underneath them is not safe. Deprecation is the agreed
route instead.

The package-private implementations are marked too, so implementing a
deprecated interface does not warn.
@slachiewicz

Copy link
Copy Markdown
Member

Closing this in favour of deprecating the package instead, per the review here.

The blocker is that org.apache.maven.shared.utils.logging is exported by Maven up to 3.9.x and many plugins compile against it, so changing the ANSI provider underneath it is not a safe change to make in this library. Maven 3.10.0 introduces org.apache.maven.message.MessageBuilderFactory (and Maven 4 org.apache.maven.api.services.MessageBuilderFactory) as the replacement, so the path forward is to point users there rather than re-plumb this code.

That deprecation is now up as PR #423, which also closes #373.

Thanks for the patch, and sorry it did not land -- the constraint only surfaced in review. The Java 8 analysis you did on org.jline:jansi 3.25.1 is still useful and is worth keeping on #373 for whoever revisits the provider question in a Maven 4-only line.

Your branch fix/#373 is on your fork, so please delete it there when convenient -- committers cannot remove it from here.

This comment was created with AI assistance.

slachiewicz added a commit that referenced this pull request Sep 10, 2026
Maven 3.10.0 introduces org.apache.maven.message.MessageBuilderFactory,
and Maven 4 org.apache.maven.api.services.MessageBuilderFactory, which
supersede this package.

This is the outcome of the review on #377, which proposed swapping Jansi
for org.jline:jansi here. That swap was rejected: Maven exports this
package up to 3.9.x and many plugins compile against it, so changing the
ANSI provider underneath them is not safe. Deprecation is the agreed
route instead.

The package-private implementations are marked too, so implementing a
deprecated interface does not warn.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace org.fusesource.jansi:jansi with org.jline:jansi

3 participants