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

maven-war-plugin v2.3 incompatible with JDK 16+ #71

Open
what-the-functor opened this issue Feb 1, 2024 · 0 comments
Open

maven-war-plugin v2.3 incompatible with JDK 16+ #71

what-the-functor opened this issue Feb 1, 2024 · 0 comments

Comments

@what-the-functor
Copy link

what-the-functor commented Feb 1, 2024

Using a JDK v16+ to build the war file produces the following error.

pushd modules/war
mvn package
ExceptionInInitializerError: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module...

The war file builds successfully if JDK v11 through v15 is used.

Suggested fix, one of:

  • A: Update the maven-war-plugin version (might break compatibility with other JDKs)
  • B: Set the JDK version in the POM file to one of JDK v11 - v15 (I haven't tested this)
  • C: Update the documentation to instruct the user to build with one of JDK v11 - v15

Please let me know what you prefer, and I'll create a PR.

@what-the-functor what-the-functor changed the title maven-war-plugin v2.3 incompatible with recent JDK 16+ maven-war-plugin v2.3 incompatible with JDK 16+ Feb 1, 2024
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

No branches or pull requests

1 participant