mavenix icon indicating copy to clipboard operation
mavenix copied to clipboard

Fatal error compiling: invalid target release: 11

Open yswtrue opened this issue 2 years ago • 4 comments

when I init mavenix on jdk 11 project. and then run mvnix-update get these error.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project haita-chat-utils: Fatal error compiling: invalid target release: 11 -> [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
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :haita-chat-utils

yswtrue avatar Aug 29 '22 06:08 yswtrue

I get this while building a jdk 17 project.

I am under the impression that mavenix uses jdk 8 internally.

Is there a way to change this?

I am not getting anywhere with my attempts to repackage.

https://gist.github.com/tripleo11/d5ee9e402fff22a389c57cdaaccf6be5

tripleo11 avatar Aug 29 '23 18:08 tripleo11

Is #21 a (partial) solution?

tripleo11 avatar Aug 29 '23 18:08 tripleo11

Also, maybe https://stackoverflow.com/a/42036877 ?

tripleo11 avatar Aug 29 '23 18:08 tripleo11

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/help-packaging-a-java-application/32326/1

nixos-discourse avatar Aug 29 '23 18:08 nixos-discourse