Source:
<code>public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { moduleIdFactory = JSFModuleIdFactory.getInstance(); final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final DeploymentUnit tl = deploymentUnit.getParent() == null ? deploymentUnit : deploymentUnit.getParent(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); final ModuleLoader moduleLoader = Module.getBootModuleLoader(); String jsfVersion = JsfVersionMarker.getVersion(tl).equals(JsfVersionMarker.NONE)? JSFModuleIdFactory.getInstance().getDefaultSlot() : JsfVersionMarker.getVersion(tl); String defaultJsfVersion = JSFModuleIdFactory.getInstance().getDefaultSlot(); if(JsfVersionMarker.isJsfDisabled(deploymentUnit)) { addJSFAPI(JsfVersionMarker.JSF_2_0, moduleSpecification, moduleLoader); <START> if (jsfVersion.equals(defaultJsfVersion) && !moduleIdFactory.isValidJSFSlot(jsfVersion)) { <END> throw JSFLogger.ROOT_LOGGER.invalidDefaultJSFImpl(defaultJsfVersion); } return; } if (!DeploymentTypeMarker.isType(DeploymentType.WAR, deploymentUnit) && !DeploymentTypeMarker.isType(DeploymentType.EAR, deploymentUnit)) { return; } if (jsfVersion.equals(JsfVersionMarker.WAR_BUNDLES_JSF_IMPL)) { return; } if (!moduleIdFactory.isValidJSFSlot(jsfVersion)) { JSFLogger.ROOT_LOGGER.unknownJSFVersion(jsfVersion, defaultJsfVersion); jsfVersion = defaultJsfVersion; } if (jsfVersion.equals(defaultJsfVersion) && !moduleIdFactory.isValidJSFSlot(jsfVersion)) { throw JSFLogger.ROOT_LOGGER.invalidDefaultJSFImpl(defaultJsfVersion); } addJSFAPI(jsfVersion, moduleSpecification, moduleLoader); addJSFImpl(jsfVersion, moduleSpecification, moduleLoader); moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, JSF_SUBSYSTEM, false, false, true, false)); addJSFInjection(jsfVersion, moduleSpecification, moduleLoader); WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY); if(warMetaData != null) { addCDIFlag(warMetaData, deploymentUnit); } }</code><technical_language>I this addJSFAPI call. If fail, fail promptly</technical_language>

Target:
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final DeploymentUnit tl = deploymentUnit.getParent() == null ? deploymentUnit : deploymentUnit.getParent(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); final ModuleLoader moduleLoader = Module.getBootModuleLoader(); String jsfVersion = JsfVersionMarker.getVersion(tl).equals(JsfVersionMarker.NONE)? JSFModuleIdFactory.getInstance().getDefaultSlot() : JsfVersionMarker.getVersion(tl); String defaultJsfVersion = JSFModuleIdFactory.getInstance().getDefaultSlot(); if(JsfVersionMarker.isJsfDisabled(deploymentUnit)) { if (jsfVersion.equals(defaultJsfVersion) && !moduleIdFactory.isValidJSFSlot(jsfVersion)) { throw JSFLogger.ROOT_LOGGER.invalidDefaultJSFImpl(defaultJsfVersion); } addJSFAPI(JsfVersionMarker.JSF_2_0, moduleSpecification, moduleLoader); return; } if (!DeploymentTypeMarker.isType(DeploymentType.WAR, deploymentUnit) && !DeploymentTypeMarker.isType(DeploymentType.EAR, deploymentUnit)) { return; } if (jsfVersion.equals(JsfVersionMarker.WAR_BUNDLES_JSF_IMPL)) { return; } if (!moduleIdFactory.isValidJSFSlot(jsfVersion)) { JSFLogger.ROOT_LOGGER.unknownJSFVersion(jsfVersion, defaultJsfVersion); jsfVersion = defaultJsfVersion; } if (jsfVersion.equals(defaultJsfVersion) && !moduleIdFactory.isValidJSFSlot(jsfVersion)) { throw JSFLogger.ROOT_LOGGER.invalidDefaultJSFImpl(defaultJsfVersion); } addJSFAPI(jsfVersion, moduleSpecification, moduleLoader); addJSFImpl(jsfVersion, moduleSpecification, moduleLoader); moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, JSF_SUBSYSTEM, false, false, true, false)); addJSFInjection(jsfVersion, moduleSpecification, moduleLoader); WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY); if(warMetaData != null) { addCDIFlag(warMetaData, deploymentUnit); } }