Closed kesslerd closed 1 month ago
/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 won't fix
.
@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 https://github.com/quarkusio/quarkus/issues/43242#issuecomment-2346584500, 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.
./gradlew jar
(build/libs)
./gradlew build
(build/quarkus-app/app)
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?
@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
I can confirm this, so I'll reopen it
@aloubyansky maybe you could have a look?
Nothing jumps out as the culprt in the release notes, so I would appreciate your help here @aloubyansky
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 https://github.com/quarkusio/quarkus/pull/42496.
Thanks for that info
Also cc @cdsap
What's interesting is that the classes are actually compiled. I can see them in the build
directory but they are not included in the jar.
Right, I saw that yesterday which is very weird
3.14.4 released today should address the issue.
Let's keep this issue open as I only reverted the changes in 3.14/3.15 and we still need to fix the issue in main
as we want to keep the enhancement that introduced the regression long term.
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