quarkus: Quarkus quarkusDev mode not working in a gradle multimodule project - but the runable jar does.
Describe the bug I have following modules in my gradle project:
- common (common stuff, just jee-spec dependencies)
- common-integration (implementations for stuff in common, quarkus dependencies (incl. plugin))
- domain (domain stuff uses interfaces of common, just jee-spec dependencies)
- domain-integration (quarkus dependencies (incl. plugin), generates the final deployable)
Thats the dependency structure: domain -> common common-integration -> common domain-integration -> domain domain-integration -> common-integration
Every module contains META-INF/beans.xml file ins src/main/resources
Expected behavior
domain-integration:quarkusDev
should start as the runnable jar does.
Actual behavior
It doesnt.
The gradle command: domain-integration:quarkusDev
complains during startup that some beans implemented in common-integration cannot be resolved. While domain-integration:quarkusBuild
doesnt show any issue and the resulting runnable jar also works as expected.
It seems like, that the annotations of the direct project compile dependencies are not processed in quarkusDev mode. Also i experienced that if i add the domain-integration -> domain dependency quarkusDev mode fails with the not indexed entities
issue - therefore i guess that the beans.xml & jandex indexes and are not discovered.
To Reproduce Steps to reproduce the behavior: The structure above is a subset of the modules of our project. I did not create a reduced project yet gradle-files.txt
- Create the module structure above
- See the attached files for examples
- Try
quarkusDev
andquarkusBuild
Environment (please complete the following information):
- Output of
uname -a
orver
: Microsoft Windows [Version 6.1.7601] - Output of
java -version
: openjdk 11 2018-09-25 OpenJDK Runtime Environment 18.9 (build 11+28) OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode) - GraalVM version (if different from Java): not used
- Quarkus version & plugin version: 1.2.1.Final
- Build tool (ie. output of
mvnw --version
orgradlew --version
): Gradle 5.6.4
Additional context (Add any other context about the problem here.)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (9 by maintainers)
If itâs not 1.3.1.Final it should be 1.4.0.Final. There are a few other Gradle issues that I want to address. This one is definitely one of the most critical ones.
@aloubyansky. Sounds quite promising đ Do you already know the planned milestone for the fix? We would really like to switch to quarkus, but this one is blocking us to do so.
Allright - did that:) You can clone it from here https://github.com/marcelhanser/quarkus-playground Setup is as described and it shows the described behaviour.
gradlew domain-integration:quarkusDev
fails depending on the version:javax.enterprise.inject.UnsatisfiedResolutionException
javax.enterprise.inject.AmbiguousResolutionException
But the resulting build artifact works fine
@gastaldi just checked with 1.3.0.CR1 Now i get tones of javax.enterprise.inject.AmbiguousResolutionExceptionâs during startup. Seems like every bean is twice in the container.