Using DeltaSpike within your CDI/JSF portlet is a very straightforward process. The most important thing to note about using DeltaSpike in a portlet, is to disable the client window render mode by setting ClientWindowRenderMode.NONE.
To see DeltaSpike in action in a portlet, first we need to get the JSF/CDI example application for DeltaSpike from https://github.com/apache/deltaspike/tree/master/deltaspike/examples/jsf-examples.
We then need to add the following Maven dependencies to the project:
<dependency>
<groupId>org.jboss.portletbridge</groupId>
<artifactId>jsf2-depchain</artifactId>
<version>3.2.0.Final</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.gatein</groupId>
<artifactId>cdi-portlet-integration</artifactId>
<version>1.0.1.Final</version>
</dependency>
Modify SampleClientWindowConfig to return ClientWindowRenderMode.NONE instead of ClientWindowRenderMode.CLIENTWINDOW.
Finally add the portlet.xml from https://github.com/portletbridge/portletbridge/tree/master/examples/deltaspike-portlet to make it accessible as a portlet.