slawekjaranowski opened a new pull request, #463:
URL: https://github.com/apache/maven-help-plugin/pull/463
`MessageUtils` and `MessageBuilder` from maven-shared-utils are deprecated,
which produced a number of deprecation warnings during the build.
### Changes
- `DescribeMojo`: added a private `buffer()` method wrapping
`MessageUtils.buffer()`; all call sites use it now.
- `DescribeMojo`: the two places that relied on the deprecated
`MessageBuilder.toString()` through string concatenation now call `build()`
explicitly.
- `EffectivePomMojo`: moved the comment coloring logic into a private
`colorizeComments(String)` method.
- Both methods are annotated with `@SuppressWarnings("deprecation")` and
refer to the deprecated classes by fully qualified name. The imports were
removed, because a method-level suppression does not cover a deprecation
warning reported on an import.
The build no longer reports deprecation warnings.
### Future migration
The replacement is `org.apache.maven.api.services.MessageBuilderFactory`.
apache/maven#13917 proposes to ship it in Maven 3.9 and 3.10 as well, so that
one plugin binary can use it on 3.9, 3.10 and 4. It is already merged for
3.10.x (apache/maven#13919) but not yet available in 3.9. This plugin requires
Maven 3.9.0, so following apache/maven-shared-utils#443 it keeps using
`MessageUtils` for now. Once the prerequisite allows it, only the bodies of
these two methods need to be replaced by an injected `MessageBuilderFactory`
(`builder()` and `isColorEnabled()`).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]