-
Bug
-
Resolution: Done
-
Major
-
RH-SSO-7.0.0.GA
-
None
-
None
-
Workaround Exists
-
-
Issue:
When I package a web application (war) inside a enterprise archive (ear) my Keycloak JBoss EAP Adapter configuration is ignored.
I think that the reason is that the web.xml module-name configuration is ignored when deployed in a EAR and the JBoss EAP adapter takes the war file name inside the EAR as module name.
Workaround
When a use the default package mechanism of Apache Maven, the final name of the WAR inside the EAR uses this pattern ${artifactId}-${version}.war, so, we need to change that. one way to do that is to configure the maven-ear-plugin to change the final name to ${artifactId}.war like the above example:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.10.1</version>
<configuration>
<modules>
<webModule>
<groupId>com.redhat.asouza.demo</groupId>
<artifactId>keycloak-demo-web</artifactId>
<contextRoot>/keycloak-demo-web</contextRoot>
<bundleFileName>keycloak-demo-web.war</bundleFileName>
</webModule>
</modules>
<version>6</version>
<defaultLibBundleDir>lib</defaultLibBundleDir>
</configuration>
</plugin>
Expected Result
The Keycloak JBoss EAP Adapter should respect the web.xml / module-name property regardless if a standalone WAR or a WAR inside a EAR