keycloak / keycloak-benchmark

Keycloak Benchmark

Home Page:https://www.keycloak.org/keycloak-benchmark/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doc Bug: Building benchmark module requires OpenJDK 21

orivat opened this issue · comments

Describe the bug

Doc states

https://www.keycloak.org/keycloak-benchmark/benchmark-guide/latest/building-benchmark

Building the benchmark module
Build the Keycloak Benchmark module from the sources to run customized tests or the latest nightly changes. There are also pre-built binaries to download.

Prerequisites
Git repository https://github.com/keycloak/keycloak-benchmark checked out

Java Version 11 installed

Maven installed

Version

KC 25.0.4

Expected behavior

Successful compilation

Currently failing with error message:
Fatal error compiling: error: invalid target release: 21

Actual behavior

mvn -f benchmark/pom.xml clean install
[INFO] Scanning for projects...
[INFO]
[INFO] -------------< org.keycloak.benchmark:keycloak-benchmark >--------------
[INFO] Building keycloak-benchmark 0.14-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ keycloak-benchmark ---
[INFO] Deleting /home/testuser/dev_2024/keycloak-benchmark/benchmark/target
[INFO]
[INFO] --- scala:4.8.1:add-source (add-source) @ keycloak-benchmark ---
[INFO] Add Source directory: /home/testuser/dev_2024/keycloak-benchmark/benchmark/src/main/scala
[INFO] Add Test Source directory: /home/testuser/dev_2024/keycloak-benchmark/benchmark/src/test/scala
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ keycloak-benchmark ---
[INFO] Copying 5 resources from src/main/resources to target/classes
[INFO]
[INFO] --- compiler:3.11.0:compile (default-compile) @ keycloak-benchmark ---
[INFO] Changes detected - recompiling the module! :source
[INFO] Compiling 8 source files with javac [debug target 21] to target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.224 s
[INFO] Finished at: 2024-08-28T09:31:47+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project keycloak-benchmark: Fatal error compiling: error: invalid target release: 21 -> [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

How to Reproduce?

  1. Using OpenJDK 11
  2. running command
    mvn -f benchmark/pom.xml clean install

Anything else?

It works fine when JDK in use is JDK 21

Thanks for reporting this. I've updated the docs to ask for JDK21 to be installed. The change should be visible online once the build is complete in a few minutes.