Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6911

Allow the Maven model cache tto recache a maven model on request

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.6.3
    • None
    • IDEs, POM
    • None
    • Linux (Fedora 30-32)

    Description

      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.

       

      System.setProperty(DefaultProjectBuilder.DISABLE_GLOBAL_MODEL_CACHE_SYSTEM_PROPERTY, Boolean.toString(true));
      

       

      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.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            AObuchow Andrew Obuchowicz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: