我有一个非常简单的项目,我正在尝试BPM(Quarkus,Kogito,jBPM和Drools),但它无法在Java 11上构建。这是github存储库:https://github.com/JoaoCamposFrom94/bpmdemo/tree/2808d87428ddb91c43c0b2554a5808ca4299293e
该项目有几个REST端点,这些端点将表单保存在哈希图中。 我打算使用流口水来验证端点POST / demo / form / {id}上的某些字段,并通过启动在端点POST / demo / form上执行任意Java代码的简单过程来对jBPM进行实验。 >
通过运行mvn compile quarkus:dev
,我在生成的某些代码中收到错误消息。
import org.kie.kogito.Config;
@javax.inject.Singleton()
public class Application implements org.kie.kogito.Application {
@org.eclipse.microprofile.config.inject.ConfigProperty(name = "kogito.service.url", defaultValue = "")
java.lang.String kogitoService;
@javax.inject.Inject()
org.kie.kogito.Config config;
public Config config() {
return config;
}
}
...
(class changed for brevity)
11:16:28,528 ERROR [io.qua.dev.DevModeMain] Failed to start Quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: javax.enterprise.inject.spi.DeploymentException: Found 4 deployment problems:
[1] Ambiguous dependencies for type org.kie.kogito.Application and qualifiers [@Default]
- java member: com.demo.form.CreateFormProcessResource#application
- declared on CLASS bean [types=[com.demo.form.CreateFormProcessResource], qualifiers=[@Default, @Any], target=com.demo.form.CreateFormProcessResource]
- available beans:
- CLASS bean [types=[org.kie.kogito.app.Application, java.lang.Object, org.kie.kogito.Application], qualifiers=[@Default, @Any], target=org.kie.kogito.app.Application]
- CLASS bean [types=[com.demo.poc.Application, java.lang.Object, org.kie.kogito.Application], qualifiers=[@Default, @Any], target=com.demo.poc.Application]
[2] Ambiguous dependencies for type org.kie.kogito.Config and qualifiers [@Default]
- java member: org.kie.kogito.app.Application#config
- declared on CLASS bean [types=[org.kie.kogito.app.Application, java.lang.Object, org.kie.kogito.Application], qualifiers=[@Default, @Any], target=org.kie.kogito.app.Application]
- available beans:
- CLASS bean [types=[com.demo.poc.ApplicationConfig, org.kie.kogito.Config, java.lang.Object], qualifiers=[@Default, @Any], target=com.demo.poc.ApplicationConfig]
- CLASS bean [types=[org.kie.kogito.Config, java.lang.Object, org.kie.kogito.app.ApplicationConfig], qualifiers=[@Default, @Any], target=org.kie.kogito.app.ApplicationConfig]
完成转储错误消息:https://pastebin.com/dLDwaWfJ
答案 0 :(得分:2)
在https://groups.google.com/forum/#!topic/kogito-development/Xkkon4tLHdo得到了答复。
我的pom.xml指定了一个kogito构建插件和一个quarkus构建插件。两者都有冲突,我只是删除了kogito构建插件。