Open gemmellr opened 4 months ago
/cc @quarkusio/devtools (maven)
From Zulip chat this was apparently expected/intended for now, because updating quarkus-maven-plugin to targeting Java 17 caused Sisu issues and CI failures even when running on Java 17:
From which it seems that Maven 3.9.6 is required to be used to successfully target Java 17+ for plugins: https://issues.apache.org/jira/browse/MNG-7913 and https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/Plugins.20compiled.20for.20Java.2011.20despite.20Quarkus.20requiring.2017.3F/near/426117614
I'll add an enforcer rule to the quickstart I referenced so that folks do get a more obvious error there, albeit it still prints the initial QuarkusBootstrapProvider related problems, it just then wont report the NoSuchElementException but instead explicitly say 'Java 17 or newer is required' instead.
I'll leave this issue open for now for any future improvements (such as going to a 3.9.6 minimum and being able to properly target the plugin to Java 17), and for to help explain things for other users if they hit it.
Hey folks, I had similar problem with java v11 and quarkus-maven-plugin v3.8.4. The error was : Unable to load the mojo 'generate-code'
After reading your comments, I tried to compile running java 17 and everything worked. Hope it helps someone!
It might be worth changing 11
to 17
in the following lines to see if it works without errors now that we're on Maven 3.9.8 and the mentioned issue is closed (see other instances of them in the codebase).
Describe the bug
Quarkus 3.8.x requires Java 17. However quarkus-maven-plugin still targets Java 11 for some reason (EDIT: explained further down). This allows things to proceed further than it would seem they should if someone runs it on Java 11 for Quarkus 3.8.x, and then it fails in an obscure way that isnt obviously 'oops, you need to use Java 17'.
If someone tries to use it on Java 11, for example by running a quickstart they had used ok with an earlier Quarkus version that only requires Java 11, then a fairly unclear NoSuchElementException is ultimately reported, after a QuarkusBootstrapProvider related failure, rather than a more useful error or perhaps a much earlier failure and more typical/known class version error if quarkus-maven-plugin had required Java 17.
Expected behavior
No weird NoSuchElementException etc failures reported. Either a more obvious / already-understood class version error from quarkus-maven-plugin 3.8.x requiring Java 17 like Quarkus 3.8.x itself, or clearer 'You need to use Java 17+ with this version of quarkus' style error if there is some reason the plugin should actually still be targeting Java 11.
Actual behavior
How to Reproduce?
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response