I have a JSF 1.2 based Java web-application that is packaged as an EAR. It contains several JARs and one WAR that provides a web-UI as frontend. The WAR contains JSF pages (XHTML), CSS files and other web-resources like images. The build-system in use is maven 2 (multi-module project).
The goal is now to provide different "flavours" of the web-UI. Every flavour could have different style-sheets and different images but same functionality.
The question is, how could I do this without much code duplication/overhead. I guess I have to create several WAR modules (one for every flavour) and several EARs that depend on the different WARs. Disadvantage of this is that two more modules with all it's configuration have to be added for every flavour. All the JSF pages would have to be duplicated, which is really not nice (ok, providing the XHTMLs via a separate archive and using Maven's remote resources plugin to share remote resources could possibly help here).
- Is the described setup the best solution to my problem or are there better ways?
- Is there a way to change the style at runtime? I.e. provide the CSS-files and images as external resources?
Thanks in advance,
- martin