-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix autodetection of Java version for project creation using CLI #24645
Conversation
Also, make sure project created with Java 18 will use Java 17 and not Java 11. Finally, use autodetection for QuarkusJBangCodestartProjectInputBuilder too. Fixes quarkusio#24613
"--java" }, description = "Target Java version.\n Valid values: ${COMPLETION-CANDIDATES}", completionCandidates = VersionCandidates.class, defaultValue = CreateProjectHelper.DEFAULT_JAVA_VERSION) | ||
String javaVersion = CreateProjectHelper.DEFAULT_JAVA_VERSION; | ||
"--java" }, description = "Target Java version.\n Valid values: ${COMPLETION-CANDIDATES}", completionCandidates = VersionCandidates.class, defaultValue = CreateProjectHelper.DETECT_JAVA_RUNTIME_VERSION) | ||
String javaVersion = CreateProjectHelper.DETECT_JAVA_RUNTIME_VERSION; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The core of the issue is here. The rest is improvements on top of what we were doing, mostly to consider that the best version for 18 is 17, not 11.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works for me
"--java" }, description = "Target Java version.\n Valid values: ${COMPLETION-CANDIDATES}", completionCandidates = VersionCandidates.class, defaultValue = CreateProjectHelper.DEFAULT_JAVA_VERSION) | ||
String javaVersion = CreateProjectHelper.DEFAULT_JAVA_VERSION; | ||
"--java" }, description = "Target Java version.\n Valid values: ${COMPLETION-CANDIDATES}", completionCandidates = VersionCandidates.class, defaultValue = CreateProjectHelper.DETECT_JAVA_RUNTIME_VERSION) | ||
String javaVersion = CreateProjectHelper.DETECT_JAVA_RUNTIME_VERSION; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works for me
Also, make sure project created with Java 18 will use Java 17 and not
Java 11.
Finally, use autodetection for QuarkusJBangCodestartProjectInputBuilder
too.
Fixes #24613