Skip to content

CASSJAVA-135 Update the build to use Java17 rather than Java8 - #2098

Open
absurdfarce wants to merge 2 commits into
apache:trunkfrom
absurdfarce:cassjava135
Open

CASSJAVA-135 Update the build to use Java17 rather than Java8#2098
absurdfarce wants to merge 2 commits into
apache:trunkfrom
absurdfarce:cassjava135

Conversation

@absurdfarce

@absurdfarce absurdfarce commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Replaces #2096

@absurdfarce

Copy link
Copy Markdown
Contributor Author

Jenkins run on this new branch was also green (minus the PointIT issues which should be addressed by #2097)

@absurdfarce

Copy link
Copy Markdown
Contributor Author

Ping @tolbertam for visibility after moving to a new PR

@SiyaoIsHiding SiyaoIsHiding left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break ASF CI, right?

Comment thread Jenkinsfile-datastax
'openjdk@1.11', // OpenJDK version 11
'openjdk@1.17', // OpenJDK version 17
'openjdk@1.21', // OpenJDK version 21
'openjdk@21', // OpenJDK version 21

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We verified this change?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was 'openjdk@1.21' breaking?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, "openjdk@1.21" wasn't working. The Jenkins runners use "jabba install openjdk@21" in their setup scripts and the difference is enough to throw things off.

I was seeing build failures caused by an inability to find Java when using "openjdk@1.21"... and those problems went away immediately when switching to "openjdk@21".

Comment thread Jenkinsfile-datastax

mvn -B -V ${INTEGRATION_TESTS_FILTER_ARGUMENT} -T 1 verify \
-Ptest-jdk-'''+testJavaVersion+''' \
-DtestJavaHome='''+testJavaHome+''' \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we don't need those profiles -Ptest-jdk-'''+testJavaVersion+''' anymore?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those profiles were put in place to implement a few extra CLI args that needed to be added for Java13 and up. Since we've moved our baseline up from Java8 to Java17 with this PR those configs apply in all cases now. So there's no reason to keep the profiles around; they'd all contain the same content, which would beg the question about why we didn't just roll them into a common config... which is what this PR does.

@absurdfarce

Copy link
Copy Markdown
Contributor Author

Hmmm, we might need to make some changes to the ASF CI to get it to build with Java17 as a default. But we probably need a general cleanup there anyway since I don't think the Java25 changes included any updates to the ASF Jenkinsfile either.

Might be worth just having a general "update the ASF CI" PR once this goes in.

@SiyaoIsHiding

Copy link
Copy Markdown
Contributor

What do I need to do locally to run mvn clean install -DskipTests -Dmaven.javadoc.skip=true;? I checked out your branch, switched to java 17, but then got

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.15.0:compile (default-compile) on project java-driver-core: Fatal error compiling: error: release version 17 not supported -> [Help 1]

@absurdfarce

absurdfarce commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Are you sure you switched to Java17 @SiyaoIsHiding? We switch to using the maven.compiler.release property in this PR since that's the standard way of notating this for "newer" JDKs (by which they apparently mean anything older than Java9). The error you're seeing seems to suggest that your javac version can't support "-release 17" which in turn makes me think you might still be using an older JDK.

To validate I executed mvn clean install -DskipTests=true in the core directory using Java11 and got exactly the error you cited. Switching to Java17 immediately resolved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants