Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6434

Make list of excluded resource directories in FileSystemResourceOrigin configurable

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 5.4.5
    • None
    • None

      As reported in SUPPORT-4979 we have an issue that the file-based resource loader currently loads a lot of stuff we don't want it to like our 'mgnl-bootstrap' folder. We really need the list of excluded directories to be made configurable.

      The issue is in the FileSystemResourceOrigin class where the list of excluded directories is currently hardcoded:

         /**
           * TODO: The current implementation makes assumptions about what directories to excludes;
           * Except for META-INF and WEB-INF, the others are highly installation dependent. We could probably use system properties
           * and/or make this configurable.
           */
          protected ExclusionsFilter buildExclusionsFilter() {
              return new ExclusionsFilter(rootPath, EXCLUDED_DIRECTORIES, Collections.<String>emptyList(), Collections.<String>emptyList());
          }
      

      Solution

      Decided to expose this directories in properties file with name:
      magnolia.resources.filesystem.observation.excludedDirectories

      It is commented by default and once one uncomments it, we would expect to have a present value in it for activating that property.
      Also It should be known that, this property values are trimmed which means that having a exclusion value with path ' bar ',
      will be filtering bar folder

        Acceptance criteria

              ilgun Ilgun Ilgun
              edgar Edgar Vonk
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD