[ 
https://issues.apache.org/jira/browse/MNG-7027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17406666#comment-17406666
 ] 

Mickael Istria commented on MNG-7027:
-------------------------------------

Actually, both from m2e and lemminx-maven perspective, having a good solution 
for MNG-6616 would be best; m2e and lemminx-maven would only invalidate the 
modified project when it's changed and that would still allow to leverage other 
parts of the cache.

However, the requirement here would be helpful too; some parts of m2e only 
reacts for files modification on disk (to not cascade to recomputation of all 
dependency tree on every keystroke), so having cache invalidation on save 
without need to call any API would still make those parts functioning without 
modification.

> Invalidate project cache upon changes
> -------------------------------------
>
>                 Key: MNG-7027
>                 URL: https://issues.apache.org/jira/browse/MNG-7027
>             Project: Maven
>          Issue Type: Improvement
>            Reporter: Guillaume Nodet
>            Priority: Major
>
> To keep some kind of long-living cache (mvnd does this and I suppose m2e is 
> doing it too), the project cache needs to be invalidated (or disabled in the 
> case of m2e).
> It would be nice if the cached entries could be invalidated upon changes.  
> This could be done only for snapshots maybe (as non snapshots are kind 
> supposed to be immutable and that would save quite some processing).
> In order to be non disruptive, I propose the introduction of a new component 
> that would monitor files and that could be used by the {{ProjectBuilder}} to 
> manage the {{ModelCache}} and also the {{MavenPluginManager}} to manage the 
> {{PluginRealmCache}}.
> For the background: {{mvnd}} needs to redefine the {{ProjectBuilder}} and the 
> {{PluginRealmCache}} component to work around those problems, but the 
> {{DefaultProjectBuilder}} in particular is not really extensible and the 
> {{org.apache.maven.project}} package has a lot of package private classes 
> that makes defining a replacement class outside of the package quite 
> impossible.  This intermediate component would offer a pluggable way to solve 
> both {{ProjectBuilder}} and {{MavenPluginManager}} problems.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to