gnodet-bot commented on code in PR #13636:
URL: https://github.com/apache/maven/pull/13636#discussion_r4351139002


##########
impl/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java:
##########
@@ -821,6 +824,18 @@ private void populateMojoExecutionFields(
         }
 
         try {
+            if (mojoDescriptor.isV4Api() && "enhanced".equals(configuratorId)) 
{

Review Comment:
   ⚠️ **V3 mojos that explicitly declare `configurator="enhanced"` will fail 
with `ComponentLookupException`.**
   
   The guard `if (mojoDescriptor.isV4Api() && 
"enhanced".equals(configuratorId))` only intercepts V4 mojos. A V3 mojo plugin 
that has `@Mojo(configurator = "enhanced")` in its descriptor falls through to 
`container.lookup(ComponentConfigurator.class, "enhanced")` — which now throws 
because `EnhancedComponentConfigurator` (`@Named("enhanced")`) is deleted by 
this PR.
   
   Either extend the guard to V3 mojos too, or keep 
`EnhancedComponentConfigurator` as a compat shim:
   
   ```suggestion
               if ("enhanced".equals(configuratorId)) {
   ```
   
   This covers both V4 and V3 mojos that used the `"enhanced"` configurator, 
routing them all to `V4MojoConfigurator`. If V3 mojo configuration semantics 
differ materially (e.g. Plexus expression evaluation), add a comment explaining 
why V4MojoConfigurator is safe for V3 mojos too.



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