You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Guillaume Nodet (Jira)" <ji...@apache.org> on 2024/08/27 08:10:00 UTC
[jira] [Updated] (MNG-6911) Allow the Maven model cache to recache a maven model on request
[ https://issues.apache.org/jira/browse/MNG-6911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet updated MNG-6911:
---------------------------------
Summary: Allow the Maven model cache to recache a maven model on request (was: Allow the Maven model cache tto recache a maven model on request)
> Allow the Maven model cache to recache a maven model on request
> ---------------------------------------------------------------
>
> Key: MNG-6911
> URL: https://issues.apache.org/jira/browse/MNG-6911
> Project: Maven
> Issue Type: Bug
> Components: IDEs, POM
> Affects Versions: 3.6.3
> Environment: Linux (Fedora 30-32)
> Reporter: Andrew Obuchowicz
> Priority: Major
>
> Hi, I'm one of the developers of [LemMinX-Maven|[https://github.com/eclipse/lemminx-maven]] which is a project that implements the Language Server Protocol for editing Maven pom.xml files (any LSP client editor can easily gain pom.xml editing features with this project).
>
> We've encountered an [issue|[https://github.com/eclipse/lemminx-maven/pull/67]] where modifications to a parent pom (such as adding a new property) are not reflected in the child pom, as the global model cache has an outdated version of the parent pom (before the modification was made).
>
> Disabling the global model cache works as a temporary workaround, eg.
>
> {code:java}
> System.setProperty(DefaultProjectBuilder.DISABLE_GLOBAL_MODEL_CACHE_SYSTEM_PROPERTY, Boolean.toString(true));
> {code}
>
> However, we'd still like to use the model cache and not have to disable it entirely.
>
> Thus, it would be beneficial if the model cache could "uncache" (or refresh) a pom that has been modified. From our project, we can easily detect when a pom.xml has been modified, thus tracking pom modifications does not need to be implemented. *What is required on the Maven API side* is to be able to signal that a pom.xml has been modified, and should be recached with the new modifications.
>
> Also, I apologize in advance if this was reported under the wrong project or component. Feel free to place it where it should be.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)