abdulhannansyed548-cmd commented on PR #14111:
URL: https://github.com/apache/maven/pull/14111#issuecomment-7173551209

   @gnodet Thanks for raising these points. Let me clarify the intended use 
case.
   
   The primary use case I had in mind is IDE integration, particularly the kind 
of functionality currently implemented by m2e. For example, its Java project 
configurator reads resolved parameters from `maven-compiler-plugin`, such as 
`source`, `target`, `release`, `encoding`, `includes`, `excludes`, and 
`parameters`, and uses them to configure the IDE project.
   
   The caller needs resolved parameter values, rather than a configured Mojo 
instance. In this scenario, the values are primarily simple types and 
collections such as `String`, `String[]`, `Boolean`, and `List`. The intention 
is not to expose arbitrary plugin-specific objects or allow callers to interact 
with the Mojo itself.
   
   I agree that returning complex objects loaded from a plugin realm through 
`Map<String, Object>` creates a classloader-boundary problem. The current 
implementation does not adequately address that concern.
   
   I also agree that V3 support is important. The compiler, Surefire, and JAR 
plugins are practical examples, so restricting the service to V4 plugins would 
significantly limit its usefulness.
   
   I think we should clarify the result contract before extending the 
implementation. One possibility is to return typed values only for supported 
JDK types and avoid exposing plugin-specific complex objects. Another is to 
return an interpolated `Map<String, XmlNode>` and provide typed conversion 
separately.
   
   Would you prefer the service to expose only the classloader-neutral XML 
representation, or should we retain typed access for supported JDK types as 
part of this API?


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