Deployment class path not built for custom source sets in Gradle
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
/cc @glefloch, @quarkusio/devtools
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.
It is the same here, I would really hope that this can be fixed soon.
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?
@glefloch Any update on this?
I wasn’t sure if I had the same issue so I created a new one: https://github.com/quarkusio/quarkus/issues/47657