quarkus icon indicating copy to clipboard operation
quarkus copied to clipboard

Deployment class path not built for custom source sets in Gradle

Open AmsterdamFilho opened this issue 4 years ago • 5 comments

Describe the bug

When a new source set is created, for example, for integration tests, quarkus is not building the class path correctly.

Quarkus only builds the class path for implementation and testImplementation configurations.

Originally posted here https://stackoverflow.com/questions/70700501/serviceconfigurationerror-when-running-a-quarkustest-using-gradle-kts

AmsterdamFilho avatar Jan 18 '22 17:01 AmsterdamFilho

/cc @glefloch, @quarkusio/devtools

quarkus-bot[bot] avatar Jan 18 '22 17:01 quarkus-bot[bot]

This bug causes a huge amount of pain for the engineers I work with at Zalando. We make heavy use of integration tests in our multi-module Quarkus applications, and the DI fails because of this often with the very cryptic error message:

io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype

This results in engineers changing things from ApplicationScoped to Singleton, moving factories around, and engaging in all sorts of other toil to fix the issue. When the issue presents, it is incredibly time-consuming to diagnose and fix, and the workarounds leaves the code base in a worse state than before.

cjbooms avatar May 20 '23 16:05 cjbooms

It is the same here, I would really hope that this can be fixed soon.

anandbhaskaran avatar Mar 05 '25 14:03 anandbhaskaran

We're also having this issue in our project. As soon as the flow gets to the point of doing a get() on a future this blows up. This never happens in production code, and it never happens when running the tests from IntelliJ. Only happens when running tests with ./gradlew -i clean test which is annoying as this is the command Jenkins builders use to run tests. Even if the service is ran on local dev machine with java -jar quarkus-run.jar then the issue is not reproducible. What is it about running the tests from gradle that causes this?

LunaticoCR avatar Mar 16 '25 15:03 LunaticoCR

@glefloch Any update on this?

rodcheater avatar May 01 '25 06:05 rodcheater

I wasn’t sure if I had the same issue so I created a new one: https://github.com/quarkusio/quarkus/issues/47657

rodcheater avatar May 02 '25 04:05 rodcheater