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

Quarkus Gradle example? #86

Open
danelowe opened this issue Aug 5, 2020 · 1 comment
Open

Quarkus Gradle example? #86

danelowe opened this issue Aug 5, 2020 · 1 comment

Comments

@danelowe
Copy link

danelowe commented Aug 5, 2020

I tried converting the mapstruct-quarkus example directly to gradle.

https://github.com/danelowe/mapstruct-quarkus-gradle

Running ./gradlew quarkusDev results in an error when trying to access the server (http://localhost:8080/)

Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type org.mapstruct.example.quarkus.mapper.PersonMapper and qualifiers [@Default]
        - java member: org.mapstruct.example.quarkus.PersonResource#personMapper
        - declared on CLASS bean [types=[org.mapstruct.example.quarkus.PersonResource, java.lang.Object], qualifiers=[@Default, @Any], target=org.mapstruct.example.quarkus.PersonResource]
        at io.quarkus.arc.processor.Beans.resolveInjectionPoint(Beans.java:487)
        at io.quarkus.arc.processor.BeanInfo.init(BeanInfo.java:362)
        at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:226)
        ... 14 more

Similarly cannot build due to same error.

I have no idea if I'm using it wrong, or if there is a bug with Mapstruct, or with Quarkus, or if some workaround is necessary to get it working with Gradle.

I would like to use Mapstruct in a project with Quarkus/Gradle/Kotlin, but kapt seems to break Quarkus CDI, and I can't get mapstruct to run in Quarkus CDI with Gradle

@danelowe
Copy link
Author

danelowe commented Aug 5, 2020

If I change compileOnly 'org.mapstruct:mapstruct-processor:1.4.0.Beta3' to annotationProcessor 'org.mapstruct:mapstruct-processor:1.4.0.Beta3', it works as expected.

Unfortunately, Kapt seems to break Quarkus CDI entirely, and I'm intending to annotate Kotlin classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant