Amazon Corretto Requirement cas 7.x.x

283 views
Skip to first unread message

Emmett MacDonald

unread,
Jul 31, 2024, 11:34:23 AM7/31/24
to CAS Community
It seems as though amazon corretto has become a new build requirement for cas overlay 7.x.x. Does anyone know why this is?

Emmett

Dmitriy Kopylenko

unread,
Jul 31, 2024, 3:21:26 PM7/31/24
to cas-...@apereo.org
Not actually the case. 

Here's the successful build of overlay template (7.1.0-SNAPSHOT), freshly cloned from here: https://github.com/apereo/cas-overlay-template

JDK 21 from Zulu:

> java -version
openjdk version "21.0.4" 2024-07-16 LTS
OpenJDK Runtime Environment Zulu21.36+17-CA (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM Zulu21.36+17-CA (build 21.0.4+7-LTS, mixed mode, sharing)

>./gradlew clean build
Configuration on demand is an incubating feature.

> Configure project :
Building CAS version 7.1.0-SNAPSHOT with application server -tomcat

BUILD SUCCESSFUL in 7s
8 actionable tasks: 5 executed, 3 from cache


D.

On Wed, Jul 31, 2024 at 11:34 AM Emmett MacDonald <emmettam...@gmail.com> wrote:
It seems as though amazon corretto has become a new build requirement for cas overlay 7.x.x. Does anyone know why this is?

Emmett

--
- Website: https://apereo.github.io/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/cc046974-7f03-4df1-8b2b-d22186895bc6n%40apereo.org.

AJ

unread,
Jul 31, 2024, 10:56:02 PM7/31/24
to cas-...@apereo.org
I’ve built it successfully with just OpenJDK.


On Jul 31, 2024, at 3:21 PM, Dmitriy Kopylenko <dkopy...@unicon.net> wrote:



wouldsmina

unread,
Aug 1, 2024, 8:02:37 AM8/1/24
to cas-...@apereo.org
I've just tried with azul openjdk (https://www.azul.com/downloads/#zulu) but I keep getting the same error.

* What went wrong:
Could not determine the dependencies of task ':bootWar'.
> Could not resolve all dependencies for configuration ':runtimeClasspath'.
   > Failed to calculate the value of task ':compileJava' property 'javaCompiler'.
      > Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=21, vendor=matching('AMAZON'), implementation=vendor-specific} for LINUX on x86_64.
         > No matching toolchain could be found in the locally installed toolchains or the configured toolchain download repositories.

# java --version
openjdk 21.0.4 2024-07-16 LTS

OpenJDK Runtime Environment Zulu21.36+17-CA (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM Zulu21.36+17-CA (build 21.0.4+7-LTS, mixed mode, sharing)

JAVA_HOME=/usr/lib/jvm/zulu-21-amd64/

Wouldsmina

Dmitriy Kopylenko

unread,
Aug 1, 2024, 9:32:57 AM8/1/24
to cas-...@apereo.org
There's is this setting in gradle.properties:

# This property controls the JVM vendor that is used to by Gradle toolchains.
# You may want to build CAS using a Java version that is not supported for running Gradle
# by setting this property to the vendor of the JDK you want to use.
# Other options include: AMAZON, ADOPTIUM, JETBRAINS, MICROSOFT, ORACLE, SAP, BELLSOFT, etc.
jvmVendor=AMAZON


What it does is using the referenced vendor's toolchain, downloads it, and uses it for compilation. It DOES default to Correto, yes, but setting it to any other vendor toolchain that you might prefer for compilation, it should download it and use it. I've tried several (those JDKs that are not statically installed on my system) and it worked flawlessly. For example here's part of the build output for jvmVendor=LIBERICA

>./gradlew clean build

...

D.

On Thu, Aug 1, 2024 at 8:56 AM Dmitriy Kopylenko <dkopy...@unicon.net> wrote:
Something is messing with the build in your environment. Did you use completely fresh overlay?

D. 

Dmitriy Kopylenko

unread,
Aug 1, 2024, 9:32:57 AM8/1/24
to cas-...@apereo.org
Something is messing with the build in your environment. Did you use completely fresh overlay?

D. 
On Thu, Aug 1, 2024 at 08:02 wouldsmina <would...@gmail.com> wrote:

Dmitriy Kopylenko

unread,
Aug 1, 2024, 9:34:08 AM8/1/24
to cas-...@apereo.org
Here's more info on Gradle's toolchain auto-detection: https://docs.gradle.org/8.9/userguide/toolchains.html#sec:auto_detection

D.

AJ

unread,
Aug 1, 2024, 9:41:50 AM8/1/24
to cas-...@apereo.org
I don’t have that config in 7.0.x.
I haven’t started looking at 7.1.x yet. 

On Aug 1, 2024, at 9:34 AM, Dmitriy Kopylenko <dkopy...@unicon.net> wrote:



wouldsmina

unread,
Aug 1, 2024, 11:13:30 AM8/1/24
to cas-...@apereo.org
Thank you Dmitriy. It works with jvmVendor=ORACLE (with a warning though):

# ./gradlew clean build
Starting a Gradle Daemon (subsequent builds will be faster)

Configuration on demand is an incubating feature.

> Configure project :
Building CAS version 7.1.0-SNAPSHOT with application server -tomcat
Invalid Java installation found at '/root/.gradle/.tmp/jdks/openjdk-217603280809659208855.tmp' (provisioned toolchain) auto-detected auto-provisioned. It will be re-checked in the next build. This might have performance impact if it keeps failing. Run the 'javaToolchains' task for more details.

BUILD SUCCESSFUL in 1m 30s
8 actionable tasks: 8 executed
root@spartana-b3:~/Installer/cas-overlay-template#

Reply all
Reply to author
Forward
0 new messages