slachiewicz opened a new pull request, #308:
URL: https://github.com/apache/maven-plugin-testing/pull/308

   **Description**
   
   Port the parts of apache/maven PR #13928 ("Remove remaining Plexus 
dependencies from maven-testing") that apply to the Maven 3 line, in 
`org.apache.maven.api.plugin.testing.MojoExtension`:
   
   - Reading the plugin descriptor stream and POM files now uses explicit UTF-8 
(`InputStreamReader` / `Files.newBufferedReader`) instead of `XmlStreamReader` 
encoding guessing — plugin descriptors and POMs are UTF-8 by spec.
   - `getVariableValueFromObject` gets the missing null check, and the 
field-not-found messages of `getVariableValueFromObject` / 
`setVariableValueToObject` now include the class name of the object being 
inspected, so a failing test reports where the field was expected.
   
   **Deliberately not ported (Maven-4-only in #13928)**
   
   - The public `MojoExpressionEvaluator` SPI does not exist in maven-core 3.x; 
on this line mojo configuration goes through the Plexus `ExpressionEvaluator` / 
`BasicComponentConfigurator`, so `WrapEvaluator` stays a 
`TypeAwareExpressionEvaluator`.
   - `Xpp3Dom` cannot be replaced by the Stax model reader here — the Maven 3 
configuration pipeline (`finalizeConfig`, `extractPluginConfiguration`, 
`XmlPlexusConfiguration`) is Xpp3Dom-native, and `extractPluginConfiguration` 
is public API.
   - plexus-utils cannot be dropped from this module; accordingly 
`ReflectionUtils.getFieldByNameIncludingSuperclasses` is kept rather than 
replaced with a private JDK helper (that replacement is the Maven-4-only 
variant).
   
   **Verification**
   
   - `mvn -pl maven-plugin-testing-harness package` — clean
   - `mvn -pl maven-plugin-testing-harness test` — 63 tests, 0 failures (incl. 
`MojoTestCaseTest`, `MojoRuleTest`, `ParametersMojoTest`, 
`ExpressionEvaluatorTest`)
   
   Follow-up to https://github.com/apache/maven/pull/13928 / 
https://github.com/apache/maven/issues/13895


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