We are trying to build a modular jsf application. The application consists of a war file and several jar files. Each jar file contains .xhtml pages , associated beans and configuration files like faces-config.xml, web-fragment.xml and pretty-config.xml. When those jar files are placed inside WEB-INF/lib everything works fine.
However, we need to deploy the jar files independently of the war (like a plugin system).
In jboss 6, we tried placing the jar files in the deploy folder. We were able to view the .xhtml pages that were located inside the jar (all the deployed applications share the same classloading domain). However, the jar was not scanned for jsf annotations and the FacesContext was not properly initialized.
We also tried to deploy our application with a similar configuration in jboss 7 but we ran into other issues. The properties files that are located in the jar were not loaded and for some reason the CDI beans resolved always to null.
It would be nice if we could create a web application composed of reusable modules that are not packaged inside the war.
Any suggestions are welcome.
Thank you in advance.