gnodet commented on PR #13490:
URL: https://github.com/apache/maven/pull/13490#issuecomment-6194281070

   @rmannibucau Thanks for the feedback. The API is marked `@Experimental` 
precisely to allow refinement based on real usage — so this is the right time 
to raise concerns.
   
   A few points on the current design choices:
   
   - **`ClassWorld` and `ClassRealm`** mirror the plexus-classworlds concepts 
that the Maven container already uses internally. Exposing them under the 
`@Experimental` API makes the existing Maven extension/plugin contract explicit 
rather than hiding it behind a raw `ClassLoader`. Plugins and extensions 
already deal with realms (e.g. `DefaultClassRealmManager`).
   
   - **`Strategy`** — fair point. It's a lower-level concern and could arguably 
be omitted from the initial API surface. If there's no concrete use case for it 
in the `maven-api` layer yet, we can defer it.
   
   - **Simpler `ClassLoader`-centric API** — the concern is that a plain 
`ClassLoader` view loses the isolation semantics (realm-to-realm imports, 
exports) that Maven's classloading model relies on. Exposing those semantics 
explicitly, even if under `@Experimental`, lets us document and stabilize the 
contract rather than letting plugins rely on implementation internals.
   
   That said, if you have a concrete proposal for a slimmer API surface (e.g. 
just expose the import/export operations and drop `Strategy` from the public 
API), I'm open to discussion. The `@Experimental` annotation means we can 
iterate. Could you sketch what you have in mind?


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