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

   Plugins compiled against `maven-api-core` 4.x can inject 
`org.apache.maven.api.services.MessageBuilderFactory` on Maven 3.10 as they do 
on Maven 4, as proposed in #13917.
   
   - `maven-core` carries Java 8 copies of `MessageBuilder`, 
`MessageBuilderFactory`, `Service` and the `Nonnull`, `Experimental` and 
`ThreadSafe` annotations from `maven-4.0.x`, with Javadoc links to types Maven 
3 does not have turned into code text, and `org.apache.maven.api.Constants` 
reduced to the style names. All of its fields are `String` constants, which 
callers inline, so plugins compiled against the full class never read the 
missing ones.
   - `ApiMessageBuilderFactory` implements the API factory by delegating to the 
Maven 3 `MessageBuilderFactory`, so colours and terminal width follow Maven's 
setting.
   - Core exports exactly the three packages: `org.apache.maven.api.*`, 
`org.apache.maven.api.annotations.*` and `org.apache.maven.api.services.*`. A 
plugin that bundles other `maven-api-*` classes keeps loading them from its own 
jar.
   
   This builds on #13918, which makes the injected Maven 3 factory colour at 
all; only the last commit is new here.
   
   Verified: a mojo compiled with JDK 21 and `--release 8` against 
`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, plain text when piped; `mvn 
verify -pl maven-core` → 431 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