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

   ## Summary
   
   - Restore `buildConfiguration()` callback in the deprecated `build(Reader, 
String)` and `build(InputStream, String)` methods
   - The [MNG-7947] refactoring inadvertently bypassed this overridable method, 
breaking subclasses like `EnhancedPluginDescriptorBuilder` in maven-plugin-tools
   - The legacy code path now detects the namespace (PLUGIN 2.0.0 vs legacy), 
and calls `buildConfiguration()` for the legacy format
   
   ## Context
   
   This fixes the root cause of apache/maven-plugin-tools#806 and unblocks 
apache/maven-plugin-tools#1091 (Maven 4 CI).
   
   The `build(Reader, String)` method was changed from:
   ```java
   return build(source, buildConfiguration(reader));
   ```
   to:
   ```java
   return build(() -> reader, source);
   ```
   which skips the `buildConfiguration()` callback entirely. Subclasses that 
override `buildConfiguration()` to intercept the parsed configuration (e.g., to 
extract `requiredJavaVersion`) get a null field and NPE.
   
   ## Test plan
   
   - [x] `mvn compile test` passes in `compat/maven-plugin-api`
   - [ ] Full CI
   - [ ] Verify maven-plugin-tools reporting ITs pass with this Maven build
   
   🤖 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]

Reply via email to