Skip to content
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

quarkusDev doesn't work in multi module gradle project #6442

Closed
tobad357 opened this issue Jan 7, 2020 · 1 comment · Fixed by #6455
Closed

quarkusDev doesn't work in multi module gradle project #6442

tobad357 opened this issue Jan 7, 2020 · 1 comment · Fixed by #6455
Labels
area/devmode area/gradle Gradle kind/bug Something isn't working
Milestone

Comments

@tobad357
Copy link

tobad357 commented Jan 7, 2020

Describe the bug
If using a multi module gradle project quarkusDev will fail complaining that beans are defined multiple times. This is due to both common/buld/classes and common/buld/lib/common.jar being on the classpath inside of dev-mode-context.dat

Project Structure

project-root
... common
... app

App depends on common via

compile project(":commons")

The error that happens is

        - java member: commons.cache.impl.CacheServiceImpl#config
        - declared on CLASS bean [types=[commons.cache.CacheService, commons.cache.impl.CacheServiceImpl, java.lang.Object], qualifiers=[@Default, @Any], target=commons.cache.impl.CacheServiceImpl]
        - available beans:
                - CLASS bean [types=[commons.CommonsConfig, java.lang.Object], qualifiers=[@Default, @Any], target=commons.CommonsConfig]
                - CLASS bean [types=[commons.CommonsConfig, java.lang.Object], qualifiers=[@Default, @Any], target=commons.CommonsConfig]

Inside META-INF/dev-mode-context.dat

commons/build/classes/java/main
commons/build/libs/commons-v383-1-gf5b4d8a.dirty.jar

Expected behavior
QuarkusDev should start without issues

Actual behavior
QuarkusDev fails due to AmbiguousResolutionException

Environment (please complete the following information):

  • Output of uname -a or ver: Darwin Kernel Version 19.0.0
  • Output of java -version: OpenJDK 64-Bit GraalVM CE 19.2.1 (build 25.232-b07-jvmci-19.2-b03, mixed mode)
  • GraalVM version (if different from Java):
  • Quarkus version or git rev: 1.1.0.FINAL
@tobad357 tobad357 added the kind/bug Something isn't working label Jan 7, 2020
@tobad357
Copy link
Author

tobad357 commented Jan 7, 2020

quarkusDev does work if I delete commons/build/classes/java/main quickly between common build and quarkusDev starting the jvm for the app

tobad357 added a commit to tobad357/quarkus that referenced this issue Jan 8, 2020
tobad357 added a commit to tobad357/quarkus that referenced this issue Jan 8, 2020
…e on the quarkusDev classpath

Change logging to debug
tobad357 added a commit to tobad357/quarkus that referenced this issue Jan 8, 2020
…e on the quarkusDev classpath

Change logging to debug

Simplify check if ProjectComponentIdentifier
tobad357 added a commit to tobad357/quarkus that referenced this issue Jan 8, 2020
…e on the quarkusDev classpath

Change logging to debug

Simplify check if ProjectComponentIdentifier

Remove unused import
tobad357 added a commit to tobad357/quarkus that referenced this issue Jan 8, 2020
geoand added a commit that referenced this issue Jan 9, 2020
Fix for #6442 quarkusDev not working in multi module projects
gwenneg pushed a commit to gwenneg/quarkus that referenced this issue Jan 11, 2020
@gsmet gsmet added this to the 1.2.0 milestone Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devmode area/gradle Gradle kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants