7. JSF: Including additional files in Maven (local jars, JNDI datasources, properties, resource bundles ..)
This is briefly exposed in an earlier post , but I think it is important to return to this aspect. I am using Eclipse Oxygen and working with Maven projects. 1. Web configuration files 1. Files beans.xml and faces-config.xml should be placed in: src/main/webapp/WEB-INF/ beans.xml src/main/webapp/WEB-INF/ faces-config.xml 2. Some aspects of file web.xml can be replaced or implemented in a java class annotated with @WebListener that implements ServletContextListener interface. BalusC explains in detail this issue. But if you need to use this file (not all capabilities of web.xml can be easily replaced programmatically as explains Piotr ), you can locate it in the same folder as beans.xml and faces-config.xml files src/main/webapp/WEB-INF/ web.xml 2. JPA persistence.xml 1. File persistence.xml should be placed in META-INF in the resources folder. src/main/reso...