slachiewicz opened a new pull request, #14008: URL: https://github.com/apache/maven/pull/14008
Plugins compiled against `maven-api-core` 4.x can inject `org.apache.maven.api.services.MessageBuilderFactory` on Maven 3.9 as they do on Maven 4, as proposed in #13917; #13919 did the same for 3.10. - `maven-core` carries the same Java 8 copies as the 3.10 change: `MessageBuilder`, `MessageBuilderFactory`, `Service`, the `Nonnull`, `Experimental` and `ThreadSafe` annotations, and `org.apache.maven.api.Constants` reduced to the style names, which callers inline. They are marked `@since 3.9.17`. - `ApiMessageBuilderFactory` follows maven-shared-utils' `MessageUtils` for colour and terminal width, and resolves style names (`bold,f:cyan`, `maven.style.*`) with the code Maven 3.10 uses; its tests use the same expectations as 3.10's. - Core exports exactly `org.apache.maven.api.*`, `org.apache.maven.api.annotations.*` and `org.apache.maven.api.services.*`. One difference from 3.10 and 4: in auto colour mode with output piped and neither `-B` nor `-l`, Maven 3.9 leaves colours on and JAnsi strips them when the text reaches the console, so a plugin that writes `build()` output elsewhere gets escape sequences. maven-shared-utils' `MessageUtils.buffer()` behaves the same on 3.9 today; #13892 makes auto mode follow terminal detection, as 3.10 does. Supersedes #13920. Verified: a mojo compiled against `maven-api-core` 4.0.0-rc-7 fails on 3.9.16 with `NoClassDefFoundError`, and on the built distribution gets `ApiMessageBuilderFactory`, coloured with `--color=always` and plain with `-B`; `mvn verify -pl maven-core` → 382 tests, 1 skipped. -- 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]
