Building Keycloak 15.1.1 on Java 8

437 views
Skip to first unread message

shubham arora

unread,
Jan 27, 2022, 4:41:51 AM1/27/22
to Keycloak User
Hi,

I had cloned the Keycloak source code 15.1.1 from keycloak github page using the below mentioned steps: 

I was trying to build the keycloak project using mvn clean install.
Firstly, when I started building the full keycloak project, I was getting the error

""[ERROR] bad class file: C:\bin\java\apache-maven\repository\org\keycloak\keycloak-quarkus-server\15.1.1\keycloak-quarkus-server-15.1.1.jar(org/keycloak/quarkus/runtime/configuration/mappers/ConfigCategory.class)"

"class file has wrong version 55.0, should be 52.0"


After this, I moved to quarkus project and changed the pom.xml file to point it to Java8.

I have changed it in pom files for Quarkus project to build in Java 8 and have attached the changed pom files here.

On building the source code, I am getting compilation errors

[INFO] Keycloak Quarkus Parent ............................ SUCCESS [ 3.786 s]
[INFO] Keycloak Quarkus Server Extension .................. FAILURE [ 8.798 s]
[INFO] Keycloak Quarkus Server Deployment ................. SKIPPED
[INFO] Keycloak Quarkus Server App ........................ SKIPPED
[INFO] Keycloak Quarkus Test Parent ....................... SKIPPED
[INFO] Keycloak Quarkus Server Integration tests .......... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.205 s
[INFO] Finished at: 2022-01-27T14:19:10+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project keycloak-quarkus-server: Compilation failure: Compilation failure:
[ERROR] /C:/Keycloak/keycloak/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/PersistedConfigSource.java:[78,28] <identifier> expected
[ERROR] /C:/Keycloak/keycloak/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/PersistedConfigSource.java:[78,29] ')' expected
[ERROR] /C:/Keycloak/keycloak/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/PersistedConfigSource.java:[78,31] '{' expected



In documentation for 15.1.1, it is mentioned that Java 8 is supported. https://www.keycloak.org/docs/15.1/server_installation/index.html


I was checking the quarkus link and it is mentioned that it is supported from Java 11 onwards but in the official docs it is mentioned as  JAVA 8 JRE or JAVA 11 JRE. 

https://github.com/keycloak/keycloak/tree/15.1.1/quarkus 

Could you please suggest how we can proceed here?

pom.xml
pom.xml
pom.xml
pom.xml
Reply all
Reply to author
Forward
0 new messages