<?xml version="1.0" ?>
<!--
  ~ Copyright The WildFly Authors
  ~ SPDX-License-Identifier: Apache-2.0
  -->

<layer-spec xmlns="urn:jboss:galleon:layer-spec:2.0" name="jsf">
    <props>
        <prop name="org.wildfly.category" value="Jakarta EE"/>
        <prop name="org.wildfly.description" value="Support for Jakarta Faces."/>
        <prop name="org.wildfly.rule.xml-path" value="/WEB-INF/web.xml,/web-app/servlet/servlet-class,jakarta.faces.webapp.FacesServlet"/>
        <prop name="org.wildfly.rule.expected-file" value="/WEB-INF/faces-config.xml"/>
        <prop name="org.wildfly.rule.annotations" value="jakarta.faces.annotation"/>
        <prop name="org.wildfly.rule.class" value="jakarta.faces.*"/>
    </props>
    <dependencies>
        <layer name="web-server"/>
        <layer name="cdi"/>
        <layer name="bean-validation" optional="true"/>
    </dependencies>
    <feature spec="subsystem.jsf"/>
    <packages>
        <!-- The jsf-injection module the subsystem looks for depends on the value
             of the subsystem root resource's default-jsf-impl-slot attribute.
             This means the subsystem doesn't know it needs the org.jboss.as.jsf-injection:main
             module. But this layer is meant for the default JSF install, so we do know.
             TODO perhaps make this package a separate optional layer. But maybe other layers
             that install alternative impls could just exclude this package.
        -->
        <package name="org.jboss.as.jsf-injection" optional="true"/>
    </packages>
</layer-spec>