gnodet commented on PR #618: URL: https://github.com/apache/maven-jar-plugin/pull/618#issuecomment-6141896258
Thanks Martin. The intent is fully aligned — package-private with direct field access is exactly the right design for an implementation-internal class. However, there's a practical blocker: even in Maven 4 API plugins, the mojo parameter configurator is still `EnhancedComponentConfigurator` (Sisu/Plexus-based). It injects `<archive>` config via reflection from a different classloader/module, and without `setAccessible(true)` it cannot access package-private fields — we get `IllegalAccessException` at runtime. I confirmed this by trying it: all ITs that exercise `<archive>` config failed. I've opened https://github.com/apache/maven/issues/13459 to track this for 4.1.0 — the ask is that the configurator for Maven 4 API plugins either calls `setAccessible(true)` or uses a proper binding mechanism that doesn't depend on field visibility. For now I'll keep `ArchiveConfiguration` public with its getters/setters, and we can revisit once #13459 lands. -- 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]
