How to configure the Multi-JSF feature in EAP 8
Environment
- Red Hat Enterprise Application Platform (EAP) 8
- Java Server Faces
- Jakarta Faces
Issue
- How to configure the Multi-JSF feature in EAP 8
- How to migrate our Multi JSF configuration that is using MyFaces from EAP 7 to EAP 8 ?
Resolution
Note: EAP 8.0 is a Jakarta EE10 implementation and the EE9+ class namespaces/packages changed from javax -> jakarta. As such, only JSF implementation versions that have updated the namespace to jakarta can be used and EE10 requires JSF 4.0 (Supported Standards), thus to use a different JSF implementation with the Multi-JSF feature, it needs to be a JSF 4.0 implementation.
Using the GUI Installer
If using the This content is not included.JBoss EAP 8.0 Installer, in step 7 Configure Runtime, select Perform advanced configuration and check Install JSF implementation, which will allow you to select MyFaces and the URL/path to a maven repository to retrieve the MyFaces jars and will install the MyFaces multi-jsf feature pack along with your myfaces jars.
Using the installation manager
Using either the This content is not included.JBoss EAP 8.0 Installation Manager or $JBOSS_HOME/bin/jboss-eap-installation-manager.sh from the JBoss EAP archive/zip installation, similar to shown in the adding feature packs documentation, you would:
- add a channel for myfaces
- create a manifest containing the myfaces jar versions
- add the myfaces feature pack
For example, see attached myfaces-4.0.2-manifest.yaml which specifies to use myfaces-api / myfaces-impl version 4.0.2
./bin/jboss-eap-installation-manager.sh channel add --channel-name=myfaces --manifest=myfaces-4.0.2-manifest.yaml --repositories=https://repo1.maven.org/maven2/
mvn deploy:deploy-file -Dfile=myfaces-4.0.2-manifest.yaml -DgroupId=org.apache.myfaces.channel -DartifactId=myfaces -Dclassifier=manifest -Dpackaging=yaml -Dversion=4.0.2 -Durl=file:/home/jboss/.m2/repository
./bin/jboss-eap-installation-manager.sh fp add --fpl=org.jboss.eap:eap-myfaces-feature-pack --layers=myfaces
The repository to retrieve the MyFaces jars can be any Maven repository.
Also once configured, if you deploy an updated manifest file, then any EAP subscribed to this MyFaces channel will automatically update MyFaces when update is called from the EAP Installation Manager, JBoss CLI or Web Console.
Related Solutions
Root Cause
As part of the javax -> jakarta namespace change, users using the Multi-JSF in EAP 7 will need to migrate that configuration for EAP 8 as the names have changed. EAP 8 also includes a simpler way of setting up Multi-JSF.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.