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

   Thanks @laeubi, you're right on both counts.
   
   The approach has been reworked in 
[44e96719ff](https://github.com/gnodet/maven/commit/44e96719ff):
   
   - **Removed `isApplicableForPluginResolution()`** from the `WorkspaceReader` 
SPI — opting out of plugin resolution was the wrong lever.
   - **Added `PluginRealmCache.invalidate(Artifact)`** (with a default no-op 
for backward compat) so IDE integrators can purge stale plugin realms when a 
workspace artifact is rebuilt. `DefaultPluginRealmCache` implements it by 
evicting all entries whose resolved artifacts match the given 
`groupId:artifactId:version` and disposing the associated `ClassRealm`.
   
   The reasoning: IDEs trust their own build — if they've rebuilt a plugin from 
the workspace, they want it used. The right API is cache invalidation on 
demand, not blanket exclusion from resolution.
   
   As for the generics of `isApplicableFor(ResolutionContext)` with an enum — 
agreed that would be overkill given the direction change.


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