-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
unclear exceptions from quarkus-maven-plugin 3.8 when used on Java 11 #39358
Comments
/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: 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. |
Situation cant be fully handled as quarkus-maven-plugin must target Java 11 for now even though Quarkus requires Java 17, as only Maven 3.9.6+ can actually handle plugins targeted to Java 17. See quarkusio/quarkus#39358 and https://issues.apache.org/jira/browse/MNG-7913
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 quarkus/independent-projects/extension-maven-plugin/pom.xml Lines 37 to 40 in f9f95ca
|
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
The text was updated successfully, but these errors were encountered: