aws-cloudformation / cloudformation-template-schema

Inline syntax validation, documentation links and autocompletion for your CloudFormation templates.
Apache License 2.0
141 stars 24 forks source link

Build fails with JDK 17 #62

Open sportrang opened 2 years ago

sportrang commented 2 years ago

mvn clean package ends with:

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  34.071 s
[INFO] Finished at: 2022-04-06T19:46:44+10:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project aws-cloudformation-template-schema: Fatal error compiling: java.lang.ExceptionInInitializerError: Unable to make field private com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors com.sun.tools.javac.processing.JavacProcessingEnvironment.discoveredProcs accessible: module jdk.compiler does not "opens com.sun.tools.javac.processing" to unnamed module @4abbe41c -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

System:

❯ mvn -v
Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)
Maven home: /Users/.../.sdkman/candidates/maven/current
Java version: 17.0.2, vendor: Azul Systems, Inc., runtime: /Users/.../.sdkman/candidates/java/17.0.2-zulu/zulu-17.jdk/Contents/Home
Default locale: en_AU, platform encoding: UTF-8
OS name: "mac os x", version: "11.6.1", arch: "aarch64", family: "mac"
sportrang commented 2 years ago

--add-opens may fix the issue.