[MGNLRES-58] How to use FileSystemResourcesLoader with a custom path Created: 30/Apr/13  Updated: 29/Mar/22  Resolved: 14/Mar/22

Status: Closed
Project: Magnolia Resources Module
Component/s: resourceLoaders
Affects Version/s: 1.5.6, 2.0
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Fatha Idrees Assignee: Unassigned
Resolution: Obsolete Votes: 0
Labels: maintenance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Team: Nucleus

 Description   

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.


Generated at Mon Feb 12 06:46:58 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.