Skip to content

Deprecate the logging package in favor of MessageBuilderFactory - #423

Merged
slachiewicz merged 1 commit into
masterfrom
agent/deprecate-logging
Sep 10, 2026
Merged

slachiewicz merged 1 commit into
masterfrom
agent/deprecate-logging

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

Deprecates org.apache.maven.shared.utils.logging. Maven 3.10.0 introduces org.apache.maven.message.MessageBuilderFactory and Maven 4 org.apache.maven.api.services.MessageBuilderFactory, both of which supersede it.

This is the outcome of the review on #377, which proposed swapping Jansi for org.jline:jansi here:

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.

Marking the package-private implementations as well keeps the build free of warnings for implementing a deprecated interface. No behaviour changes and no signature changes, so this is source and binary compatible.

Closes #373.

Verified: mvn -B verify on JDK 17 -> Tests run: 787, Failures: 0, Errors: 0. Spotless clean.

This change was created with AI assistance.

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 slachiewicz added deprecated Pull requests that deprecate features java Pull requests that update Java code labels Sep 10, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review September 10, 2026 07:54
@slachiewicz slachiewicz added this to the 3.5.0 milestone Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deprecated Pull requests that deprecate features java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants