Uploaded image for project: 'Magnolia Resources Module'
  1. Magnolia Resources Module
  2. MGNLRES-58

How to use FileSystemResourcesLoader with a custom path

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Neutral Neutral
    • None
    • 1.5.6, 2.0
    • resourceLoaders

      I added the FileSystemResourceLoader in the Config and set a custom path but it does not work.

      I tried to get the file this way .../resources/filenmae.css and .../resources/custom_path/filenmae.css

      And by compiling the reosurce module i got this error:

      The Error exit because there is mixing of slash an backslash in the basePath for the FileSystemResourceLoader.

      ...
      ...
      -------------------------------------------------------
      T E S T S
      -------------------------------------------------------
      Running info.magnolia.module.resources.gui.ResourcesTemplateColumnTest
      Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.998 sec
      Running info.magnolia.module.resources.renderers.ResourcesTextTemplateRendererTest
      Tests run: 7, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.5 sec <<< FAILURE!
      Running info.magnolia.module.resources.setup.InstallResourceTaskTest
      Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec

      Results :

      Tests in error:
      testResourcesAreLoadedFromArbitraryPath(info.magnolia.module.resources.renderers.ResourcesTextTemplateRendererTest): Template /style.css not found.

      Tests run: 12, Failures: 0, Errors: 1, Skipped: 0

      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 4.731s
      [INFO] Finished at: Tue Apr 30 15:07:05 CEST 2013
      [INFO] Final Memory: 15M/220M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project magnolia-module-resources: There are test failures.

        Acceptance criteria

              Unassigned Unassigned
              fateidrees Fatha Idrees
              Nucleus
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD