georchestra / georchestra-cas-server

Apache License 2.0
0 stars 3 forks source link

doesnt build with jdk17 #24

Closed landryb closed 5 months ago

landryb commented 9 months ago

changing target/source compat to 17 in https://github.com/georchestra/georchestra-cas-server/blob/master/gradle.properties#L15 still fails to build because of an old gradle lombok plugin version:

Execution failed for task ':compileJava'.
> java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x79dd5ec2) cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module @0x79dd5ec2
pmauduit commented 6 months ago

The CAS version being used in this repository is not compatible with Java > 11, I think we will have no choice than upgrading if we want to get more recent JVMs for build/runtime.

I already tried in the past (#13), it is not a big deal, but there is a bit of work I will call myself out related to templates/ui customizations.

landryb commented 6 months ago

and i suppose the cas component will soon be deprecated/unmaintained anyway in favor of the gateway...

pmauduit commented 6 months ago

Not 100% sure of this, as it is a convenient way to share the authentication backend from geOrchestra to other applications (we had some requests for providing oidc / oauth2 & samlv2 support).

landryb commented 6 months ago

Fwiw it's mostly a build-time issue, because the current 6.3.7.4 webapp works fine in tomcat 9 running with java 17.

landryb commented 6 months ago

giving another shot at updating to 6.6, i first have a build error with gradle (apparently 7.0) ?

Could not compile build file '/data/src/georchestra/georchestra-cas-server/build.gradle'.
> startup failed:
  General error during conversion: Unsupported class file major version 61

  java.lang.IllegalArgumentException: Unsupported class file major version 61
        at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:189)
        at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:170)
        at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:156)
        at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:277)

from my understanding of https://docs.gradle.org/current/userguide/compatibility.html gradle 7.3 is needed. I'll see if i can update the local copy in the repo.

pmauduit commented 6 months ago

class file version 61 is for Java 17 ; maybe a gradle upgrade will do, but I wonder if it won't make more sense to start back from the official template (https://github.com/apereo/cas-overlay-template) again.

landryb commented 6 months ago

class file version 61 is for Java 17 ; maybe a gradle upgrade will do, but I wonder if it won't make more sense to start back from the official template (https://github.com/apereo/cas-overlay-template) again.

maybe, but that's above my skills :)

pmauduit commented 6 months ago

I am not sure of the workflow for upgrading cas either, to be honest :)