Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --add-opens to surefire for running tests on Java SE 17+ #565

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

starksm64
Copy link
Member

Short description of what this resolves:

The CDIInjectionEnricherTestCase relies on Weld being able to make protected/private fields accessible. This requires additional access permissions when running under Java SE 17+

Changes proposed in this pull request:

Add an override to the surefire plugin configuration to include a --add-opens java.base/java.lang=ALL-UNNAMED

Fixes #564

@jamezp
Copy link
Collaborator

jamezp commented Jun 28, 2024

This probably needs to be in a profile where we check the Java version. That said, I wonder at what point we drop Java 8 support :)

@starksm64
Copy link
Member Author

This probably needs to be in a profile where we check the Java version. That said, I wonder at what point we drop Java 8 support :)

Certainly we will drop it when the main branch goes to 2.0 and SE 21 as the baseline.

Pulling this code out into a separate legacy repo will also simplify things. For now I have added the profile.

@starksm64 starksm64 merged commit b220408 into master Jun 28, 2024
5 checks passed
@starksm64 starksm64 deleted the starksm64-patch-iss564 branch September 6, 2024 13:52
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.

Building the core repo with any Java version > 11 fails due to access errors
2 participants