Skip to content
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

Merged
merged 1 commit into from
Mar 31, 2022

Conversation

gsmet
Copy link
Member

@gsmet gsmet commented Mar 30, 2022

Also, make sure project created with Java 18 will use Java 17 and not
Java 11.
Finally, use autodetection for QuarkusJBangCodestartProjectInputBuilder
too.

Fixes #24613

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
@gsmet gsmet requested a review from ebullient March 30, 2022 15:59
@quarkus-bot quarkus-bot bot added area/cli Related to quarkus cli (not maven/gradle/etc.) area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/jbang Issues related to when using jbang.dev with Quarkus area/platform Issues related to definition and interaction with Quarkus Platform labels Mar 30, 2022
Comment on lines -25 to +26
"--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;
Copy link
Member Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me

Comment on lines -25 to +26
"--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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me

@gsmet gsmet merged commit 180fabf into quarkusio:main Mar 31, 2022
@quarkus-bot quarkus-bot bot added this to the 2.9 - main milestone Mar 31, 2022
@gsmet gsmet modified the milestones: 2.9 - main, 2.8.1.Final Apr 11, 2022
@gsmet gsmet modified the milestones: 2.8.1.Final, 2.7.6.Final May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Related to quarkus cli (not maven/gradle/etc.) area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/jbang Issues related to when using jbang.dev with Quarkus area/platform Issues related to definition and interaction with Quarkus Platform kind/bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: Quarkus-cli create app doesn't auto-detect Host java version
2 participants