Skip to content

Conversation

@wendigo
Copy link
Contributor

@wendigo wendigo commented Jul 8, 2025

This allows ./mvnw to fail gracefully if the used JDK version is <24 which introduced sun-misc-unsafe-memory-access (https://openjdk.org/jeps/498)

After:

trino on  serafin/ignore-maven-unrecognized [$?] is 📦 v477-SNAPSHOT via ☕ via 🐍 on ☁️
❯ sdk use java 21-tem

Using java version 21-tem in this shell.

./mvnw clean install
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.6.0:enforce (default) on project trino-root:
[ERROR] Rule 11: org.apache.maven.enforcer.rules.version.RequireJavaVersion failed with message:
[ERROR] Detected JDK /Users/mateusz.gajewski/.sdkman/candidates/java/21-tem is version 21 which is not in the allowed range [24.0.1,).

Before:

❯ ./mvnw clean install
Unrecognized option: --sun-misc-unsafe-memory-access=allow
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Description

Additional context and related issues

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

## Section
* Fix some things. ({issue}`issuenumber`)

This allows ./mvnw to fail gracefully if the used JDK version is <24
which introduced sun-misc-unsafe-memory-access (https://openjdk.org/jeps/498)
@cla-bot cla-bot bot added the cla-signed label Jul 8, 2025
@wendigo wendigo requested review from ebyhr, losipiuk and martint July 8, 2025 16:15
@wendigo wendigo merged commit 5bf4795 into master Jul 8, 2025
100 of 104 checks passed
@wendigo wendigo deleted the serafin/ignore-maven-unrecognized branch July 8, 2025 16:53
@github-actions github-actions bot added this to the 477 milestone Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants