You cannot block certain parts of faces-config.xml in a third-party JAR from interpretation.
You have basically 2 options:
Block all faces-config.xml in a third-party JAR from interpretation by adding metadata-complete="true" to webapp own faces-config.xml .
<faces-config ... metadata-complete="true">
Note that this also skips annotation scanning in third-party JAR classes. You basically need to override the specific parts that you would like to use in your own faces-config.xml web application.
Provide the Lifecycle LifecycleFactory that you registered with <factory><lifecycle-factory> for webapp faces-config.xml . In this implementation, override addPhaseListener() accordingly for execution, for example. a instanceof before skipping or continuing.
source share