Error compiling app-authz-jee-vanilla

Hi,
I am trying to compile one of the applications ( app-authz-jee-vanilla) included under keycloak-quickstarts.

I am using keycloak-10.0.1 and apache-maven-3.3.9 and I have followed all steps in this link https://www.keycloak.org/docs/latest/authorization_services/#_getting_started_overview

When I try to compile I got the following error;

cd keycloak-quickstarts/

[root@preprod-cdp keycloak-quickstarts]# cd app-authz-jee-vanilla/
[root@preprod-cdp app-authz-jee-vanilla]# mvn clean wildfly:deploy
[INFO] Scanning for projects…
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Keycloak Quickstart: app-authz-jee-vanilla 10.0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] — maven-clean-plugin:2.5:clean (default-clean) @ keycloak-app-authz-jee-vanilla —
[INFO] Deleting /opt/keycloak-quickstarts/app-authz-jee-vanilla/target
[INFO]
[INFO] >>> wildfly-maven-plugin:1.2.2.Final:deploy (default-cli) > package @ keycloak-app-authz-jee-vanilla >>>
[INFO]
[INFO] — maven-enforcer-plugin:1.4.1:enforce (enforce-quickstart-realm-file-exist) @ keycloak-app-authz-jee-vanilla —
[INFO]
[INFO] — maven-enforcer-plugin:1.4.1:enforce (enforce-keycloak-file-exist) @ keycloak-app-authz-jee-vanilla —
[INFO]
[INFO] — maven-resources-plugin:2.6:resources (default-resources) @ keycloak-app-authz-jee-vanilla —
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /opt/keycloak-quickstarts/app-authz-jee-vanilla/src/main/resources
[INFO]
[INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ keycloak-app-authz-jee-vanilla —
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /opt/keycloak-quickstarts/app-authz-jee-vanilla/target/classes
[INFO]
[INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ keycloak-app-authz-jee-vanilla —
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO]
[INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ keycloak-app-authz-jee-vanilla —
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 2 source files to /opt/keycloak-quickstarts/app-authz-jee-vanilla/target/test-classes
[WARNING] /opt/keycloak-quickstarts/app-authz-jee-vanilla/src/test/java/org/keycloak/quickstart/ArquillianJeeAuthzVanillaTest.java: /opt/keycloak-quickstarts/app-authz-jee-vanilla/src/test/java/org/keycloak/quickstart/ArquillianJeeAuthzVanillaTest.java uses or overrides a deprecated API.
[WARNING] /opt/keycloak-quickstarts/app-authz-jee-vanilla/src/test/java/org/keycloak/quickstart/ArquillianJeeAuthzVanillaTest.java: Recompile with -Xlint:deprecation for details.
[INFO]
[INFO] — maven-surefire-plugin:2.19.1:test (default-test) @ keycloak-app-authz-jee-vanilla —
[INFO] Tests are skipped.
[INFO]
[INFO] — maven-war-plugin:2.6:war (default-war) @ keycloak-app-authz-jee-vanilla —
[INFO] Packaging webapp
[INFO] Assembling webapp [keycloak-app-authz-jee-vanilla] in [/opt/keycloak-quickstarts/app-authz-jee-vanilla/target/app-authz-jee-vanilla]
[INFO] Processing war project
[INFO] Copying webapp webResources [/opt/keycloak-quickstarts/app-authz-jee-vanilla/config] to [/opt/keycloak-quickstarts/app-authz-jee-vanilla/target/app-authz-jee-vanilla]
[INFO] Copying webapp resources [/opt/keycloak-quickstarts/app-authz-jee-vanilla/src/main/webapp]
[INFO] Webapp assembled in [65 msecs]
[INFO] Building war: /opt/keycloak-quickstarts/app-authz-jee-vanilla/target/app-authz-jee-vanilla.war
[INFO]
[INFO] <<< wildfly-maven-plugin:1.2.2.Final:deploy (default-cli) < package @ keycloak-app-authz-jee-vanilla <<<
[INFO]
[INFO] — wildfly-maven-plugin:1.2.2.Final:deploy (default-cli) @ keycloak-app-authz-jee-vanilla —
Jun 03, 2020 5:45:04 PM org.jboss.remoting3.EndpointImpl
INFO: JBoss Remoting version 5.0.5.Final
Jun 03, 2020 5:45:04 PM org.xnio.Xnio
INFO: XNIO version 3.5.4.Final
Jun 03, 2020 5:45:04 PM org.xnio.nio.NioXnio
INFO: XNIO NIO Implementation Version 3.5.4.Final
Jun 03, 2020 5:45:04 PM org.wildfly.security.Version
INFO: ELY00001: WildFly Elytron version 1.1.7.Final
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.997 s
[INFO] Finished at: 2020-06-03T17:45:05+02:00
[INFO] Final Memory: 39M/300M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.2.2.Final:deploy (default-cli) on project keycloak-app-authz-jee-vanilla: Failed to execute goal deploy: {“WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:” => {“Operation step-1” => {“WFLYCTL0080: Failed services” => {“jboss.deployment.unit.“app-authz-jee-vanilla.war”.undertow-deployment” => “java.lang.RuntimeException: java.lang.RuntimeException: UT010039: Unknown authentication mechanism KEYCLOAK
[ERROR] Caused by: java.lang.RuntimeException: java.lang.RuntimeException: UT010039: Unknown authentication mechanism KEYCLOAK
[ERROR] Caused by: java.lang.RuntimeException: UT010039: Unknown authentication mechanism KEYCLOAK”}}}}
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Compilation seem to have succeeded according to the logs you posted.
It’s the deployment that failed -> Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.2.2.Final:deploy

https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html#maven-phases

hei,

I have found where the issue was, I missed some lines in standalone.xml;

To <extensions></extensions> , add:

   <extension module="org.keycloak.keycloak-adapter-subsystem"/>

To <profile></profile> , add:

   <subsystem xmlns="urn:jboss:domain:keycloak:1.1"/>

Thanks for your reply!

Regards