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

   ## Summary
   
   After PR #13636 replaced `EnhancedComponentConfigurator` with 
`V4MojoConfigurator`, `maven-testing` still had residual Plexus usage because 
`MojoExpressionEvaluator` was package-private in 
`org.apache.maven.plugin.internal`. This forced `MojoExtension` to use the 
Plexus bridge constructor on `V4MojoConfigurator`, pulling in 
`ExpressionEvaluator`, `TypeAwareExpressionEvaluator`, `Xpp3Dom`, 
`XmlStreamReader`, and `ReflectionUtils`.
   
   This PR makes the SPI public and migrates `maven-testing` to use it directly.
   
   ## Changes
   
   ### `maven-core`
   - `MojoExpressionEvaluator`: make **public** (`@since 4.2.0`); change 
`evaluate()` to `throws Exception` (compatible with 
`ExpressionEvaluationException extends Exception`, avoids cross-hierarchy 
exception coupling)
   - `MojoExpressionEvaluationException`: make **public** (`@since 4.2.0`)
   - `PluginParameterExpressionEvaluatorV4`: add `implements 
MojoExpressionEvaluator` (the existing `evaluate(String, Class<?>)` throwing 
`ExpressionEvaluationException` already satisfies the interface since 
`ExpressionEvaluationException extends Exception`)
   - `V4MojoConfigurator`: mark the Plexus `TypeAwareExpressionEvaluator` 
bridge constructor `@Deprecated` (kept for compat; prefer the 
`MojoExpressionEvaluator` constructor)
   - `PlexusMojoExpressionEvaluatorAdapter`: simplify now that `evaluate()` 
throws `Exception`
   
   ### `maven-testing`
   - `MojoExtension`: replace `WrapEvaluator` to implement 
`MojoExpressionEvaluator` and pass it directly to `V4MojoConfigurator`; replace 
`XmlStreamReader` → `InputStreamReader + StandardCharsets.UTF_8`; replace 
`Xpp3DomBuilder` in `mojoCoordinates()` with `MavenStaxReader`; remove all 
`Xpp3Dom` helpers; replace 
`ReflectionUtils.getFieldByNameIncludingSuperclasses()` with a private JDK-only 
helper
   - `pom.xml`: remove `org.eclipse.sisu:org.eclipse.sisu.plexus` dependency


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