-
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
Gradle - kotlin classes missing from the jar #43242
Comments
/cc @geoand (kotlin) |
So the problem is that when both Java and Kotlin sources exist, the production artifact does not include the kotlin stuff. BTW, this happens not only with a docker build, but with a plain jar build as well. |
The problem can actually be overcome if you use different package for Java and Kotlin source code - which you should probably do anyway, so I am going to close this as |
@geoand It also happens for me if there is no java class in the project and also in the plain jar Build both classes are included |
So only with Kotlin classes? I have not seen that, and we have plenty of people using only Kotlin with Quarkus |
I think I have seen some reports of weird things happening with Kotlin + Gradle but only in dev mode. |
In this case, dev mode worked just fine
…On Thu, Sep 12, 2024, 18:16 Guillaume Smet ***@***.***> wrote:
I think I have seen some reports of weird things happening with Kotlin +
Gradle but only in dev mode.
—
Reply to this email directly, view it on GitHub
<#43242 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBMDP3PLRE7TLGNO73DTTLZWGV5RAVCNFSM6AAAAABODGRIYSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBWGU4DINJQGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@geoand I attached two screenshots of the contents of the jars I get.
Out of curiosity did you use the linked project to reproduce? |
Yup, that's what I used |
using maven instead of gradle on code.quarkus.io is working fine. However, I would prefer to use gradle |
@geoand When I change the quarkus version to 3.14.2 in the gradle properties the jar gets correctly generated. I verified this claim by switching several times between 3.14.2 and 3.14.3 |
@aloubyansky maybe you could have a look? |
I can confirm this, so I'll reopen it |
Nothing jumps out as the culprt in the release notes, so I would appreciate your help here @aloubyansky |
Could be #42496 |
BTW I'm not sure this is the same issue but theres definitly something wrong with Quarkus 3.14.3 using Gradle and Kotlin. In all of our Quarkus projects we have failing ci builds, failing/dubious Intellij builds and services not starting due to class not being found since Quarkus 3.14.3. Quarkus 3.14.2 works fine. I'm working on a reproducer and will open a new issue. I suspect it's due to #42496. |
Thanks for that info |
Also cc @cdsap |
What's interesting is that the classes are actually compiled. I can see them in the |
Right, I saw that yesterday which is very weird |
3.14.4 released today should address the issue. |
Describe the bug
Kotlin classes are missing from the jar used for the docker build
I created a new project on https://code.quarkus.io/ using
Using the dev server I can access the GreetRessource, however, when I build a docker image(Dockerfile.jvm) I get the "Resource not found" message.
When adding a new endpoint using a java class the endpoint is both accessible using the dev server and the docker image
Expected behavior
Kotlin and Java resources should work
Actual behavior
Kotlin resources are missing
How to Reproduce?
https://github.com/kesslerd/kotlin-docker-test
Output of
uname -a
orver
23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 arm64
Output of
java -version
openjdk 21.0.4 2024-07-16 LTS
OpenJDK Runtime Environment Zulu21.36+17-CA (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM Zulu21.36+17-CA (build 21.0.4+7-LTS, mixed mode, sharing)
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)Gradle 8.8
Additional information
No response
The text was updated successfully, but these errors were encountered: