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

Failure when running "quarkus-maven-plugin:create" with basic options #40691

Closed
paulrobinson opened this issue May 17, 2024 · 3 comments
Closed
Labels
area/maven kind/bug Something isn't working

Comments

@paulrobinson
Copy link
Contributor

Describe the bug

I'm trying to run the tutorial on https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/02_basics.html.

The following command worked yesterday (before 3.11.0.CR1 was released) on my work laptop. Today I tried on my home computer, and it failed. The environment could be slightly different, but reporting this bug incase it's caused by a bug in the CR release for 3.11.

I run the following command:

mvn "io.quarkus.platform:quarkus-maven-plugin:create" -DprojectGroupId="com.redhat.developers" -DprojectArtifactId="tutorial-app" -DprojectVersion="1.0-SNAPSHOT" -Dextensions=rest
cd tutorial-app

And get this error:

[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.11.0.CR1:create (default-cli) on project standalone-pom: Execution default-cli of goal io.quarkus.platform:quarkus-maven-plugin:3.11.0.CR1:create failed: Unable to load the mojo 'create' (or one of its required components) from the plugin 'io.quarkus.platform:quarkus-maven-plugin:3.11.0.CR1': java.util.NoSuchElementException
[ERROR]       role: org.apache.maven.plugin.Mojo
[ERROR]   roleHint: io.quarkus.platform:quarkus-maven-plugin:3.11.0.CR1:create
[ERROR] -> [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/PluginContainerException

Full output here: https://pastebin.com/dpgLH4ug

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

Darwin pauls-mac-mini.lan 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:11:05 PDT 2024; root:xnu-10063.101.17~1/RELEASE_X86_64 x86_64

Output of java -version

openjdk version "21.0.3" 2024-04-16 OpenJDK Runtime Environment Homebrew (build 21.0.3) OpenJDK 64-Bit Server VM Homebrew (build 21.0.3, mixed mode, sharing)

Quarkus version or git rev

3.11.0.CR1

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)

Additional information

No response

@paulrobinson paulrobinson added the kind/bug Something isn't working label May 17, 2024
@quarkus-bot
Copy link

quarkus-bot bot commented May 17, 2024

/cc @quarkusio/devtools (maven)

@paulrobinson
Copy link
Contributor Author

It also fails in the same way when specifying 3.10.1 as the quarkus version, using this command:

mvn "io.quarkus.platform:quarkus-maven-plugin:3.10.1:create" -DprojectGroupId="com.redhat.developers" -DprojectArtifactId="tutorial-app" -DprojectVersion="1.0-SNAPSHOT" -Dextensions=rest

@paulrobinson
Copy link
Contributor Author

This was caused by mvn picking up Java 11, despite me having Java 21 as the default on the path.

See:

# java --version
openjdk version "21.0.3" 2024-04-16 OpenJDK Runtime Environment Homebrew (build 21.0.3) OpenJDK 64-Bit Server VM Homebrew (build 21.0.3, mixed mode, sharing)

# mvn --version
Maven home: /Users/paul/.sdkman/candidates/maven/current
Java version: 11.0.7, vendor: AdoptOpenJDK, runtime: /Users/paul/.sdkman/candidates/java/11.0.7.hs-adpt
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"

The fix was to install Java again via SDKMAN (using the following command) and accept the option to make '21.0.3-tem' the default version when asked.

sdk install java

I guess I had installed Java 11 with SDKMAN, then Java 21 with Brew. So I got my env into a bit of a mess.

This seems to be the same issue as: #39358

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/maven kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant