Skip to content

"mvn quarkus:generate-code" does not generate server code if "mvn compile" is not run #1110

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

Open
Errons1 opened this issue Apr 15, 2025 · 2 comments
Assignees
Labels
area:server This item is related to the server extension

Comments

@Errons1
Copy link

Errons1 commented Apr 15, 2025

Tell us the extension you're using

Server

I tried this:

I started new project using https://code.quarkus.io/.
I made a project from npm template and added openapi server and client + rest client + rest client jacksjon.
I run "mvn quarkus:generate-code" and see only the client example code shows up.
In the maven logs this comes up:
"[WARNING] The quarkus.openapi.generator.spec property is not present, the code generation will be ignored"

After I run "mvn compile" then "mvn quarkus:generate-code" works for both server and client.

I see this as a bug as client work without pre-compile, but server does not.

This happened:

Only client code got generated.

I expected this:

I expected both client and server code to be generated.

Is there a workaround?

Run "mvn compile" before running "mvn quarkus:generate-code"

How can we try to reproduce the issue?

Make a new project from https://code.quarkus.io/ and add both openapi projects. Then run "mvn quarkus:generate-code"

Anything else?

No response

Output of uname -a or ver

No response

Output of java -version

java 21.0.6 2025-01-21 LTS Java(TM) SE Runtime Environment Oracle GraalVM 21.0.6+8.1 (build 21.0.6+8-LTS-jvmci-23.1-b55) Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.6+8.1 (build 21.0.6+8-LTS-jvmci-23.1-b55, mixed mode, sharing)

Quarkus OpenApi version or git rev

2.9.0

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

mvn -v Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256) Maven home: C:\Program Files\Maven\apache-maven-3.9.8 Java version: 21.0.6, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-vm Default locale: en_GB, platform encoding: UTF-8 OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"

Additional information

No response

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.name: Bug Report 🐞
@mcruzdev mcruzdev added the area:server This item is related to the server extension label Apr 15, 2025
@mcruzdev mcruzdev self-assigned this Apr 15, 2025
@mcruzdev
Copy link
Member

mcruzdev commented May 13, 2025

@Errons1 thank you for this report and sorry for the long delay, did you set the quarkus.openapi.generator.spec property?

I saw here, and the generation is running, if you do not have configured the property, really it will not execute.

@mcruzdev
Copy link
Member

Maybe this is a codestart issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:server This item is related to the server extension
Projects
None yet
Development

No branches or pull requests

2 participants