Custom resource mapping can't simply reuse pre-generated RichFaces resources.
- user wants to use resource mapping for several purposes
- using RichFaces pre-generated resources in richfaces-components-ui.jar/META-INF/resources/org.richfaces.staticResources/<version>/...
- using custom mappings like javax.faces:jsf.js=patched-jsf.js using e.g. my.war/resources/patched-jsf.js
With 4.1.0.Final, configuration of org.richfaces.resourceMapping.location is by default referring to root of packed resources:
and mapping file looks like:
When you want to reuse RichFaces mappings, you need to copy mapping file from richfaces-component-ui.jar and extend it by custom properties.
and additionally you need to place custom resources to directory called specifically for RF, like:
- change all mappings in custom-mappings.properties at own
- copy all resources from richfaces-component-ui.jar to own location
For simplification, I suggest default resource mapping location root be
so it would refer to JSF resources root (my.war/resources or some.jar/META-INF/resources) by default.
Then, we would force richfaces-components-ui.jar to define mappings which points from JSF resources root, e.g.:
Additionally, Brian suggested support for multiple mapping.properties files, so their content will be merged.
It means user won't be forced to copy&paste RichFaces mapping configuration from richfaces-components-ui.jar.
Finally, the only thing user would need to define is: