apache / incubator-kie-kogito-runtimes

Kogito Runtimes - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
http://kogito.kie.org
Apache License 2.0
541 stars 209 forks source link

build error from conflicting provider capabilities when using org.kie.kogito:runtime-tools-quarkus-extension with io.quarkus:quarkus-resteasy-reactive #2727

Open StephenOTT opened 1 year ago

StephenOTT commented 1 year ago

Describe the bug

https://docs.kogito.kie.org/latest/html_single/#con-runtime-tools-dev-ui_kogito-developing-process-services

Gradle:

    implementation 'io.quarkus:quarkus-arc'
    implementation 'org.kie.kogito:kogito-quarkus-processes'
    implementation 'org.kie.kogito:runtime-tools-quarkus-extension'

    implementation 'io.quarkus:quarkus-resteasy-reactive'
    implementation 'io.quarkus:quarkus-resteasy-reactive-jackson'

receive build error:

Please make sure there is only one provider of the following capabilities:
capability io.quarkus.rest is provided by:
  - io.quarkus:quarkus-resteasy-reactive::jar:2.15.2.Final
  - io.quarkus:quarkus-resteasy::jar:2.15.2.Final
capability io.quarkus.rest.jackson is provided by:
  - io.quarkus:quarkus-resteasy-jackson::jar:2.15.2.Final
  - io.quarkus:quarkus-resteasy-reactive-jackson::jar:2.15.2.Final

remove the resteasy deps and the error is removed.

Expected behavior

Would expect that you can use resteasy and runtime tools in the same project.

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

radtriste commented 1 year ago

@StephenOTT runtime-tools-quarkus-extension is bringing the quarkus-resteasy and quarkus-resteasy-jackson libraries as compile deps: https://github.com/kiegroup/kogito-apps/blob/main/runtime-tools-quarkus-extension-parent/runtime-tools-quarkus-extension/pom.xml

StephenOTT commented 1 year ago

@radtriste this seems like a bad design of that extensions deps, no?

Other extensions do not seem to apply this passthrough. It would mean that someone adding this extension is then forced to modify their existing dependencies for something that is a dev ui function as per: https://docs.jboss.org/kogito/release/latest/html_single/#con-runtime-tools-dev-ui_kogito-developing-process-services

radtriste commented 1 year ago

@cristianonicolai @ricardozanini @spolti ?

hbelmiro commented 1 year ago

Kogito doesn't support RESTEasy Reactive. Your application must use RESTEasy Classic.

StephenOTT commented 1 year ago

Would this issue be solved by https://github.com/quarkusio/quarkus/issues/19868#issuecomment-1020123841 ?

cristianonicolai commented 1 year ago

@paulovmr @pefernan

spolti commented 1 year ago

just found this issue https://github.com/kiegroup/kogito-runtimes/pull/1757 that enables reasteasy reactive.

pefernan commented 1 year ago

Hi guys, that's because the extension is using quarkus-resteasy to define some custon REST endpoints. I think I have an idea on how to remove those endpoints by using the quarkus apis but I'll need some time to do some tests before moving forward.