starlarky
starlarky copied to clipboard
Maven install fails on jdk 16
Problem or feature statement
Followed the documentation here: https://www.verygoodsecurity.com/docs/larky/test-larky-locally
Configured my personal access token in my settings.xml
Yet the build fails.
matias@MacBook-Pro-de-Matias starlarky % jenv local versions
jenv: version `versions' not installed
matias@MacBook-Pro-de-Matias starlarky % jenv versions
system
* 16 (set by /Users/matias/projects/scripts/vault/poc/starlarky/.java-version)
16.0
16.0.1
openjdk64-16.0.1
matias@MacBook-Pro-de-Matias starlarky % jenv local 16
matias@MacBook-Pro-de-Matias starlarky % jenv exec mvn clean package install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Detecting the operating system and CPU architecture
[INFO] ------------------------------------------------------------------------
[INFO] os.detected.name: osx
[INFO] os.detected.arch: x86_64
[INFO] os.detected.bitness: 64
[INFO] os.detected.version: 11.3
[INFO] os.detected.version.major: 11
[INFO] os.detected.version.minor: 3
[INFO] os.detected.classifier: osx-x86_64
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] libstarlark [jar]
[INFO] larky [jar]
[INFO] runlarky [jar]
[INFO] starlarky [pom]
[INFO]
[INFO] -------------------< net.starlark.java:libstarlark >--------------------
[INFO] Building libstarlark 1.0.0-SNAPSHOT [1/4]
[INFO] from libstarlark/pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ libstarlark ---
[INFO] Deleting /Users/matias/projects/scripts/vault/poc/starlarky/libstarlark/target
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ libstarlark ---
[INFO] Copying 95 resources from src/main/java to target/classes
[INFO] skip non existing resourceDirectory /Users/matias/projects/scripts/vault/poc/starlarky/libstarlark/src/main/resources
[INFO] Copying 102 resources from src/test/java to target/classes
[INFO] skip non existing resourceDirectory /Users/matias/projects/scripts/vault/poc/starlarky/libstarlark/src/test/resources
[INFO]
[INFO] --- compiler:3.13.0:compile (default-compile) @ libstarlark ---
[INFO] Recompiling the module because of changed source code.
[INFO] Compiling 92 source files with javac [forked deprecation release 17] to target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error: release version 17 not supported
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for starlarky 1.0.0-SNAPSHOT:
[INFO]
[INFO] libstarlark ........................................ FAILURE [ 1.809 s]
[INFO] larky .............................................. SKIPPED
[INFO] runlarky ........................................... SKIPPED
[INFO] starlarky .......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.294 s
[INFO] Finished at: 2024-06-06T17:33:59-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project libstarlark: Compilation failure
[ERROR] error: release version 17 not supported
[ERROR]
[ERROR] -> [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/MojoFailureException
matias@MacBook-Pro-de-Matias starlarky % java --version
openjdk 16.0.1 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-16.0.1+9 (build 16.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-16.0.1+9 (build 16.0.1+9, mixed mode, sharing)
Isn't this supposed to work with 16? Why does it detect 17?
Advised solution
Testing scenarios
(insert text here)