My spring app is not deploying stopping at build fail

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project raji: Compilation failure
[ERROR] /workspace/src/main/java/payroll/Employee.java:[5,27] cannot access jakarta.persistence.Entity
[ERROR] bad class file: /layers/heroku_maven/repository/jakarta/persistence/jakarta.persistence-api/3.1.0/jakarta.persistence-api-3.1.0.jar(jakarta/persistence/Entity.class)
[ERROR] class file has wrong version 55.0, should be 52.0
[ERROR] Please remove or make sure it appears in the correct subdirectory of the classpath.
[ERROR] → [Help 1]

this is the error message

Most likely koyeb is running with older version of java. Try creating system.properties file and specify java.runtime.version=17 in it.

Any idea on the below issue

[INFO]
[INFO] — clean:3.3.2:clean (default-clean) @ epatient_restapi —
[INFO]
[INFO] — resources:3.3.1:resources (default-resources) @ epatient_restapi —
[INFO] Copying 1 resource from src/main/resources to target/classes
[INFO] Copying 0 resource from src/main/resources to target/classes
[INFO]
[INFO] — compiler:3.11.0:compile (default-compile) @ epatient_restapi —
[INFO] Changes detected - recompiling the module! :source
[INFO] Compiling 11 source files with javac [debug release 17] to target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.846 s
[INFO] Finished at: 2024-09-10T14:55:45Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project epatient_restapi: Fatal error compiling: invalid flag: --release → [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.