slachiewicz opened a new pull request, #13920:
URL: https://github.com/apache/maven/pull/13920

   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 does 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.
   - `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.
   
   Verified: the same mojo binary (JDK 21, `--release 8`, `maven-api-core` 
4.0.0-rc-7) gets `ApiMessageBuilderFactory` on the built distribution and 
prints the same escape sequences as on Maven 4.0.0-rc-7 with `--color=always` 
and under a pseudo-terminal; with `-B`, `-l` or piped output it is plain; `mvn 
verify -pl maven-core` → 382 tests pass; `javadoc` on the copied sources 
reports no errors.
   


-- 
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]

Reply via email to